Commit 55a370a8 authored by Frank Bergmann's avatar Frank Bergmann

- renamed workflow creation script

parent 24006817
/*
* 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',
'deleted',
'Deleted',
4
);
select workflow__add_role (
'timesheet_approval_wf',
'approve',
'Approve',
2
);
select workflow__add_role (
'timesheet_approval_wf',
'approved',
'Approved',
3
);
select workflow__add_role (
'timesheet_approval_wf',
'modify',
'Modify',
1
);
/*****
* Transitions
*****/
select workflow__add_transition (
'timesheet_approval_wf',
'modify',
'Modify',
'modify',
1,
'user'
);
select workflow__add_transition (
'timesheet_approval_wf',
'approve',
'Approve',
'approve',
2,
'user'
);
select workflow__add_transition (
'timesheet_approval_wf',
'approved',
'Approved',
'approved',
3,
'automatic'
);
select workflow__add_transition (
'timesheet_approval_wf',
'deleted',
'Deleted',
'deleted',
4,
'automatic'
);
/*****
* Arcs
*****/
select workflow__add_arc (
'timesheet_approval_wf',
'approve',
'start',
'out',
'#',
'',
'Timesheet Not OK'
);
select workflow__add_arc (
'timesheet_approval_wf',
'approve',
'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',
'approve',
'before_confirm_hours',
'in',
'',
'',
''
);
select workflow__add_arc (
'timesheet_approval_wf',
'approved',
'end',
'out',
'',
'',
''
);
select workflow__add_arc (
'timesheet_approval_wf',
'approved',
'before_confirmed',
'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',
'modify',
'before_confirm_hours',
'out',
'',
'',
''
);
select workflow__add_arc (
'timesheet_approval_wf',
'modify',
'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',
'approve',
'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',
'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',
'approved',
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',
'modify',
5,
'',
'',
'',
'im_workflow__set_object_status_id',
'17000',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'im_workflow__assign_to_owner',
'');
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',
'approve',
5,
'',
'',
'',
'im_workflow__set_object_status_id',
'17020',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'im_workflow__assign_to_supervisor',
'');
/*
* 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',
'approve',
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',
'modify',
1,
'Modify Logged Hours',
'/packages/intranet-timesheet2-workflow/www/conf-objects/conf-obj-panel',
'f',
't',
'f');
commit;
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