Commit 24006817 authored by Frank Bergmann's avatar Frank Bergmann

- updated WF

parent 0e453c31
/*
* Business Process Definition: Timesheet Approval (timesheet_approval_wf)
*
* Auto-generated by ACS Workflow Export, version 4.3
*
* Context: default
*/
/*
* Cases table
*/
create table timesheet_approval_workf_cases (
case_id integer primary key
references wf_cases on delete cascade
);
/*
* Declare the object type
*/
create function inline_0 () returns integer as '
begin
PERFORM workflow__create_workflow (
''timesheet_approval_wf'',
''Timesheet Approval'',
''Timesheet Approval'',
''Approval WF to ask a user''''s project manager to approve the user''''s hour for a specific project. The WF refers to a im_timesheet_conf_object for variables and status.'',
''timesheet_approval_workf_cases'',
''case_id''
);
return null;
end;' language 'plpgsql';
select inline_0 ();
drop function inline_0 ();
/*****
* Places
*****/
select workflow__add_place(
'timesheet_approval_wf',
'start',
'Ready to Enter Hours',
1
);
select workflow__add_place(
'timesheet_approval_wf',
'before_confirm_hours',
'Ready to Confirm Hours',
null
);
select workflow__add_place(
'timesheet_approval_wf',
'before_confirmed',
'Ready to Confirmed',
null
);
select workflow__add_place(
'timesheet_approval_wf',
'before_deleted',
'Ready to Deleted',
null
);
select workflow__add_place(
'timesheet_approval_wf',
'end',
'Process finished',
null
);
/*****
* Roles
*****/
select workflow__add_role (
'timesheet_approval_wf',
'enter_hours',
'Enter Hours',
1
);
select workflow__add_role (
'timesheet_approval_wf',
'confirm_hours',
'Confirm Hours',
2
);
select workflow__add_role (
'timesheet_approval_wf',
'confirmed',
'Confirmed',
3
);
select workflow__add_role (
'timesheet_approval_wf',
'deleted',
'Deleted',
4
);
/*****
* Transitions
*****/
select workflow__add_transition (
'timesheet_approval_wf',
'enter_hours',
'Modify',
'enter_hours',
1,
'user'
);
select workflow__add_transition (
'timesheet_approval_wf',
'confirm_hours',
'Approve',
'confirm_hours',
2,
'user'
);
select workflow__add_transition (
'timesheet_approval_wf',
'confirmed',
'Confirmed',
'confirmed',
3,
'automatic'
);
select workflow__add_transition (
'timesheet_approval_wf',
'deleted',
'Deleted',
'deleted',
4,
'automatic'
);
/*****
* Arcs
*****/
select workflow__add_arc (
'timesheet_approval_wf',
'confirmed',
'end',
'out',
'',
'',
''
);
select workflow__add_arc (
'timesheet_approval_wf',
'confirmed',
'before_confirmed',
'in',
'',
'',
''
);
select workflow__add_arc (
'timesheet_approval_wf',
'confirm_hours',
'start',
'out',
'#',
'',
'Timesheet Not OK'
);
select workflow__add_arc (
'timesheet_approval_wf',
'confirm_hours',
'before_confirmed',
'out',
'wf_callback__guard_attribute_true',
'confirm_hours_are_the_logged_hours_ok_p',
'Timesheet OK'
);
select workflow__add_arc (
'timesheet_approval_wf',
'confirm_hours',
'before_confirm_hours',
'in',
'',
'',
''
);
select workflow__add_arc (
'timesheet_approval_wf',
'deleted',
'end',
'out',
'',
'',
''
);
select workflow__add_arc (
'timesheet_approval_wf',
'deleted',
'before_deleted',
'in',
'',
'',
''
);
select workflow__add_arc (
'timesheet_approval_wf',
'enter_hours',
'before_confirm_hours',
'out',
'',
'',
''
);
select workflow__add_arc (
'timesheet_approval_wf',
'enter_hours',
'start',
'in',
'',
'',
''
);
/*****
* Attributes
*****/
select workflow__create_attribute(
'timesheet_approval_wf',
'confirm_hours_are_the_logged_hours_ok_p',
'boolean',
'Approve the logged hours?',
null,
null,
null,
't',
1,
1,
null,
'generic'
);
select workflow__add_trans_attribute_map(
'timesheet_approval_wf',
'confirm_hours',
'confirm_hours_are_the_logged_hours_ok_p',
1
);
/*****
* Transition-role-assignment-map
*****/
/*
* Context/Transition info
* (for context = default)
*/
insert into wf_context_transition_info
(context_key,
workflow_key,
transition_key,
estimated_minutes,
instructions,
enable_callback,
enable_custom_arg,
fire_callback,
fire_custom_arg,
time_callback,
time_custom_arg,
deadline_callback,
deadline_custom_arg,
deadline_attribute_name,
hold_timeout_callback,
hold_timeout_custom_arg,
notification_callback,
notification_custom_arg,
unassigned_callback,
unassigned_custom_arg)
values
('default',
'timesheet_approval_wf',
'confirm_hours',
5,
'',
'',
'',
'im_workflow__set_object_status_id',
'17020',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'im_workflow__assign_to_supervisor',
'');
insert into wf_context_transition_info
(context_key,
workflow_key,
transition_key,
estimated_minutes,
instructions,
enable_callback,
enable_custom_arg,
fire_callback,
fire_custom_arg,
time_callback,
time_custom_arg,
deadline_callback,
deadline_custom_arg,
deadline_attribute_name,
hold_timeout_callback,
hold_timeout_custom_arg,
notification_callback,
notification_custom_arg,
unassigned_callback,
unassigned_custom_arg)
values
('default',
'timesheet_approval_wf',
'confirmed',
0,
'',
'',
'',
'im_workflow__set_object_status_id',
'17010',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'');
insert into wf_context_transition_info
(context_key,
workflow_key,
transition_key,
estimated_minutes,
instructions,
enable_callback,
enable_custom_arg,
fire_callback,
fire_custom_arg,
time_callback,
time_custom_arg,
deadline_callback,
deadline_custom_arg,
deadline_attribute_name,
hold_timeout_callback,
hold_timeout_custom_arg,
notification_callback,
notification_custom_arg,
unassigned_callback,
unassigned_custom_arg)
values
('default',
'timesheet_approval_wf',
'deleted',
0,
'',
'',
'',
'im_workflow__set_object_status_id',
'17090',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'');
insert into wf_context_transition_info
(context_key,
workflow_key,
transition_key,
estimated_minutes,
instructions,
enable_callback,
enable_custom_arg,
fire_callback,
fire_custom_arg,
time_callback,
time_custom_arg,
deadline_callback,
deadline_custom_arg,
deadline_attribute_name,
hold_timeout_callback,
hold_timeout_custom_arg,
notification_callback,
notification_custom_arg,
unassigned_callback,
unassigned_custom_arg)
values
('default',
'timesheet_approval_wf',
'enter_hours',
5,
'',
'',
'',
'im_workflow__set_object_status_id',
'17000',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'im_workflow__assign_to_owner',
'');
/*
* Context/Role info
* (for context = default)
*/
/*
* Context Task Panels
* (for context = default)
*/
insert into wf_context_task_panels
(context_key,
workflow_key,
transition_key,
sort_order,
header,
template_url,
overrides_action_p,
overrides_both_panels_p,
only_display_when_started_p)
values
('default',
'timesheet_approval_wf',
'confirm_hours',
1,
'Review Hours',
'/packages/intranet-timesheet2-workflow/www/conf-objects/conf-obj-panel',
'f',
'f',
'f');
insert into wf_context_task_panels
(context_key,
workflow_key,
transition_key,
sort_order,
header,
template_url,
overrides_action_p,
overrides_both_panels_p,
only_display_when_started_p)
values
('default',
'timesheet_approval_wf',
'enter_hours',
1,
'Modify Logged Hours',
'/packages/intranet-timesheet2-workflow/www/conf-objects/conf-obj-panel',
'f',
'f',
'f');
commit;
......@@ -100,36 +100,36 @@ drop function inline_0 ();
select workflow__add_role (
'vacation_approval_wf',
'enter',
'Enter',
1
'approved',
'Approved',
3
);
select workflow__add_role (
'vacation_approval_wf',
'review',
'Review',
2
'deleted',
'Deleted',
4
);
select workflow__add_role (
'vacation_approval_wf',
'approved',
'Approved',
3
'approve',
'Approve',
2
);
select workflow__add_role (
'vacation_approval_wf',
'deleted',
'Deleted',
4
'modify',
'Modify',
1
);
......@@ -142,9 +142,9 @@ drop function inline_0 ();
select workflow__add_transition (
'vacation_approval_wf',
'enter',
'modify',
'Modify',
'enter',
'modify',
1,
'user'
);
......@@ -153,9 +153,9 @@ drop function inline_0 ();
select workflow__add_transition (
'vacation_approval_wf',
'review',
'approve',
'Approve',
'review',
'approve',
2,
'user'
);
......@@ -192,20 +192,20 @@ drop function inline_0 ();
select workflow__add_arc (
'vacation_approval_wf',
'approved',
'end',
'approve',
'start',
'out',
'#',
'',
'',
''
'Rejected'
);
select workflow__add_arc (
'vacation_approval_wf',
'approved',
'before_approved',
'approve',
'before_review',
'in',
'',
'',
......@@ -216,19 +216,19 @@ drop function inline_0 ();
select workflow__add_arc (
'vacation_approval_wf',
'deleted',
'before_deleted',
'in',
'',
'',
''
'approve',
'before_approved',
'out',
'wf_callback__guard_attribute_true',
'review_reject_p',
'Approved'
);
select workflow__add_arc (
'vacation_approval_wf',
'deleted',
'approved',
'end',
'out',
'',
......@@ -240,8 +240,8 @@ drop function inline_0 ();
select workflow__add_arc (
'vacation_approval_wf',
'enter',
'start',
'approved',
'before_approved',
'in',
'',
'',
......@@ -252,8 +252,8 @@ drop function inline_0 ();
select workflow__add_arc (
'vacation_approval_wf',
'enter',
'before_review',
'deleted',
'end',
'out',
'',
'',
......@@ -264,8 +264,8 @@ drop function inline_0 ();
select workflow__add_arc (
'vacation_approval_wf',
'review',
'before_review',
'deleted',
'before_deleted',
'in',
'',
'',
......@@ -276,24 +276,24 @@ drop function inline_0 ();
select workflow__add_arc (
'vacation_approval_wf',
'review',
'modify',
'start',
'out',
'#',
'in',
'',
'Rejected'
'',
''
);
select workflow__add_arc (
'vacation_approval_wf',
'review',
'before_approved',
'modify',
'before_review',
'out',
'wf_callback__guard_attribute_true',
'review_reject_p',
'Approved'
'',
'',
''
);
......@@ -323,7 +323,7 @@ drop function inline_0 ();
select workflow__add_trans_attribute_map(
'vacation_approval_wf',
'review',
'approve',
'review_reject_p',
1
);
......@@ -364,13 +364,14 @@ insert into wf_context_transition_info
values
('default',
'vacation_approval_wf',
'review',
5,
'approved',
0,
'',
'',
'',
'im_workflow__set_object_status_id',
'16006',
'16000',
'',
'',
'',
'',
......@@ -380,7 +381,6 @@ values
'',
'',
'',
'im_workflow__assign_to_supervisor',
'');
insert into wf_context_transition_info
......@@ -407,13 +407,13 @@ insert into wf_context_transition_info
values
('default',
'vacation_approval_wf',
'approved',
'deleted',
0,
'',
'',
'',
'im_workflow__set_object_status_id',
'16000',
'16002',
'',
'',
'',
......@@ -450,14 +450,13 @@ insert into wf_context_transition_info
values
('default',
'vacation_approval_wf',
'deleted',
0,
'',
'',
'modify',
5,
'',
'im_workflow__set_object_status_id',
'16002',
'',
'16006',
'im_workflow__set_object_status_id',
'16004',
'',
'',
'',
......@@ -467,6 +466,7 @@ values
'',
'',
'',
'im_workflow__assign_to_owner',
'');
insert into wf_context_transition_info
......@@ -493,13 +493,11 @@ insert into wf_context_transition_info
values
('default',
'vacation_approval_wf',
'enter',
'approve',
5,
'',
'',
'',
'im_workflow__set_object_status_id',
'16004',
'',
'',
'',
......@@ -509,7 +507,9 @@ values
'',
'',
'',
'im_workflow__assign_to_owner',
'',
'',
'im_workflow__assign_to_supervisor',
'');
......@@ -539,9 +539,9 @@ insert into wf_context_task_panels
values
('default',
'vacation_approval_wf',
'enter',
'approve',
1,
'Modify Absence',
'Approve Absence',
'/packages/intranet-timesheet2-workflow/www/absences/absence-panel',
'f',
'f',
......@@ -560,9 +560,9 @@ insert into wf_context_task_panels
values
('default',
'vacation_approval_wf',
'review',
'modify',
1,
'Approve Absence',
'Modify Absence',
'/packages/intranet-timesheet2-workflow/www/absences/absence-panel',
'f',
'f',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment