MAIN arrow Tutorials-5.1 arrow Designing Processes with People Activities with Intalio|BPMS 5.0 (Intermediate)

Designing Processes with People Activities with Intalio|BPMS 5.0 (Intermediate)

Print E-mail

In this tutorial, we explain how to design a business process that creates a people activity. This tutorial follows the tutorial "Creating forms to support people activities with the Form Editor" and assumes that the form created in that tutorial is accessible.

You may also be interested in looking at our screencast that shows how to create people activities on a slightly different example.

 

This tutorial requires version 5.0.

In the previous tutorial, we have created a form that can be used to support a "People Activity", we will now create a process that can creates such an activity for a user to perform it and return information back to the process.

Process Model

First, let's model the process diagram.

Go to File > New > Business Process Diagram and create a new file "PA.bpm" in your project. In this tutorial, we will assume that the project is called PeopleActivity and the PA.bpm file is at the same location where the PA.xform form was created. Note that there is no requirement for the diagram to be located in the same folder as the form, they only need to be in the same project.

You may rename the pool that is created. Here we will call the pool "PA". The Task shape can be kept and reused later or deleted. Here we will assume it is deleted. To delete it, simply select it and press the Delete key.

Before our process may create a people activity, it needs to be started.

  1. Create a Message Start Event in the pool. You may rename it "Start".
  2. Create a new Task (or reuse the original one if you have not deleted it) and rename it "Create People Activity".
  3. Create a new Task shape and rename it "Complete People Activity".
  4. Create an Empty End Event.
  5. Create links between each task so that the "start" activity transitions to the "Create People Activity" to the "Complete People Activity" and finally to the empty end event shape as in the screenshot below:

1-pa_model.jpg

Before we continue to model the business process, let's explain why we have created to task shapes "Create People Activity" and "Complete People Activity". These two shapes will handle one single people activity. The first one - Create People Activity - consists in creating the people activity. When this task is performed, a new people activity is created and authorized users should see it in their task list. The Complete People Activity task is for receiving the information the user will submit. This may happen right after the people activity is created or a long time later. In between, the process may perform several tasks if necessary. The creation and the completion of a people activity are decoupled. This is essentially why we use 2 different shapes for one single people activity. There are other technical reasons as well that we will explain later in this tutorial.

Now we need to define the interactions between our process and a user who should perform the people activity.

  1. Create a new pool to represent the user who will perform the people activity. We will rename this new pool as "User".
  2. Drag-and-drop the form PA.xform from the Process Explorer into the User pool. This opens a contextual menu.
  3. In the contextual menu that pops up, select "Make 'create and complete' task for PA form". This automatically creates two task shape called "PA-create" and "PA-complete"
  4. Create a message link first from "Create People Activity" to "PA-create", and then another message link from "PA-create" back to "Create People Activity".
  5. Create a message link first from "PA-complete" to "Complete People Activity", and then another message link from "Complete People Activity" back to "PA-complete".

If you have followed all the above instructions, your process should now look like the following (you can click the Autosize tool to automatically resize selected shape(s) to the default size):

2-pa_model_with_user.jpg

Intalio|BPMS Workflow requires the "Create People Activity" and "Complete People Activity" to be "two-way operations". It is not sufficient to create just one link from "Create People Activity" to "PA-create", for instance. The response that is sent back provides the ability for the process to know whether the people activity was successfully created or not, and potentially act upon it.

Finally, we need some kind of event to start our process if we ever want to deploy and run it. We will leverage the Web Service Invocation tool in Intalio|BPMS Console t o start this process. However, for this to work, we need to model the fact that some other participant will start the process.

  1. Create a new pool. Let's call it "Start".
  2. Create a new task in the "Start" pool and rename it "Start PA Process".
  3. Create a message link from "Start PA Process" to "Start" in the PA pool as in the screenshot below:

3-pa_model_with_start.jpg

The process is now fully modeled, let's now implement it.

Process Design

Let's now see how to actually integrate the PA form to support this interaction. We will need to do the following:

  • mark the Start and User pools as non-executable
  • define the user(s)/role(s) to whom the task should be assigned.
  • define the task description
  • map data to the form input

Making Pools Non-Executable

We should make sure that the User and Start pools define people participants and not a process participant, which means we should not generate BPEL code for these pools.

  1. Right-Click on the User pool and select 'Set pool non executable'
  2. Right-Click on the Start pool and select 'Set pool non executable'
Both pools now have a different pool background pattern showing that they are non executable.

Defining User(s)/Role(s)

Just like for People Initiating Process Activities, users and roles can be defined in the properties of the user pool:
  1. Select the User pool
  2. In the Properties view, select the Workflow Tab
  3. In the Roles field, type "examples\manager" (without quotes) to use the manager role defined in the "examples" realm.

Defining the Task Description

Now, we need to provide a quick description of the task as it will be displayed in the task list at runtime.

  1. Select the task "PA-create" in the "User" pool.
  2. In the Properties view, select the "Workflow" tab.
  3. In the "Description" field, type the description for this task, e.g. "Tutorial - People Activity" as in the screenshot below
4-pa_description.jpg

Map Data to Form Input

Finally, we may want to pass data to the form input. For example, here, we can pass the message text that is sent by the "Start" pool as the request input to our form:

  1. Select the "Create People Activity" task in the pool "PA" and make sure the Mapper is visible.
  2. In the mapper, create a link from the text of the $thisStartRequestMsg.body variable to $pACreateTaskRequestMsg.root/taskInput/input/request as in the screenshot below:
5-pa_mapping_form_input.jpg

Conclusion

The PA process is now fully designed. We may now deploy the form and the process in the runtime environment. See the next tutorial "Deploying Forms and Processes with People Activity with Intalio|BPMS 5.0".

Note to 4.X users: For those of you who have designed People Activities with Intalio|BPMS 4.X, you will notice that the following actions are no longer required:

  • No need to define message names and schemas: they are automatically found when drag-and-dropping the form.
  • No need to define correlations: workflow integration now support "magic session" for automatic correlation.
  • No need to provide the form URL in the mapping: this information is automatically generated in the BPEL code.
  • No need to provide the userProcessCompleteSOAPAction in the mapping: this information is automatically generated in the BPEL code.
  • No need to provide the users/roles in the mapping: this information is automatically generated in the BPEL code based on the workflow properties of the user pool.
  • No need to define the task description in the Data Mapper, although this remains possible. It can now be defined as a property of the create task.
  • No need to set the status of the notifytaskCompletionResponse message to OK: this information is automatically generated in the BPEL code.
Last Updated ( Dec 28 2007 )
  < Prev Next >