Lab #12 Page 1 of 9 - ActiveVOS Fundamentals ActiveVOS Fundamentals Lab #12 Adding a People Activity to the Process
Lab #12 Page 2 of 9 - ActiveVOS Fundamentals Lab Plan In this lab we will add a Human Participant to the Retailer process. A people activity is a Task that is executed using a worklist, as defined by the WS-HT specification. Lab Prep Before starting make sure that you: - Make sure you have completed labs 8-11. Lab Steps A. Add a Human Participant to the process The next participant in this process will be a Human Participant. Human Participants are a way to allow people to interact with a running process by performing a Human Task. This makes the Human Participant a bit different than the other participants we ve used. Before we can add a People activity, which connects human implemented work items to the automated execution of the process, we need to do some verification and setup work. 1. First, we have to verify the Identity Service. We will see that Human Tasks require Users or Logical People Groups to be assigned to the Task. To manage this support the ActiveVOS Designer uses an Identity Service that is defined on the Server console. Before we can use a People activity that executes a Task, we need to make sure that the Identity Service is properly defined, enabled and has the correct Users and Groups for use by our process. We ll use a simple text file for the Identity Service here, but in production you ll most likely use some type of Identity Service that is defined in a database or accesses a directory such as Active Directory or LDAP. a. Navigate to the Server s Install folder. If installed on the C: drive it will be here: C:\ActiveVOS_Designer\Designer\designer\ Note: this path varies by version! plugins\org.activebpel.enginep_9.0.x\server\conf b. There is a file called tomcat-users.xml in the install directory s Conf folder. This file contains the Users and Groups we ll be using when we execute our process. This file is only provided so that you can use it in training and for the tutorials.
Lab #12 Page 3 of 9 - ActiveVOS Fundamentals c. Start (or restart) the Server and open the ActiveVOS Server Administration Console. d. Click on the Admin link and then the Identity Service link. e. Check the Enable checkbox if it is not enabled. (This turns on the service.) f. File Location on server: has the path to the file. (This uses URN mappings.) g. Test the Identity Service by clicking on the Test tab and then entering Reviewer1. Click on Test Settings. NOTE: References to the User and Group names are case-sensitive. 2. For human interaction with the process, we first create the Human Task Participant. This is the User or Group who will do the work of the task. Later we ll define the Assignments that determine who is eligible do the work of the task. The Task itself is sent to the person or group s inbox, then one person from the group claims it and at that point they have responsibility for it and must complete the task. The task result is returned to the process in the People activity s response message. a. Go to Participant s view and select the Human Task Participants node. b. Open the context menu and select New Human Task Participant. This creates a new participant called Role1. c. Select Role1 and in the Property view and rename it Reviewers. 3. We just defined a Group of Users to assign to the task, so next we have to define the actual Task that the users will complete. Tasks are defined by their Input and Output, just like any other partner invocation. In this case, the task is to review the customer s order before we send it on to the order management system to be filled.
Lab #12 Page 4 of 9 - ActiveVOS Fundamentals a. In Outline view, go to the Human Interactions / Tasks node. This node was added when we created the Human Task Participant in the previous steps. b. Right-click on the node and select Add / Human Interaction / Human Task. c. Because our process only sees web services, we need to create a new WSDL front end for this task. On the Human Task dialog, click on Generate Interface. d. This will open the New Interface Wizard. On the first screen, we are creating a Request-Response invoke, using XML Schema definitions we imported earlier to define the input and output. Accept all defaults and click Next. Element reference Element definition Droplist f. In the Input from Schema dialog, navigate to CustomerOrder.xsd g. Using the Choose an Element: droplist, select the customerdata element. The element reference and definition look like this: <xs:element name="customerdata" type="tns:customerdata" /> <xs:complextype name="customerdata"> <xs:sequence> <xs:elementname="creditcheckresult" type="xs:string"/> <xs:element ref="tns:header" /> <xs:element ref="tns:items" /> </xs:sequence> </xs:complextype> h. Click Next. i. For Output choose the Element orderreviewresult. The element reference/definition looks like this: <xs:element name= orderreviewresult type= xs:string />
Lab #12 Page 5 of 9 - ActiveVOS Fundamentals j. Click Next. k. The Operation screen appears. Enter the following: PortType: PeoplePortType Operation: ReviewOrder Target Namespace: http://schemas.active-endpoints.com/sample/orderreview/2010/orderreview.wsdl l. Click Next. m. On the Save Interface screen, save it as People.wsdl in the WSDL folder. n. Click Finish. o. In the Human Task dialog name the newly created task ReviewOrder. p. Select the PeoplePortType s ReviewOrder operation (not the porttype!) q. Click OK. You re automatically brought to the Properties view for the newly created task. Check that the Interface reference is filled in. r. Give the task a Priority of 1. Recall that tasks are sorted by priority, with zero being the highest. 4. Now we ll define the Task Presentation, which is how the task is displayed to Reviewers when they log in to their inboxes. a. Select the task in the Outline view and in Properties click the Presentation tab. b. Add a Display Name: of Order for Review. c. Click on the ellipsis button to the right of the Subject: field. d. Click the Add button and add two parameters that are defined like this:
Lab #12 Page 6 of 9 - ActiveVOS Fundamentals What data the Parameter displays in the user s Inbox. Use the Expression Builder to create a reference to it. Parameter name, just type it in. Parameter data type, choose from the list. These parameters are simply variables that we can insert into the Presentation of the Task, enclosed by curly braces. Parameters insert specific data points into the Display and/or the Subject to make it easier for Users to distinguish among different tasks, which would otherwise all look exactly the same. Click OK. e. Next we have to insert the parameters into the Subject: text of the Task, using the syntax shown below. We ll see these parameters displayed when we log into the ActiveVOS Central Inbox to complete the task. 5. Now we set the Assignments, which determine who can claim and work on the task. Everyone in the assignment group will see the task in their inbox, until one of them claims it, thus taking ownership, which makes it disappear from all other inboxes. The owner will then be responsible for completing the task. At a minimum, we are required to assign both Potential Owners and a Business Administrator. a. Click the Assignment tab, then click in the Value field for Potential Owners. b. Click the ellipsis button to open the Role: Potential Owners dialog. c. Select Logical People Group in the Type: droplist, then choose Reviewers. NOTE: You can also assign a specific User or list of Users by name (select the Literal option) or choose Users or Groups by using any legal sub-language Expression (select the Expression option.)
Lab #12 Page 7 of 9 - ActiveVOS Fundamentals d. Click OK. e. Repeat the same Assignment for the Business Administrator. 6. The last thing we have to do is to set the Renderings for the task, which control how the XML input and output that define the task are formatted when the task is opened from ActiveVOS Central or another, similar application. The renderings are HTML files that can be customized to give you the look and feel you want. By default, you will see the schema data that was passed in as Input rendered in HTML. Once the HTML files are created by ActiveVOS, they can be customized in any way that is appropriate to your needs. a. Select the Renderings tab. Note: Development mode means that the HTML file will not be deployed to the server, but will be kept locally and then referenced by the server. This means that after the process is deployed, you can log into ActiveVOS Central, open the task and see how the renderings look. Changes to the HTML can be saved and then the browser refreshed to see the changes instantly, creating an interactive development environment, without the need to re-deploy to see each change. b. Click the Create Form button.
Lab #12 Page 8 of 9 - ActiveVOS Fundamentals c. Accept the default filename of ReviewOrder.html, make sure that you save it in the form folder and click OK. d. The html form editor opens. On the top is the Form view and on the bottom is the HTML source code view. Clicking anywhere in the Form brings you to that point in the source code (and vice-versa), because the two views are synchronized. To access HTML widgets, open the Palette and drag and drop them into the HTML Form View. To display the HTML as it will be seen in the browser, click the Preview tab.
Lab #12 Page 9 of 9 - ActiveVOS Fundamentals e. Close the html file. 7. We have a People participant defined (i.e., who will be assigned the task), we have a task to complete (i.e., what they will do), so to complete this section we just need to create a People activity, which connects the execution of the task to the execution of the process. From the process point of view, the Task is just another service to be invoked. The only difference is that it is invoked using a People activity. a. Drag a User task from the Task tray of the palette to the canvas. Drop it after the Run Credit Check invoke. b. Name it Review the Order and set the Type: as Local Task. c. Select ReviewOrder as the Definition if it isn t already selected. d. For Input, create three XPath copies that look like the screenshot below. e. For Output, create a variable named ReviewOrderResponse. f. Save your completed process. There will be an error in the PDD file. Ignore that for now, we will fix it in a later lab.