...
Download and setup Eclipse (Recommended Packs - 3.7 - 4.2.1 (Indigo - Juno) or 4.3 (Kepler)).
Note Note: The instructions in this section are verified on Eclipse Kepler and Indigo. Note that Eclipse Helios is NOT supported.
- Under the Help menu, click Install New Software. In the resulting panel, click the Add button to add a repository and fill in the following fields:
Fill in the following repository details for BPMN.- Name: Activiti BPMN 2.0 designer
- Location: http://activiti.org/designer/update/
- Click OK to add the plugin. Once this is done, click Finish and restart Eclipse.
- Once Eclipse restarts, navigate to File > New > Other. From the window that appears select Activiti > Activiti Project and click Next.
Provide a suitable Project Name and click Finish.
Right click on your project and navigate to New > Other.
From the window that appears, select Activiti > Activiti Diagram.
Select the project in the viewer and enter a File name.
Tip Tip: The following example expands on creating a business process scenario, The manager invokes an order approval process where it is possible to set the product ID. Additionally, an employee from a good division can set the quantity and the unit price of the product. The quantity and the unit price are used to calculate the total cost. If the total cost is above 100,000, the order will have to be approved by an employee from the the orderApproval Group before the order mail is dispatched. Alternatively, if the cost is below 100,000, the order mail is dispatched without approval. In this example, the process is named “OrderApproval”.
- Click Finish. You are presented with a canvas as shown below to model your BPMN package.
The palette is positioned on the right side of the screen. You can drag and drop models from the palette onto the canvas and do your modelling. - To implement the OrderApproval, drag and drop a Start Event element, two User Task elements, a Mail Task element and a Terminate Event element on the canvas.
Link up the flow according to the business logic.
Tip Tip: According to the business logic in this example, the Start Event should trigger the Fill Order Form User Task. So connect the Start Event to the Fill Order Form User Task.
In the Connection tab, select
SequenceFlowSequence Flow. Connect the Start Event to the Fill Order Form User Task.
Next is a Condition Logic whereTip
elseTip: It is useful to understand the condition logic for this sequence. Here, if the total cost calculated from the quantity and unit price is above 100,000 a user task has to be executed
, click on the diamond shapeor the mail task comes into play. In order to add this condition statement, click on the Fill Order Form User Task and you will be able to see few tooltips hovering around the Fill Order Form User Task on the canvas
. The diamond shape with a cross in the middle implies an Exclusive Gateway.
- Select the Fill Order Form User Task by clicking on it and click on the Exclusive Gateway tooltip on the right of the tool.
- Once you click the Exclusive Gateway, a bigger diamond with a cross in the middle , this implies an exclusive gateway.should appear on the canvas next to the Fill Order Form User Task. The Fill Order Form User Task will point to it.
- The rest of the flow is fairly straightforward. Use the Sequence Flow to connect the tools and the final diagram will be similar to what is shown below.
Excerpt | ||
---|---|---|
| ||
The Quick Start guide of the WSO2 Business Process Server. |