Your SlideShare is downloading. ×
0
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

]project-open[ Workflow Developer Tutorial Part 3

7,183

Published on

Customization, Graphical User Interface, business logic and other advanced topics

Customization, Graphical User Interface, business logic and other advanced topics

Published in: Technology
1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total Views
7,183
On Slideshare
0
From Embeds
0
Number of Embeds
11
Actions
Shares
0
Downloads
104
Comments
1
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. ]project-open[ Workflow Tutorial Part 3: Customization, Graphical User Interface, business logic and other advanced topics Start Place Transition End Transition [Not OK] [OK]
  • 2. Tutorial Overview <ul><li>PO-Workflow-Tutorial-1-Overview.ppt This document provides a short overview of the ]project-open[ workflow. </li></ul><ul><li>PO-Workflow-Tutorial-2-EDI-Example.ppt: The next section guides you step-by-step through a real-world EDI Message workflow scenario. </li></ul><ul><li>PO-Workflow-Tutorial-3-Cusomizations.ppt The third section deals with the customization of the workflow to implement custom business logic, custom GUI panels and custom assignments. </li></ul>
  • 3. Customizing Workflow Panels
  • 4. EDI Message WF Customer Satisfaction Survey <ul><li>According to the business specs from the 1st part of this tutorial, the customer should fill out a customer satisfaction survey to determine the quality of the work. </li></ul><ul><li>In the real world, this survey is used to calculate the bonus of the message development team… </li></ul><ul><li>We are now going to configure this “Simple Survey” as part of the workflow. </li></ul>
  • 5. Default Workflow “Panels” <ul><li>By default, the workflow shows: </li></ul><ul><ul><li>The default Object Panel on the left hand side with the name of the object and its type. </li></ul></ul><ul><ul><li>The default Action Panel with a “Start task” button. The panel will show a “Task done” once the task is started or a yes/no select if this transition was configured as a loop. </li></ul></ul><ul><ul><li>“ Administrative actions” are only shown to users with workflow admin permissions </li></ul></ul><ul><ul><li>The “Journal” contains an audit log of past actions, their time and the person executing them. </li></ul></ul>Object Panel Action Panel
  • 6. Setup Simple Survey <ul><li>Please setup a Simple Survey in Admin -&gt; Simple Surveys similar to the one at the right hand side. </li></ul><ul><li>To test the survey please go to any Project and click on the “Take survey” link in the “Project Surveys” portlet. </li></ul>
  • 7. Set our Simple Survey as Workflow Panel <ul><li>Go to your workflow and select the “Panels” page. It shows a list of WF transitions and their panels. Click on “add panel”. </li></ul><ul><li>The “Header” is used to select the corresponding simple survey. Please make sue the header contains the name of an active simple survey (case sensitive!). </li></ul><ul><li>The /packages/ simple-survey/ www/ one page has been previously enabled to act as a workflow panel. </li></ul><ul><li>“ Override default Action panel” specifies if we want to override the left (object) or the right (action) panel. </li></ul><ul><li>Setting “Override both panels” to “yes” means that our Simple Survey panel will override both panels. </li></ul>
  • 8. Workflow Transition with Customer Satisfaction Survey <ul><li>The finished custom panel shows the working Customer Satisfaction Survey. </li></ul><ul><li>Pressing “Continue” will automatically finish the workflow task. This behavior has been coded into the /package/ simple-survey/ www/ process-response.tcl page. </li></ul>
  • 9. Create Your Own Panel <ul><li>Any valid TCL page can be used as a workflow panel, if it complies with some conventions: </li></ul><ul><ul><li>The page should return a simple piece of HTML without &lt;HTML&gt;, &lt;HEAD&gt; and &lt;BODY&gt; tags, so you want to disable the ]po[ header in general. </li></ul></ul><ul><ul><li>The page should not include a ad_page_contract. </li></ul></ul>&lt;!-- /packages/intranet-workflow/www/panels/hello-world.tcl --&gt; &lt;h1&gt;Hello World&lt;/h1&gt; &lt;p&gt;The following list shows all entries in the &amp;quot;task&amp;quot; hash available.&lt;/p&gt; &lt;table&gt; @debug_html;noquote@ &lt;/table&gt; # /packages/intranet-workflow/www/panels/hello-world.tcl # Show al l available task information set debug_html &amp;quot;&amp;quot; foreach var [array names task] { set val $task($var) append debug_html &amp;quot;&lt;tr&gt;&lt;td&gt;$var=&lt;/td&gt;&lt;td&gt;$val&lt;/td&gt;&lt;/tr&gt; &amp;quot; } ad_return_template
  • 10. Other Existing WF Panels <ul><li>The following pages have been prepared to </li></ul><ul><li>act a workflow panels: </li></ul><ul><li>Hello World example &amp; tutorial: /packages/ intranet-workflow/ www/ panels/ hello-world </li></ul><ul><li>Absences: /packages/ intranet-timesheet2-workflow/ www/ absences/ absence-panel </li></ul><ul><li>Tickets: /packages/ intranet-helpdesk/ www/ new </li></ul><ul><li>Simple Surveys (uses the panel header as name of the survey to show): /packages/ simple-survey/ www/ one </li></ul><ul><li>Expense Bundles: /packages/ intranet-expenses/ www/ bundle-new </li></ul><ul><li>Timesheet Hours: /packages/ intranet-timesheet2-workflow/ www/ conf-objects/ conf-obj-panel </li></ul>
  • 11. Simple Status Reporting
  • 12. Inform the PM About the Status <ul><li>The objective of status reporting is to tell stakeholders quickly about the progress of the workflow. </li></ul><ul><li>One simple option is reporting via the underlying business object: The WF update the status of the business object, and this status is shown in the ]po[ GUI. </li></ul><ul><li>The screenshots at the right hand side shows how the project status is reported: </li></ul><ul><ul><li>In the “Projects” page, the status of each main project is shown. This is useful, if the workflow is associated with a top-level projects. </li></ul></ul><ul><ul><li>The 2nd screenshot shows the “Project Hierarchy” portlet of a project with the status of its sub-projects. This is useful if the workflow is associated with sub-projects, as it is the case in the EDI Message development example. </li></ul></ul>
  • 13. Business Object Status Updates <ul><li>Every workflow stage can update the status of the underlying business object. Examples: </li></ul><ul><ul><li>Approval workflows: The object’s status is set to “accepted” or “rejected” depending on workflow decisions </li></ul></ul><ul><ul><li>Lifecycle workflows: The workflow controls the lifecycle of an object (EDI Message WF). </li></ul></ul><ul><li>The diagram at the right hand side shows an example on how the status of an EDI Message project could be updated from a workflow </li></ul>Analysis Developing QC Checking Getting UA Deployed Maintenance Business Object Status
  • 14. Status Reporting: How to Implement <ul><li>Setup a new Category Example: Project status: “Analyzing” </li></ul><ul><li>Make the new category a sub-category of the project status “Open” </li></ul><ul><li>Add a “callback” to the WF transition to update the status </li></ul>
  • 15. Status Reporting: Create a New Category <ul><li>Create a new category of type “Intranet Project Type”. </li></ul><ul><li>After creating the category please “edit” again and select “Open” in the “Is-A” list. This way, the status becomes a sub-status of “Open” </li></ul>
  • 16. Status Reporting: Callbacks to Set the Object State <ul><li>In the WF admin page got to “Graphical Process Editor”, select the desired transition and click on “Actions” to see the screen at the right. </li></ul><ul><li>In the “Enable” callback write “im_workflow__set_object_status_id” and “60000” in the “Custom Argument” field (60000 is the category_id of the new project status “Business Analysis” that we have created in the last step. </li></ul><ul><li>The “Enable” callback is executed _before_ the task is started, so this is the right place to set the status of the project. </li></ul>
  • 17. Computed Assignments: Assign the Project Admin(s) to a Transition
  • 18. Business Case: Assign Project Admins <ul><li>Let’s assume that you want to assign the project administrators to a transition. </li></ul><ul><li>“ Project admins” are users in the “Project Members” component with role “project manager”. </li></ul><ul><li>We will use the “Unassigned Callback” of the transition’s “Action” page to execute a PL/SQL procedure to assign the users. </li></ul>
  • 19. Data-Model: Identify Project Admins <ul><li>How can we assign the project manager of a project to a workflow task? </li></ul><ul><li>The data-model on the right-hand side shows how to identify the “Project Members” of a project and the corresponding SQL query. </li></ul><ul><li>The object_role_id of the im_biz_object_members table identifies the type of relationship between the user and the project. Project Admin relationships are identified by catgory-id = 1301. </li></ul>im_projects <ul><li>project_id </li></ul><ul><li>project_name </li></ul><ul><li>… </li></ul>wf_cases <ul><li>case_id </li></ul><ul><li>workflow_key </li></ul><ul><li>object_id </li></ul>cc_users <ul><li>user_id </li></ul><ul><li>username </li></ul><ul><li>first_names </li></ul><ul><li>last_name </li></ul><ul><li>… </li></ul>acs_rels <ul><li>rel_id </li></ul><ul><li>rel_type </li></ul><ul><li>object_id_one </li></ul><ul><li>object_id_two </li></ul>im_biz_object members <ul><li>rel_id </li></ul><ul><li>object_role_id </li></ul>im_categories <ul><li>category_id </li></ul><ul><li>category </li></ul><ul><li>category_type </li></ul>=1301 select r.object_id_two as user_id, im_name_from_user_id(r.object_id_two) as name from wf_cases wfc, im_projects p, acs_rels r, im_biz_object_members bom where wfc.object_id = p.project_id and r.object_id_one = p.project_id and r.rel_id = bom.rel_id and bom.object_role_id = 1301;
  • 20. Data-Model: Identify Project Admins <ul><li>The PL/SQL procedure will assign project admins to the current task, there was no manual or static assigments. </li></ul><ul><li>The procedure is part of ]po[ and available in /packages/ intranet-workflow/ sql/ postgresql/ workflow- callback- procs.sql </li></ul>create or replace function im_workflow__assign_to_project_admins (integer, text, text) returns integer as &apos; declare p_case_id alias for $1; p_transition_key alias for $2; p_custom_arg alias for $3; v_task_id integer; v_case_id integer; v_creation_ip varchar; v_creation_user integer; v_object_id integer; v_object_type varchar; v_journal_id integer; v_transition_key varchar; v_workflow_key varchar; row RECORD; begin -- Select out some frequently used variables of the environment select c.object_id, c.workflow_key, task_id, c.case_id, co.object_type, co.creation_ip into v_object_id, v_workflow_key, v_task_id, v_case_id, v_object_type, v_creation_ip from wf_tasks t, wf_cases c, acs_objects co where c.case_id = p_case_id and c.case_id = co.object_id and t.case_id = c.case_id and t.workflow_key = c.workflow_key and t.transition_key = p_transition_key; FOR row IN select r.object_id_two as user_id, im_name_from_user_id(r.object_id_two) as user_name from wf_cases wfc, im_projects p, acs_rels r, im_biz_object_members bom where wfc.case_id = v_case_id and wfc.object_id = p.project_id and r.object_id_one = p.project_id and r.rel_id = bom.rel_id and bom.object_role_id = 1301 LOOP v_journal_id := journal_entry__new( null, v_case_id, v_transition_key || &apos;&apos; assign_to_user &apos;&apos; || row.user_name, v_transition_key || &apos;&apos; assign_to_user &apos;&apos; || row.user_name, now(), v_creation_user, v_creation_ip, &apos;&apos;Assigning to &apos;&apos; || row.user_name ); PERFORM workflow_case__add_task_assignment(v_task_id, row.user_id, &apos;&apos;f&apos;&apos;); PERFORM workflow_case__notify_assignee (v_task_id, row.user_id, null, null, &apos;&apos;wf_&apos;&apos; || v_object_type || &apos;&apos;_assignment_notif&apos;&apos;); END LOOP; return 0; end;&apos; language &apos;plpgsql&apos;;
  • 21. Notifications and Emails
  • 22. Notifications Background <ul><li>Workflow Notifications are a very sensitive subject, because of the profile of the notified users (managers, customers and employees) </li></ul><ul><li>Too many notifications are considered intrusive and may cause strong emotional reactions. </li></ul><ul><li>The problem appears particularly if many users are assigned to a transition, because only one of the users will actually perform the WF task. </li></ul><ul><li>Only users “assigned” to a WF task may actually start a WF task (unless they are WF administrators). For this reason we need to assign all users who might(!) want to execute the task. </li></ul>
  • 23. Static and Manual Assignment Notifications <ul><li>A callback exists to </li></ul><ul><li>Transitions assigned to users via static and manual assignments can be </li></ul>
  • 24. Notification Computed Assignments <ul><li>The computed assignment procedures automaticll </li></ul>
  • 25. Various Hints
  • 26. Changing the size of the WF Component <ul><li>Are the workflow in the “Project WF Graph” portlet too large or too small for your typical workflows? </li></ul><ul><li>In Admin -&gt; Parameters -&gt; intranet-workflow you can modify the size of the workflow graphs. </li></ul>
  • 27. Notifications for late Transitions <ul><li>Complicated solution: Add timeout logic to each of the transitions. This would clutter the WF a lot… </li></ul><ul><li>Better solution: Create a report that lists all late WF transitions and add a “batch-action” to send out mass-emails to the users with late transitions. </li></ul>
  • 28. &nbsp;
  • 29. &nbsp;
  • 30. &nbsp;
  • 31. &nbsp;
  • 32. Portlet Integration Project View Page (TCL) Project Base Data Finance Info Project Hierarchy Forum im_component_plugins <ul><li>plugin_id - 12345 </li></ul><ul><li>plugin_name - Forum </li></ul><ul><li>package_name - intranet-forum </li></ul><ul><li>sort_order - 20 </li></ul><ul><li>page_url - /intranet/index </li></ul><ul><li>location - right </li></ul><ul><li>component_tcl - … </li></ul><ul><li>enabled_p - t </li></ul>im_forum_component -user_id $user_id -forum_object_id $project_id -current_page_url $current_url -return_url $return_url -forum_type &amp;quot;project&amp;quot; component_tcl user_id = $user_id forum_object_id = …
  • 33. &nbsp;
  • 34. Workflow Notifications <ul><li>Option 1: Use “im_workflow__assign_to_group” + group name in the “Unassigned Callback” of a transition </li></ul><ul><li>Option 2: Notification Callback Check Google… </li></ul>
  • 35. Frequently Used Assignment Callbacks <ul><li>assign_to_owner – assign the task to the business object’s creator </li></ul><ul><li>assign_to_supervisor – assign the task the supervisor of the business object’s creator </li></ul><ul><li>assign_to_group – assign to the members of a particular group </li></ul>
  • 36. Linear vs. Real-World Workflows <ul><li>asdf </li></ul>Linear version of the EDI Message workflow. Start Business Analysis End Check Specs [Not OK] [OK] Develop Message QC Check [OK] [Not OK] QA Release to Production [OK] 30 days Maintenance [OK] [Not OK] User Acceptance [OK] [OK] [Not OK] [Not OK] [Not OK] User Survey [OK] Resource Assignment

×