Tutorial: Modeling a BPEL process

In this tutorial, we will model a loan approval business process and generate a BPEL process. The loan approval business process is a composite application where a mortgage company uses to process loan requests. 

 

  1. There are two main web services; Assess Risk, to assess credit risk and Review, to review the loan application. 
  2. Upon receiving the loan request, if the loan amount is below a threshold and a credit risk is low, the loan can be approved without going through approve process.  Otherwise, the loan application must be reviewed for approval.
  3. Use the fault handle to handle the case when the loan application is rejected.
  4. Use File->New->Example command and select BPMN-BPEL Mapping Example from the wizard. A project named ActiveVOS BPMN-BPEL Mapping Example project will be created that contains the example files loanapproval.bpel and loanapproval.wsdl.

 

In this tutorial, you will:

  1. Create a loan approval BPMN model
  2. Validate the model to ensure it conforms to BPMN standard.
  3. Edit BPEL and web service properties
  4. Transform to a BPEL model

Create a loan approval BPMN model

 

Use business process model editor to create a loan approval business process as below

Note

1.       Use properties view to specify task types for each task. Both tasks “Assess Risk” and “Review” are Service tasks while “Set to Approve” task is not a web service, but a container to contain an assignment. 

 

 

2.       Use start event with message trigger  to represent receiving a message.  You can add or remove triggers by using the context menu of a start event object. Similarly, use end event with Error result  to reply with an error message and use end event with message result  to reply with approve message.

 

 

3.       Use boundary intermediate event to represent the event that triggers the fault handle. To create a boundary object, first create a sequence flow from the task “Review” to the end event “Reply with Reject Message”.  Right click the sequence flow and use command Add Trigger->Error to add an error intermediate event.

 

Validate the model to ensure it is BPMN compliant.

 

Use the Validate command to ensure that the business process model is BPMN compliant.

 

To validate a model:

  1. Select the editor of the BPMN model.
  2. On the Modeling menu, select Validate.
  3. Select the BPMN standard rule profile
  4. Click OK.

 

 

 

Edit BPEL and web service properties

 

 

1.       Expand loanapproval.wsdl in the artifact view as shown below. Drag the operation check and drop to the service task “Assess Risk”.  Drag the partner link riskAssessmentLinkType and drop to the service task “Assess Risk”, Select the “Assess Risk” service. Enter “assessor” as the partner link.

 

 

 

 

2.       Follow the same step in (1) to drag operation “approve” and partnerlink loanApprovalLinkType and drop unto the service task “Review”. Enter “approver” as the partnerlink. 

3.       Drag operation request and operation loanPartnerLinkType and drop unto the start event “Receive a loan request”, end event “reply with approve message” and end event “reply with reject message”. Use partner link name “customer” in all three cases.

 

 

 

 

4.       Add an assignment to the service task “Set to Approve”.  Use properties view to assign string ‘yes’ to message/accept.

 

 

 

 

5.       Edit expressions or conditions in sequence flows and tasks that can affect the process flow.

 

 

 

Transform to a BPEL model

 

 

  1. Select the editor of the BPMN model.
  2. On the Modeling menu, click Transform to BPEL.
  3. In the Transform dialog, specify the destination folder (project), file name, target platform (BPEL 1.1 or BPEL 2.), BPEL skeleton vs. complete BPEL and the named process. The destination folder defaults to the same folder as the BPMN model.
  4. Click OK.