Adobe Enterprise Technical Enablement Assigning Tasks to Users in a Process In this topic, you will learn how to assign process tasks to users and use the same data on different forms. Objectives After completing this unit, you should be able to • Implement an Assign Task operation in a process • Understand the categories associated with the Assign Task operation Concepts In this topic, you will learn about the following concepts • Using the Assign Task operation Copyright © 2011 Adobe Systems Incorporated 1 Using the Assign Task operation • The Assign Task operation is used to assign a task to a user or group involved in a process ■ Located in Process Management > User - 2.0 Figure 1: Locating the Assign Task operation of the User service 2 Copyright © 2011 Adobe Systems Incorporated Assign Task property categories • Many properties are configurable for the Assign Task operation • The properties are grouped into categories in the Process Properties view Figure 2: The Assign Task property categories General category • Enter the name and description of the Assign Task operation Figure 3: The General category Copyright © 2011 Adobe Systems Incorporated 3 Initial User Selection category • Identifies to whom the task is assigned • Can specify the user in several ways ■ Specify User: Browse for a user that is stored in User Manager ■ Process Creator: The user who initiated the process ■ Group: Browse for a group that is stored in User Manager – Assign to group queue or random user in group ■ XPath Expression: Use an expression that evaluates to a user or group – The identifier must be stored in the process data, such as in a process variable or in form data Figure 4: The Initial User Selection category 4 Copyright © 2011 Adobe Systems Incorporated Task Instructions category • Enter a description that informs users what they must do to complete the task Figure 5: The Task Instruction category • Four options are available when creating the task instructions ■ Template: Specifies that the instructions are based on a combination of strings entered in the box below and XPath expressions wrapped in {$...$} symbols ■ Literal value: Specifies that the instructions will be displayed as typed in the box ■ Variable: Displays contents of the selected variable ■ XPath expression: Specifies that the instructions will be displayed based on a string from an XPath expression • Can use variables to have the instructions tailored to individual processes • When using the Template selection, surround any XPath expressions with {$ $} blocks ■ No special indicators needed for string literals • Use XPath Builder to drill down through the data tree • The resulting expression appears in Workspace with values for the variables displayed Figure 6: The task instructions displayed in the Workspace Copyright © 2011 Adobe Systems Incorporated 5 Workspace User Interface category • Properties for specifying which task tools appear in Workspace when users open the task • Three options available ■ Default - Select to display the standard Workspace features ■ Approval Container – Select to display features for reviewing documents – Users can see the status of the review, add comments, and see the instructions – Typically only used with the Assign Multiple Tasks operation ■ Custom - Select to display a custom Workspace developed using the ADEP Document Services SDK • UI Options are used to specify how the form is opened ■ Must open the form to complete the task – Select when users must open the task before completing it – If not selected, users can complete the task without opening the form Figure 7: Task completed without opening form ■ Open the form in maximized mode - Select to display the form using all the available space in the web browser window Figure 8: The Workspace User Interface category 6 Copyright © 2011 Adobe Systems Incorporated Presentation & Data category • Properties for displaying an asset to users • To specify the type of file to display, select one of the following options ■ Use An Application Asset - Select to display an application asset, such as a form or Guide, to the user ■ Use A Document Variable - Select to display the document that is stored in a document variable • Application Asset properties are used to specify the asset and data to display to users ■ Asset - The presentation asset to display to the user ■ Action Profile – The action profile to use with the asset – Action profiles determine how the asset will be rendered to the user – Example - you want to prepopulate a form before display to the user ■ Initial Task Data - The data to merge with the asset • Reader Submit properties are configured if the users open tasks using Adobe Reader ■ Submit Via Reader – Select if users open and submit tasks using Adobe Reader – When selected, a submit button is displayed in Workspace – If users open tasks using Acrobat Professional and Acrobat Standard, the PDF form includes one or more submit buttons – Workspace detects the buttons and displays them accordingly ■ Submit As - If Submit Via Reader is selected, specify the type of data that is submitted when users complete their tasks Figure 9: The Presentation & Data category Copyright © 2011 Adobe Systems Incorporated 7 User Actions category • • • • • User actions determine actions that users can select when they complete tasks in Workspace When an action is selected by the user in the Workspace, a specific route is followed A confirmation message can also be displayed (optional) Actions appear in Workspace in the order that they appear in the action list Buttons exist to create, modify, and order the actions Figure 10: The User Actions category Figure 11: User Actions appear as buttons in the Workspace • The Action Properties dialog box exposes the following properties ■ Action Name - The name of the action that appears in Workspace 8 Copyright © 2011 Adobe Systems Incorporated ■ Destination - The operation that executes when the action is clicked ■ This action needs confirmation, and will use the following text as the message - Select to display a message box to the user when they click the action Figure 12: Creating a new user action Copyright © 2011 Adobe Systems Incorporated 9 Output category • Properties for storing the data that is sent to the server when users complete tasks • Saving the data is necessary if you want to use the data later in the process • Output category has several key properties ■ Task Result – The location in the process data model to store the submitted task data – This value contains information such as the field data from the form or Guide, the submit option that was selected, and task attachments – Example - for a task assigned to a group, this variable could be used to determine which user in the group completed the task ■ Output Data - The location to store the field data that was submitted with the task Note: For a complete description of the output properties, check the Workbench help. Figure 13: The Output category 10 Copyright © 2011 Adobe Systems Incorporated Reminders category • Configure reminders that are sent to the task owner • Ability to send an initial reminder and then repeat the reminder at a specified frequency • A business calendar can be used so business days instead of calendar days are used to calculate reminder dates Figure 14: The Reminders category Copyright © 2011 Adobe Systems Incorporated 11 Escalation category • Identify whether to assign the task to a different person after a certain period of time passes after the task is initially assigned Figure 15: The Escalation category 12 Copyright © 2011 Adobe Systems Incorporated Deadline category • Sets a deadline on a task to limit the amount of time that users are given to complete the task • After the deadline period elapses, the task state is automatically set to complete • Optionally, the process can continue using a route that follows the task on the process diagram Figure 16: The Deadline category Copyright © 2011 Adobe Systems Incorporated 13 Task 1: Assigning tasks to users In this task, you will perform the following • • • • • • • • • • • • Add an Assign Task operation to the process Assign a task to John Jacobs Add task instructions Configure the Workspace user interface Configure the presentation and data to display Configure the user actions Capture the output data Set a reminder Test the process Complete the expense report process Perform final testing Optional testing Setup 1. Import Assigning_Tasks.lca. Steps Add an Assign Task operation to the process 1. 2. 3. 4. 5. 6. 7. 8. 9. Login to the Workbench. Open the Assigning_Tasks application. Expand the Processes folder, right-click the Expense_Report process and select Check Out. Double-click the Expense_Report process to open it. Right-click the Review Expense Report operation and select Define Activity. In the Define Activity dialog box, enter assign task in the Find field. Select the Assign Task operation of the User - 2.0 service and click OK. If you are prompted to change from a short-lived to a long-lived process, click Yes. When prompted to replace Review Expense Report with Assign Task, click Yes. Assign a task to John Jacobs 10. 11. 12. 13. 14 From the Process Properties view, open the Initial User Selection category. Click the Assign to specific user radio button. Click the Browse... button. Select John Jacobs from the results and click OK. Copyright © 2011 Adobe Systems Incorporated Add task instructions 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. Open the Task Instructions category. For the format of the Task Instructions select template. In the area for the template, enter the text Name:<br><b>. Click the Insert Expression... button to open the XPath Builder. Drill down through the process_data node and double-click on the /process_data/xmlData/ xdp/datasets/data/Expense/txtEmployeeName node. Click OK to insert the XPath expression into your template. Add </b></p> to the end of the expression and press the return key. Enter the text Amount:<br><b>. Click the Insert Expression... button to open the XPath Builder. Select the Functions heading and expand the Number Functions node. Double-click the number(object?) function to add it to the expression. Remove the word object? that is the default argument of the function. Select the Process Data heading and as the argument of the function, drill down and select the /process_data/xmlData/xdp/datasets/data/Expense/numGrandTotal node. Click OK to insert the XPath expression into your template. Add </b></p> to the end of the expression. Check to be sure the entire expression built is as follows Name:<br><b>{$/process_data/xmlData/xdp/datasets/data/ Expense/txtEmployeeName$}</b></p> Amount:<br><b>{$number(/process_data/xmlData/xdp/datasets/ data/Expense/numGrandTotal)$}</b></p> Configure the Workspace user interface 30. Open the Workspace User Interface category. 31. Make sure the Default option is selected. 32. The Must open the form to complete the task should not be selected. Configure the presentation and data to display 33. 34. 35. 36. Open the Presentation & Data category. Select use an application asset. In the application asset section, click on the ellipsis button next to the Asset property. Drill down to Assigning_Tasks > Assigning_Tasks/1.0 > Forms and select the ExpenseReview form. 37. Click OK. 38. For the Initial Task Data, select xmlData from the drop down list. Configure the user actions 39. Open the User Actions category. Copyright © 2011 Adobe Systems Incorporated 15 40. Click the plus button to create a user action with the following properties. • Action Name: Approve • Destination: Check Amount 41. Click OK. 42. Create another user action with the following properties. • Action Name: Reject • Destination: Expense Report Rejected 43. Click OK. Capture the output data 44. Open the Output category. 45. Set the Output data property to xmlData. Set a reminder 46. Open the Reminders category. Note: If the Reminders category is not displayed, click the All button at the top of the Process Categories dialog. 47. Check the Enable first reminder checkbox and set a reminder for 2 minutes. Test the process 48. Save the process and deploy the application. 49. Using Notepad, open the sampleData.xml file located at C:\AdobeTraining\Doc_Services\Process_Management\Assigning_Tasks. 50. Select all of the text (Ctrl-a) and copy it to the clipboard (Ctrl-c). 51. Right-click an empty area of the process diagram and select Invoke Process.... 52. When prompted to enter a value for the xmlData input parameter, click the ellipsis button and paste the contents of the clipboard (Ctrl-v) into the dialog. 53. Click OK. 54. When the invocation returns a job-id, click OK. 55. Login to the Workspace using the following credentials. • User ID: jjacobs • Password: password 56. Click the To Do icon. 57. Confirm there is an expense report from Sarah Rose in the amount of 800. 58. Click the process card to open it. 59. Confirm the expense report form is populated with data. 60. Click the Approve button. 16 Copyright © 2011 Adobe Systems Incorporated Complete the expense report process 61. Using Workbench, right-click the Expense Report Approved operation and define it as an Assign Task operation. 62. Set the following properties of the Expense Report Approved operation. • Initial User Selection: Assign to process initiator • Task Instructions (literal value): Your expense report has been APPROVED • Presentation & Data ■ Asset: ExpenseNotify.pdf ■ Initial Task Data: xmlData 63. Right-click the Expense Report Second Review operation and define it as an Assign Task operation. 64. Set the following properties of the Expense Report Second Review operation. • Initial User Selection: Kara Bowman • Task Instructions (template): Copy from the Review Expense Report operation • Presentation & Data ■ Asset: ExpenseReview.pdf ■ Initial Task Data: xmlData • User Actions ■ Approve --> Set Review Date ■ Reject --> Expense Report Rejected • Output (Output data): xmlData 65. Right-click the Expense Report Rejected operation and define it as an Assign Task operation. 66. Set the following properties of the Expense Report Second Review operation. • Initial User Selection: Assign to process initiator • Task Instructions (literal value): Your expense report has been REJECTED • Presentation & Data ■ Asset: ExpenseReport.pdf ■ Initial Task Data: xmlData • Output (Output data): xmlData Perform final testing 67. Save the process and deploy the application. 68. Right-click an empty area of the process diagram and select Invoke Process.... 69. When prompted to enter a value for the xmlData input parameter, click the ellipsis button and paste the contents of the clipboard (Ctrl-v) into the dialog. 70. Click OK. 71. When the invocation returns a job-id, click OK. 72. Login to the Workspace using the following credentials. • User ID: jjacobs • Password: password Copyright © 2011 Adobe Systems Incorporated 17 73. 74. 75. 76. 77. 78. 79. Click the To Do icon. Confirm there is an expense report from Sarah Rose in the amount of 800. Double-click the process card to open it. Confirm the expense report form is populated with data. Click the Approve button. Logout of the Workspace. Login to the Workspace using the following credentials. • User ID: administrator • Password: password 80. Click the To Do icon. 81. Confirm that there is notification that the expense report has been approved. Optional testing 82. Invoke the process again. Edit the numGrandTotal value in the XML data so it is greater than 10000. 83. Confirm that the expense report is routed to the Expense Report Second Review operation. 18 Copyright © 2011 Adobe Systems Incorporated Summary • The Assign Task operation is used to assign a task to a user or group involved in a process ■ Many categories of properties can be configured for the operation ■ Categories include – Initial User Selection – Task Instructions – Presentation & Data – User Actions – Output – Reminders Copyright © 2011 Adobe Systems Incorporated 19 Review 1. When using the Assign Task operation, to whom can the task be assigned? 2. What is the purpose of the output data parameter? 3. How are users notified when they are assigned a task? Adobe Systems Incorporated 345 Park Avenue San Jose, CA 95110-2704 USA www.adobe.com Adobe, Acrobat, Adobe AIR, AIR, Distiller, Flash, Flash Builder, Flash Catalyst, Flex, Adobe Digital Enterprise Platform, MXML, PostScript, Reader, SiteCatalyst, SearchCenter, Discover, Recommendations, Insight, Test&Target, ReportBuilder, Survey, Search&Promote, and Social Media are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. © 2011 Adobe Systems Incorporated. All rights reserved.