Business process modeling for XPDL generation

Visual Paradigm supports business process modeling as well as XPDL generation for Open Business Engine (OBE). In this tutorial, we will demonstrate how to model a business process with business process diagram, and how to specify the properties required for generating a XPDL that can work with OBE.

January 27, 2010
User Rating: / 1
Views: 4,431
PDF Link Add comments
Edition: Analyst or above (Edition comparison)

Modeling

  1. Download and open the XPDLSample.vpp attached with this tutorial.
  2. Open the business process diagram Business Process Diagram1.
    bpd
  3. Right click on the background of the diagram and select XPDL Diagram from the popup menu. Without this step, some of the XPDL-related properties will be hidden.
    right click XPDL diagram
    To construct a business process. There are several main components: Process, Participant, Activity, and Transition. The names of the components may be different between VP-UML and XPDL. The following table shows the mapping between VP-UML and XPDL:
    VP-UML XPDL
    Pool Process
    Lane Participant
    Task Activity
    Sequence Flow Transition

    Let's go through the components one by one.

Process (Pool)

Process contains the variables, applications. There are 2 kinds of variables: Formal Parameter, Data Field. Formal Parameters' values will be specified when starting the process instance. Both variables will be used by the applications. Application will be triggered in activity. OBE provides a list of default applications that is enough for running a simple process.
  1. Right-click on the pool Document Approval and select Open Specification... from the popup menu.
    right click pool open spec
  2. Open the Formal Parameters tab, add the following formal parameters:
    Name Base Type Model
    docUri String In
  3. Open the Data Fields tab, add the following data fields:
    Name Base Type
    peerApproved Boolean
    peerComments String
  4. Open the Applications tab, add the following applications:
    Name Application ID Formal Parameters
    Document Editor obe.editDocument url:String (In)
    Document Viewer ob2e.viewDocument url:String (In)
    Update Process Attribute obe.updateProcessAttributes  
    Assign Process Attribute obe.assignProcessAttribute attrName:String (Out)
    attrValue:String (In)
  5. Confirm pool editing by clicking OK.

Participant (Lane)

OBE's config file BasicSecurityRealm.xml has been defined a list of entries (users). Participant id is used to to reference the entry. Participant type defines which user will be assigned a work item when the activity is triggered.
participant entry key
  1. Right click on the lane Document Submittor and select Open Specification... from the popup menu.
    right click lane open spec
  2. Open XPDL tab, enter Submittor to be Participant id.
  3. Confirm lane editing by clicking OK.
  4. Repeat the above steps to set participant id and participant type for the lanes below:
    Lane Participant id Participant type
    Peer in Sales Dept. Sales Organizational Unit
    Vice President of Sales Dept. VPSales Role

Activity (Task)

In XPDL, the instance of activity is called Work Item. User can work with the application(s) when the work item is assigned to him/her.
  1. Create a start event and end event to represents the start/end of the process.
    start end event
  2. Right click on the task Edit Document and select Type > Service Task from the popup menu.
    right click service task
  3. Right click on the task again and select Open Tools Specification... from the popup menu.
    right click open tools spec
  4. Add the following tool:
    Name Application Actual Parameters
    obe.editDocument

    (Note: Tool name has no impact on XPDL generation. It is just for ease of referencing)
    Document Editor
    (obe.editDocument)
    DocUri : String
    (XPDLFormalParameter)
  5. Confirm task editing by clicking OK.
  6. Repeat steps 2-5 to add following tools for the task Peer Review:
    Name Application Actual Parameters
    obe.viewDocument Document Viewer
    (obe.viewDocument)
    docUri : String
    (XPDLFormalParameter)
    obe.updateProcessAttributes Update Process Attribute
    (obe.updateProcessAttributes)
    peerApproved : Boolean
    (XPDLDataField)

    peerComments : String
    (XPDLDataField)

Transition (Sequence Flow)

Transition represents the flow between activities. Normally, no transition details need be specified for XPDL, except those conditional transitions that need to have their conditions specified.
  1. Right click on the sequence flow approve and select Open Specification... from the popup menu.
    right click sequence flow open spec
  2. Set the Condition type to be Expression.
  3. Enter $peerApproved in Condition expression. peerApproved is the variable name. The dolor sign is the identification of variable.
    conditional transition
  4. Confirm sequence flow editing by clicking OK.
  5. Right click on the sequence flow reject and select Condition Type to be Default.
    right click default condition

Deadline (Timer Trigger)

Deadline is used to define a time condition on the activity. Take a look at the task Peer Review and its intermediate event. We want to model the fact that if Peer have not review the document within 3 days, the document will be commented (timed-out) and will be passed to Vice President automatically. To do so, time condition need to set, and a new activity need be created between the event and the next activity for adding comment.
  1. To set the time condition, right click on the intermediate event timeout and select Open Specification... from the popup menu.
    right click event open spec
  2. Set the Time cycle to be 3D, which means 3 days.
    time cycle
  3. Confirm intermediate event editing by clicking OK.
  4. To add new activity between event and next activity, mouse over the outgoing sequence flow exhibiting from event, and click on the resource icon Split with Shape.
    split with shape
  5. Select Task from the popup menu.
    split with task
  6. Name the task to be (peer timeout).
  7. Repeat step 2-5 of above part Activity (Task), add the following tools:
    Name Application Actual Parameters
    obe.assignProcessAttribute Assign Process Attribute
    (obe.assignProcessAttribute)
    PeerComments : String
    (XPDLDataField)

    (timed-out)

    (Note: (time-out) is a parameter in text.)

    The business process diagram is modified for OBE.
    bpd modified

