In this post, I'll define a simple process to illustrate how to check whether a task deadline is reached. Below, you'll find a link to download my process project as well as the detailed process definition step by step.
Process definition (step by step)
- In the Intalio Designer, create a new project and name it "DeadlineManagement"
- Create a new "Business Process Diagram" and name it "DeadlineManagement.bpm"
- Add a pool to the diagram and name it "User"
- Set the "User" pool as non executable
- Add a task to the "User" pool and name it "Start process"
- Add a second pool and name it "Process tasks" (make sure this one is set as executable, which is the default configuration)
- Add a message start event to the "Process tasks" pool
- Drag the outgoing arrow from the "Start process" task (from the "User" pool) to the message start event
- In the project explorer, add a new directory and name it "messages".
- In the "messages" directory, create a new XML schema and name it "ProcessInput.xsd" (this schema defines the structure of the message that executes the process)
- In the XML schema, add a complex type and name it "InputMessage". In this complex type, add 3 elements :
- a string type element named "initialUser"
- a string type element named "deadline"
- a string type element named "reminderUser"
- Drag the complex type onto the arrow that links the "Start process" task and the message start event. Then choose the "Set schema type InputMessage as the content of the message"
- From the message start event, drag the outgoing arrow to the right and create a new task. Then, name this task "Create user task"
- Back in the project explorer view, create a new directory and name it "Forms"
- In the "Forms" directory, create a new Ajax form and name it "UserForm"
- Drag the form into the "User" pool and choose the "Create and complete" option
- From the "Create user task", drag the outgoing arrow to the right and create a new task named "Complete user task"
- From the "UserForm-create" node, drag both the outgoing and ingoing arrows to the "Create user task" task
- From the "Complete user task" task, drag both the outgoing and ingoing arrows to the "UserForm-complete" node
- Set the focus on the "Create user task" task and open the mapper view
- Map the "initialUser" from the input message to the "userOwner" task metadata. Then, map the "deadline" from the input message to the "until" task metadata
- From the "Complete user task" task, drag the outgoing arrow to the right and create a Gateway with type "Exclusive data-based gateway
- From the gateway, drag the outgoing arrow to the right; create a new task and name it "Process task without expiration"
- From the gateway, drag another outgoing arrow to the right; create a new task and name it "Clone task with high priority"
- Right click on the arrow that binds the gateway and the "Process task without expiration" task. Then choose "Condition type --> default"
- Set the focus on the gateway and open the mapper view :
- add an "=" operator
- Create a static argument with the value "DeadlineReached" and set it as input to the "=" operator
- Set the "status" element from the "userFormNotifyTaskCompletionRequestMsg.root" node as the second argument of the "=" operator
- map the result of the "=" operator to the "condition" node
- At this point, from the "Clone task with high priority" task, you could manage task expiration as you wish. In this example, I've chosen to recreate the initial task and assign it to another user, with another priority and a deadline = 31/12/2011 22:00 (this illustrates how you can reassign a task to a manager, in case it hasn't been completed by one of its underlings, for instance)
Once the process is deploy, you can run it from the BPMS console. The input message we've defined through the XML schema will result in the user having to introduce the following info :
Now, let's log in the UI-FW console as the "examples/msmith" user :
Then, let's wait until 22:20. The task will disappear from the list of the "examples/msmith" user. Once logged in as "examples/ewilliams", we can see that the cloned task has been created :
Download the sample project