Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
acs-workflow
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
acs-workflow
Commits
e7f1d829
Commit
e7f1d829
authored
Feb 09, 2007
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- changes baselkb:
- Added new stuff to WF
parent
bfdccca8
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
91 additions
and
47 deletions
+91
-47
wf-callback-package-body.sql
sql/postgresql/wf-callback-package-body.sql
+0
-2
workflow-case-package-body.sql
sql/postgresql/workflow-case-package-body.sql
+11
-9
workflow-init.tcl
tcl/workflow-init.tcl
+5
-1
active-tasks-postgresql.xql
www/active-tasks-postgresql.xql
+3
-1
active-tasks.adp
www/active-tasks.adp
+4
-0
active-tasks.tcl
www/active-tasks.tcl
+2
-25
assign-yourself.tcl
www/assign-yourself.tcl
+15
-2
assignee-add-2.tcl
www/assignee-add-2.tcl
+14
-0
assignee-add.tcl
www/assignee-add.tcl
+13
-4
task-assignees.adp
www/task-assignees.adp
+2
-2
task-assignees.tcl
www/task-assignees.tcl
+8
-0
task.tcl
www/task.tcl
+14
-1
No files found.
sql/postgresql/wf-callback-package-body.sql
View file @
e7f1d829
...
...
@@ -33,5 +33,3 @@ end;' language 'plpgsql';
-- show errors
sql/postgresql/workflow-case-package-body.sql
View file @
e7f1d829
...
...
@@ -995,9 +995,10 @@ declare
execute_time_callback__transition_key alias for $4;
v_rec record;
v_str text;
v_result timestamptz;
begin
if execute_time_callback__callback =
''''
or execute_time_callback__callback is null then
raise EXCEPTION
''
-20000: There
''''
s no time_callback function for the timed transition "%"
''
, execute_time_callback__transition_key
;
return null
;
end if;
v_str :=
''
select
''
|| execute_time_callback__callback ||
''
(
''
||
...
...
@@ -1007,11 +1008,11 @@ begin
for v_rec in execute v_str
LOOP
return
v_rec.trigger_time;
v_result :=
v_rec.trigger_time;
end LOOP;
return null
;
RAISE NOTICE
''
workflow_case__execute_time_callback: res=%, sql=%
''
, v_result, v_str
;
return v_result;
end;'
language
'plpgsql'
;
...
...
@@ -1338,7 +1339,8 @@ declare
v_finished_p boolean;
task_rec record;
begin
RAISE NOTICE
''
sweep_automatic_transitions(%,%)
''
,
sweep_automatic_transitions__case_id, sweep_automatic_transitions__journal_id;
PERFORM workflow_case__enable_transitions(sweep_automatic_transitions__case_id);
while v_done_p !=
''
t
''
loop
v_done_p :=
''
t
''
;
...
...
@@ -1717,14 +1719,14 @@ begin
enable_transitions__case_id,
trans_rec.transition_key
);
else if trans_rec.trigger_type =
''
time
''
then
v_trigger_time := workflow_case__execute_time_callback (
end if;
v_trigger_time := workflow_case__execute_time_callback (
trans_rec.time_callback,
trans_rec.time_custom_arg,
enable_transitions__case_id,
trans_rec.transition_key);
end if;
end if;
/* we are ready to insert the row */
select wf_task_id_seq.nextval into v_task_id from dual;
...
...
tcl/workflow-init.tcl
View file @
e7f1d829
...
...
@@ -5,4 +5,8 @@ ad_library {
@cvs-id $Id$
}
ad_schedule_proc -thread t 900 wf_sweep_time_events
# normal rhythm: Every 15 minutes
# ad_schedule_proc -thread t 900 wf_sweep_time_events
# for debugging: every 1 minute
ad_schedule_proc -thread t 60 wf_sweep_time_events
www/active-tasks-postgresql.xql
View file @
e7f1d829
...
...
@@ -7,9 +7,11 @@
<querytext>
select t.task_id,
t.transition_key,
t.transition_key,
t.state,
t.case_id,
t.holding_user,
acs_object__name(t.holding_user) as holding_user_name,
tr.transition_name,
to_char(t.enabled_date, :date_format) as enabled_date_pretty,
to_char(t.started_date, :date_format) as started_date_pretty,
...
...
www/active-tasks.adp
View file @
e7f1d829
...
...
@@ -14,6 +14,7 @@
<th>Activated Date</th>
<th>Started Date</th>
<th>Deadline</th>
<th>Holder</th>
<th>Assignees</th>
<th>Action</th>
</tr>
...
...
@@ -30,6 +31,7 @@
<if @active_tasks.deadline_pretty@ not nil>@active_tasks.deadline_pretty@</if>
<else> </else>
</td>
<td><a href="@holding_user_url@">@holding_user_name@</a></td>
<td>
<if @active_tasks.assignee_party_id@ not nil>
<group column="task_id">
...
...
@@ -40,9 +42,11 @@
<else>
@active_tasks.assignee_name@
</else>
<!--
<if @active_tasks.assignee_email@ not nil>
(<a href="mailto:@active_tasks.assignee_email@">@active_tasks.assignee_email@</a>)
</if>
-->
</li>
</group>
</if>
...
...
www/active-tasks.tcl
View file @
e7f1d829
...
...
@@ -17,31 +17,8 @@ if { ![info exists date_format] } {
set date_format
"Mon fmDDfm, YYYY HH24:MI:SS"
}
db_multirow active_tasks active_tasks
{
select t.task_id,
t.transition_key,
t.state,
t.case_id,
tr.transition_name,
to_char
(
t.enabled_date, :date_format
)
as enabled_date_pretty,
to_char
(
t.started_date, :date_format
)
as started_date_pretty,
to_char
(
t.deadline, :date_format
)
as deadline_pretty,
p.party_id as assignee_party_id,
p.email as assignee_email,
acs_object.name
(
p.party_id
)
as assignee_name,
'' as assignee_url,
assignee_o.object_type as assignee_object_type,
'' as reassign_url
from wf_tasks t, wf_transitions tr, wf_task_assignments tasgn, parties p, acs_objects assignee_o
where t.case_id = :case_id
and t.state in
(
'enabled', 'started'
)
and tr.workflow_key = t.workflow_key
and tr.transition_key = t.transition_key
and tasgn.task_id
(
+
)
= t.task_id
and p.party_id
(
+
)
= tasgn.party_id
and assignee_o.object_id
(
+
)
= p.party_id
order by t.enabled_date desc
}
{
db_multirow active_tasks active_tasks
{}
{
set holding_user_url
"/shared/community-member?
[
export_vars -url
{{
user_id
$holding
_user
}}]
"
if
{
[
string
equal
$assignee
_object_type
"user"
]
}
{
set assignee_url
"/shared/community-member?
[
export_vars -url
{{
user_id
$assignee
_party_id
}}]
"
}
...
...
www/assign-yourself.tcl
View file @
e7f1d829
...
...
@@ -11,15 +11,28 @@ ad_page_contract {
@cvs-id $Id$
}
{
task_id:integer,notnull
{
permanent_p 0
}
{
return_url
""
}
}
set
user_id
[
ad_conn user_id
]
set
subsite_id
[
ad_conn subsite_id
]
set
reassign_p
[
permission::permission_p -party_id
$user
_id -object_id
$subsite
_id -privilege
"wf_reassign_tasks"
]
if
{
!$reassign_p
}
{
ad_return_complaint 1
"<li>
[
_ intranet-core.lt_You_have_insufficient_1
]
"
return
}
wf_case_add_task_assignment
\
if
{
$permanent
_p
}
{
wf_case_add_task_assignment
\
-task_id
$task
_id
\
-party_id
$user
_id
\
-permanent
-permanent
}
else
{
wf_case_add_task_assignment
\
-task_id
$task
_id
\
-party_id
$user
_id
}
if
[
empty_string_p
$return
_url
]
{
ad_returnredirect task?task_id=$task_id
...
...
www/assignee-add-2.tcl
View file @
e7f1d829
...
...
@@ -5,6 +5,20 @@ ad_page_contract {
party_id:integer
{
return_url
"task?
[
export_url_vars task_id
]
"
}
}
# ------------------------------------------------------------
# Check Permissions
set
user_id
[
ad_conn user_id
]
set
subsite_id
[
ad_conn subsite_id
]
set
reassign_p
[
permission::permission_p -party_id
$user
_id -object_id
$subsite
_id -privilege
"wf_reassign_tasks"
]
if
{
!$reassign_p
}
{
ad_return_complaint 1
"<li>
[
_ intranet-core.lt_You_have_insufficient_1
]
"
return
}
# ------------------------------------------------------------
wf_case_add_task_assignment
\
-task_id
$task
_id
\
-party_id
$party
_id
\
...
...
www/assignee-add.tcl
View file @
e7f1d829
...
...
@@ -11,14 +11,23 @@ ad_page_contract {
focus
}
array
set task
[
wf_task_info
$task
_id
]
# ------------------------------------------------------------
# Check Permissions
set
context
[
list
[
list
"case?
[
export_vars -url
{{
case_id
$task
(
case_id
)}}]
"
"
$task
(object_name) case"
]
[
list
"task?
[
export_vars -url
{
task_id
}]
"
"
$task
(task_name)"
]
"Add assignee"
]
set
user_id
[
ad_conn user_id
]
set
subsite_id
[
ad_conn subsite_id
]
set
reassign_p
[
permission::permission_p -party_id
$user
_id -object_id
$subsite
_id -privilege
"wf_reassign_tasks"
]
if
{
!$reassign_p
}
{
ad_return_complaint 1
"<li>
[
_ intranet-core.lt_You_have_insufficient_1
]
"
return
}
set
export_vars
[
export_vars -form
{
task_id return_url
}]
# ------------------------------------------------------------
array
set task
[
wf_task_info
$task
_id
]
set
context
[
list
[
list
"case?
[
export_vars -url
{{
case_id
$task
(
case_id
)}}]
"
"
$task
(object_name) case"
]
[
list
"task?
[
export_vars -url
{
task_id
}]
"
"
$task
(task_name)"
]
"Add assignee"
]
set
export_vars
[
export_vars -form
{
task_id return_url
}]
set
focus
"assign.party_id"
set
party_widget
"<select name=
\"
party_id
\"
>
\n
"
set
count 0
...
...
www/task-assignees.adp
View file @
e7f1d829
...
...
@@ -47,8 +47,8 @@
<form method="post" action="@done_action_url@">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
@done_export_vars;noquote@
<tr
bgcolor="#dddddd"
>
<td colspan="3" align="
righ
t">
<tr>
<td colspan="3" align="
lef
t">
<input type=submit value="Done" />
</td>
</tr>
...
...
www/task-assignees.tcl
View file @
e7f1d829
...
...
@@ -15,10 +15,18 @@ ad_page_contract {
array
set task
[
wf_task_info
$task
_id
]
set
party_id
[
ad_conn user_id
]
set
subsite_id
[
ad_conn subsite_id
]
set
sub_return_url
"
[
ns_conn url
]
?
[
export_vars -url
{
task_id return_url
}]
"
set
task
(
add_assignee_url
)
"assignee-add?
[
export_vars -url
{
task_id
{
return_url
$sub
_return_url
}}]
"
set
task
(
assign_yourself_url
)
"assignee-add-2?
[
export_vars -url
{
task_id party_id
{
return_url
$sub
_return_url
}}]
"
set
reassign_p
[
permission::permission_p -party_id
$party
_id -object_id
$subsite
_id -privilege
"wf_reassign_tasks"
]
if
{
!$reassign_p
}
{
ad_return_complaint 1
"<li>
[
_ intranet-core.lt_You_have_insufficient_1
]
"
return
}
set
context
[
list
[
list
"case?
[
export_vars -url
{{
case_id
$task
(
case_id
)}}]
"
"
$task
(object_name) case"
]
[
list
"task?
[
export_vars -url
{
task_id
}]
"
"
$task
(task_name)"
]
"Assignees"
]
...
...
www/task.tcl
View file @
e7f1d829
...
...
@@ -54,7 +54,20 @@ wf_sweep_message_transition_tcl
# ---------------------------------------------------------
# Get everything about the task
array
set task
[
wf_task_info
$task
_id
]
if
{[
catch
{
array set task
[
wf_task_info
$task
_id
]
}
err_msg
]}
{
ad_return_complaint 1
"<li>
<b>
[
lang::message::lookup
""
acs-workflow.Task_not_found
"Task not found:"
]
</b><p>
[
lang::message::lookup
""
acs-workflow.Task_not_found_message
"
This error can occur if a system administrator has deleted a workflow.<br>
This situation should not occur during normal operations.<p>
Please contact your System Administrator
"
]
"
return
}
set
task
(
add_assignee_url
)
"assignee-add?
[
export_url_vars task_id
]
"
set
task
(
assign_yourself_url
)
"assign-yourself?
[
export_vars -url
{
task_id return_url
}]
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment