Skip to main content

skip to main content

developerWorks  >  WebSphere  >

IBM Pattern-based Process Model Accelerators for WebSphere Business Modeler, Part 1: Quality and change management using process patterns

developerWorks
Go to the previous pagePage 6 of 12 Go to the next page

Document options
PDF format - Fits A4 and Letter

PDF - Fits A4 and Letter
1391 KB (38 pages)

Get Adobe® Reader®

Sample code


My developerWorks needs you!

Connect to your technical community


Rate this tutorial

Help us improve this content


Applying transformations and refactorings

When creating the next example process Handle Signed Contract, you will use two more patterns and some of the transformations and refactorings provided by the accelerators.

In the Exercise process catalog, create a new process and name it Handle Signed Contract. Create the following tasks:

  • Receive Signed Contract
  • Verify Necessary Signatures
  • Contact Employee and Complete Data
  • Obtain Social Security Information
  • Check Work Permit Status

Place the tasks and the start and terminate events on the drawing canvas as shown in Figure 23. Note that we placed three of the tasks in an approximate row, and the other two tasks in an approximate column with sufficient extra white space between the column and the tasks in the row. Imagine that a gateway could be placed there.


Figure 23. Tasks in the Handle Signed Contract process
Figure 23. Tasks in the                         Handle Signed Contract process

Invoke Transform > Autolink Elements or click on the Icon for the                         Autolink Elements transformation icon in the palette. Control-flow connections are automatically added to your model. Apply the Auto-Layout, name the decision All Documents Filled In and Signed? and name its output branches Yes and No. Then save your model. It should look similar to Figure 24.


Figure 24. Applying the AutoLink Elements transformation
Figure 24. Applying the                         AutoLink Elements transformation

The Autolink Elements transformation automatically connects tasks based on their geometric position on the drawing canvas. It also inserts decision and merge gateways when you indicate alternative branches by placing tasks in a column and leaving sufficient white space before and after a column of tasks. You can also apply this transformation to only a selected set of model elements and thereby use it to create complex models. This means that you can autolink a few elements, place additional elements on the canvas, autolink them again with the already linked process fragment, and so on. Refer to Part 3 of this series for further details.

The process model is not as accurate as we would like it to be. For example, we only need to check the work permit status of foreigners, but for non-foreigners we obtain their social security information. To change the process accordingly, press SHIFT and select the Obtain Social Security Information and Check Work Permit Status tasks. Invoke Transform > Convert to Alternative Compound or click on the Icon for the Convert to Alternative Compound transformation icon with both tasks selected. Apply the Auto-Layout. Your process fragment will change (Figure 25).


Figure 25. Applying the Convert to Alternative Compound transformation
Figure 25. Applying the                         transform Convert to Alternative Compound transformation

The two selected tasks are placed on two different branches opened by a decision and closed by a merge. Change the name of the decision to Foreign National?. Enter No as the name of its upper output branch and Yes as the name of its lower output branch.

The Convert to Alternative Compound transformation allows you to quickly reorder sequences of tasks such that they are placed on different alternative branches of your process model. Refer to Part 3 of this series for further details.

The next editing step introduces an additional branch to obtain work permits in case the Check Work Permit Status task reveals that a foreign national needs a work permit. Press SHIFT and select the outgoing connection of the Check Work Permit Status task first, then select the outgoing connection of the Obtain Social Security Information task as shown in Figure 26.


Figure 26. Adding a branch to the process using the Alternative Branch pattern
Figure 26. Adding a branch                         to the process using the Alternative Branch pattern

Invoke Pattern > Alternative Branch or click on the Icon for                         Alternative Branch pattern icon in the palette. Apply the Auto-Layout. A new decision-merge branch is added to your model (Figure 27).


Figure 27. The new decision-merge branch
Figure 27. The new                         decision-merge branch

Name the new decision Work Permit Holder?. Name its upper branch Yes, and its lower branch No. Then select the lower branch as shown in Figure 28.


Figure 28. Selecting the lower branch
Figure 28. Selecting the                         lower branch

Invoke Pattern > Insert Task or click on the Icon for                         Insert Task pattern icon in the palette. A new task is added to the No branch of the Work Permit Holder? decision. Name this task Request Work Permit.


Figure 29. Using the Insert Task pattern
Figure 29. Using the                         Insert Task pattern

To make your process model tidier, select the two merge gateways and invoke Transform > Merge Elements or click on the Icon for                         Merge Elements transformation icon.


Figure 30. Applying the Merge Elements transformation
Figure 30. Applying the                         Merge Elements transformation

The two selected gateways are merged into a single gateway and the control flow is properly reconnected. The process model is now changed as shown in Figure 31. If your model shows incoming connections into the merge that cross each other, try Refactor > Automatically Order Branches or click on the Icon for the                         Automatically Order Branches refactoring icon in the palette. The Automatically Order Branches refactoring can help to improve the layout of your model if a slight repositioning of the merge gateway on the canvas does not have the desired effect.


Figure 31. Applying the Automatically Order Branches refactoring
Figure 31. Applying the                         Automatically Order Branches refactoring

Finally, select the incoming connection of the terminate event and apply the Sequence pattern to add two more tasks Create Employee Record and Prepare Welcome Package at the end of the process.


Figure 32. Adding two new tasks
Figure 32. Adding two new                         tasks

Figure 33. The process flow for the new tasks
Figure 33. The process                         flow for the new tasks

Your process is now completely modeled. Recall that we applied the Autolink Elements transformation, followed by the Convert to Alternative Compound transformation, followed by the Alternative Branch and Insert Task patterns. Then we applied the Merge Elements transformation, followed optionally by the Automatically Order Branches refactoring. Finally, we applied the Sequence pattern. With these 7 accelerators, we modeled a quite complex process in a fast and accurate manner. To verify that your process has no control flow errors, run the Control-Flow Analysis. It will confirm that your process is correct.


Figure 34. Result of the control-flow analysis
Figure 34. Result of the                         control-flow analysis

It is a recommended modeling practice to use subprocesses to obtain a better structure for large process models. A subprocess encapsulates a connected fragment of the process containing tasks and gateways and is properly connected to the surrounding parent process. The accelerators help you to quickly add subprocesses to your model while properly restoring the control flow between the new subprocess and the parent process.

Select the process fragment that starts in the Foreign National? decision and ends before the terminate event as shown in Figure 35. To keep this fragment selected when you invoke the next refactoring, purposefully position the cursor on one of the selected elements in order to preserve your selection.


Figure 35. Selecting a process fragment
Figure 35. Selecting a                         process fragment

Invoke Refactor > Extract Subprocess or click on the Icon for the                         Extract Subprocess refactoring icon. A new subprocess is created and opened on the drawing canvas. The selected process fragment is moved into this subprocess. The Handle Signed Contract process now contains a subprocess as shown in Figure 36.


Figure 36. The extracted subprocess
Figure 36. The extracted                         subprocess

Name this subprocess Create Work Documents.

Now, add data flow to the Handle Signed Contract process model. When doing traditional modeling, you have to select each connection and invoke Associate Data … Select the last connection in the process model connecting the Create Work Documents subprocess to the terminate event. Use the traditional Associate Data… to associate the connection with the Employee Record business item. Imagine that you had to do this for each connection in your process model. This would be quite cumbersome.

With the new Associate Data transformation, you can now easily associate data with multiple connections through one single operation. Select all the other connections of your process model by pressing and holding the left button of your mouse and pulling it over the fragment of the process model that begins with the start event and ends with the connection leading to the Create Work Documents subprocess. Note that the subprocess itself is not selected (Figure 37).


Figure 37. The connections to be selected
Figure 37. The                          connections to be selected

Now invoke Transform > Associate Data … or click on the Icon                             for the Associate Data transformation icon making sure to preserve your selection. A window opens to allow browsing to all available business items. Click the Complex type radio button and select the Contract business item as shown in Figure 38. Then click OK.


Figure 38. Associating the Contract business item
Figure 38. Associating the                         Contract business item

Data flow is assigned to the Handle Signed Contract process. With this last transformation, you have completed the model of this process.


Figure 39. The completed process model for Handle Signed Contract
Figure 39. The completed                         process model for Handle Signed Contract

To add data flow to the Create Work Documents subprocess, open this subprocess in a new page and apply the Associate Data … transformation as desired. To match the data flow in the Handle Signed Contract process, the Create Work Documents subprocess should take a Contract as input and provide an Employee Record as output. You can achieve this by applying the Associate Data … transformation twice.



Back to top



Go to the previous pagePage 6 of 12 Go to the next page