Generate XPDL

  1. Right click on the diagram's background and select Utilities > Generate XPDL... from the popup menu.
    gen xpdl popup
  2. Enter the File name and click Save. The XPDL file is generated.

Import XPDL to OBE

Start OBE

Refer to http://obe.sourceforge.net, Getting Started > Installing/Configuring/Verifying. Make sure Database and JBoss are ready.

Start JBoss

Execute startas in $OBE_HOME/bin or directly execute the start script of JBoss. (PS: executing startas depends on the startas in staging properties)

Import XPDL into OBE

Refer to http://obe.sourceforge.net, Examples > Overview > J2EE Workflow Server.
examples
  1. Start OBE's configuration by executing cladmin in $OBE_HOME/bin.
  2. In the command prompt of the cladmin, enter 1 to select Set Client Protocol.
    set protocol
  3. Enter rmi as protocol.
    set rmi
  4. Press Enter to apply the default JNDI factory [org.jnp.interfaces.NamingContextFactory].
    set jndi factory
  5. Enter 2 to select Connect to connect.
  6. Press Enter (three times) to apply the default Host, User ID, and Password.
  7. Enter 4 to select Process Definitions to show sub-menu of Process Definition.
    press definitions
  8. Enter 3 to select Import Package to import the XPDL file.
  9. Enter the file path of the generated XPDL file. The process is imported into OBE. User can work on the process now.

Process execution

After the process definition is imported into OBE. User can instantiate the process and work on its instance.

Instantiate Process

  1. Start a web browser and visit http://localhost:8080/obeworklist.
  2. Login as system with User name system, Password password.
    client login
  3. Click the Processes link.
  4. A list of Process Definitions are shown. Click on the ID of the Document Approval.
    process list
  5. The details of the Process Definition is shown. Click the Instantiate link.
    instantiate process
  6. A table of actual parameters are shown. They are the Formal Parameters defined in process.
  7. Set the name to be Promotion Document.
  8. Set the docUri to be xxx/promotion.txt. (Note: assumes the xxx/promotion.txt is a valid url that can be edited/reviewed by you.)
  9. Click the Start link to start the process instance.
    start process
  10. The details of the Process Instance is shown.
    process instance
  11. Click Work Items link.
    process instance work items
  12. A list of Work Items of this process instance is shown. Click ID of the work item Edit Document.
  13. The details of the work item Edit Document is shown. You should see that, the Performer is Submittor, the Participant is guest. (Note: Submittor is the user group, guest is a user of the user group. They are defined in OBE's config file BasicSecurityRealm.xml)

Working with Work Item

Work Item is the instance of an activity. Work Item may be assigned to a user (participant), that need be executed and completed by the user. On the previous section, the work item Edit Document is assigned to guest. Let's login as guest and work on Edit Document.
  1. Login as guest with User name guest, Password guest.
  2. Click the Worklist link.
  3. A list of work items that are assigned to this user is shown.
  4. Click the ID link of Edit Document. The details of it is shown.
  5. Click the Execute link to trigger the application(s) of this activity. On this activity, obe.editDocument will be triggered. If your docUri is a valid and editable file. The document editor will be shown to let you edit the document.
  6. After edited the document. Click Complete link to finish this work item. The state of this work item becomes closed completed. A new work item Peer Review of next activity will be created automatically.
  7. Login as system again. (User name system, Password password)
  8. Click the Processes to show the list of process instances.
  9. Click the ID to show details of process instances.
  10. Click the Work Items to show the list of work items. You should see that there are 2 work items. Edit Document is completed, while Peer Review is running.
  11. Click the ID of Peer Review. The details is shown. Since the Participant type of Peer Review is Organizational Unit, both Performer and Participant are Sales, no user will be assigned as its participant.
  12. Click the Execute link to trigger the application(s) of this activity. There are 2 applications defined in this activity: obe.viewDocument shows a document viewer for reading the document. obe.updateProcessAttributes shows a table to let user entering the value of variables. To represent the user has approved this document, select the peerApproved check box and click the Update link.
    peer approved
  13. Click the Complete link to complete this work item. (Note: If peerApproved is true, a new work item of Vice President Review will be created. Otherwise, the work item of Edit Document will be re-opened and assigned to guest again.)

Resources

  1. sample.xpdl
  2. XPDLSample (after XPDL).vpp
  3. XPDLSample (before XPDL).vpp

Rate this Article

Click on one of the stars below to rate this article from 1 (lowest) to 5 (highest).

You may be interested in

  1. Drawing Data Flow Diagrams
  2. Develop as-is and to-be business process
  3. Drawing BPMN 2.0 business process diagram
  4. Define working procedures for business tasks in a business process diagram
  5. Introduction to BPMN Part I
Tags of this article:

Comments (1)

written by Xexilia on December 16, 2011

Great atrclie, thank you again for writing.

Write comment

Rating

Comment

Enter the calculation result

security code