Composing the processes from patterns
Click right on the Processes catalog in the project tree and select
New > Process Catalog. Name the new process catalog
Exercise and click Finish. Create a
new process model in the Exercise process catalog, name it
Approve Hire and Issue
Contract,
and click Finish.
Figure 10. Creating a new
process model
Add a start and terminate event to the process diagram. Connect the two
events and select the connection as shown in Figure 11.
Figure 11. Connecting the
start and terminate events
Invoke the Sequence pattern either from the Accelerators palette by
clicking on the icon, or
right-click on the drawing canvas and select Pattern >
Sequence … A wizard opens (Figure 12).
You must have a connection selected in order to successfully apply a
pattern! To ensure that your selected connection remains selected when
you invoke the pattern, do not move your mouse after you click on the
connection to select it.
Figure 12. Wizard for the
Sequence Pattern
The upper part of the wizard in Figure 12 shows a picture of the
pattern illustrating the process fragment structure that you can
create by using this pattern. Below the picture is a description of
the pattern and a table where you can enter the pattern
parameters.
A pattern consists of a number of connected tasks and optional
gateways. To apply the pattern, you define the names of the tasks. If
you want to connect them by data flow, you additionally specify any
business items and optionally the business item states. In this
tutorial, you will only instantiate patterns with task names and
therefore focus on control flow only. Part 2 of this series shows how
to correctly specify business items and states to create patterns with
data flow.
In the pattern wizard, the start event is shown in the first row of the
table in the Task Name column. In this table cell, the pattern wizard
always shows the name of the model element from which your selected
connection originates.
Instantiate the Sequence pattern as shown in Figure 13. Enter the task
names Issue Contract and
Mail Contract to Future Employee in the
second and third rows of the first column. Then click Apply
Pattern.
Figure 13. Specifying
tasks of the Sequence Pattern
A sequence of these two tasks is added to your process, refining
the selected connection.
Figure 14. Task sequence
in the process flow
This creates an initial simple process that you will further refine by
applying more patterns. The process begins with a loop where the
employee data is reviewed and, if necessary, completed. This is
followed by two approval steps where the contract is approved by
management and human resources.
Select again the connection leaving the start event and invoke
Pattern > Loop … or click on the icon in the Accelerators palette. The Loop pattern wizard
is shown in Figure 15. The picture shows you the overall structure of
a loop fragment. It begins with a merge, followed by a number of body
tasks that connect to a decision. The decision has an exit branch that
terminates the loop and a loop branch that reconnects back to the
merge. On the loop branch, a number of rework tasks can be specified.
Three tabs are provided by the wizard:
- Loop Parameters
- Loop Body Tasks
- Rework Tasks
Figure 15. Wizard for the
Loop Pattern
In this tutorial, you will only specify the name of the decision and
the names of the exit and loop branches. Enter
Data Complete and Accurate? in the
Decision Name field, Yes in the
Exit Branch Name field and No in
the Loop Branch field (Figure 16).
Figure 16. Specifying loop
parameters
Then open the Loop Body Tasks tab. In the Task Name column, you see
Merge as the task name in the first row because the loop body always
starts in the merge gateway. In the second row, enter
Review Employee
Data as
the task name (Figure 17).
Figure 17. Specifying the
tasks in the loop body
Open the Rework Tasks tab. In this tab, you see the name of the Loop
Branch shown as the task name in the first row. Enter
Return to
Submitting Manager
as the name of the rework task in the second row as shown in Figure
18. Then click Apply Pattern.
Figure 18. Specifying
rework tasks
Click right on the drawing canvas and select Auto-Layout from Left
to Right to improve the layout of the generated process. Your
process should now look similar to Figure 19.
Figure 19. Result of
applying Sequence and Loop patterns
Now add the required management approval tasks. Select the Yes branch
of the Data Accurate and Complete? decision (Figure 20).
Figure 20. Selecting the
Yes branch
Invoke Pattern > Parallel Compound … or click on the icon in the Accelerators palette. This pattern allows you
to add tasks to your process model that should be performed in
parallel. Figure 20 shows the wizard for the Parallel Compound
pattern.
Figure 20. Wizard for the
Parallel Compound pattern
A Parallel Compound is a number of tasks, each occurring on a separate
branch, which start in a fork gateway and end in a join gateway. In
the table in the wizard, you specify the names of these tasks. Enter
Obtain Management Approval as the task name
in the first row and Obtain HR Approval as
the task name in the second row as shown in Figure 21. Then click
Apply Pattern.
Figure 21. Tasks for the
Parallel Compound pattern
Your process should now look similar to Figure 22. Recall that you
modeled it by instantiating three patterns: Sequence, Loop, and
Parallel Compound.
Figure 22. Final version
of the Approve Hire and Issue Contract process
|