Business process modeling for jPDL generation

Visual Paradigm supports business process modeling as well as jPDL generation for JBoss jBPM jPDL (jBPM jPDL). 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 jPDL that can work with jBPM jPDL.

February 19, 2010
User Rating: / 2
Views: 4,113
PDF Link Add comments
Edition: Analyst or above (Edition comparison)

Modeling

  1. Download and open the jPDLSample.vpp attached with this tutorial.
  2. Open the business process diagram BookStore.
    bpd
  3. Right click on the background of the diagram and select jPDL Diagram from the popup menu.
    popup jpdl diagram
To construct a business process. There are several main components: Process, Participant, and Task.
Let's go through them one by one.

Process

Process represents the business process. (Note: In VP-UML, Pool represents Process.)
It contains the Tasks, Transitions, etc.... Normally, no process details need be specified for jPDL.

Participant

Participant represents the user of the business process. (Note: In VP-UML, Lane represents Participant)
The users are defined in database. You are required to set the same name in Lane and User. (Note: For more details about defining user in database, please read the section: Prepare jBPM jPDL database)
Same as process, no participant details need be specified for jPDL besides the participant name.

Task

Task means a job need be handled. If the task is User Task or Manual Task. The task need be started and completed by user. Otherwise, it will be completed automatically.
  1. Right click on the task Place Order and select Type > User Task from the popup menu.
    popup user task
  2. Right click on the task Verify Store and select Type > Manual Task from the popup menu.
    popup manual task
  3. Repeat step 2 to set task Random Survey to be Manual Task.

Name All Components

For jPDL, all components insides the process need be named. And not allow duplicated name between the components. (Note: If no name, a default name Unnamed{N} will be assigned to the component. If the name is duplicated. The {N} will be appended into the component, where the {N} is a sequence number.)
  1. Select the start event. Press F2 to start editing its name. Enter Start as its name.
    name start event
  2. Select the outgoing sequence flow exhibiting from event. Press F2 to start editing its name.
    Enter to Place Order as its name.
    name transition
The business process diagram is modified for jPDL.
bpd modified

Generate jPDL

  1. Right click on the diagram's background and select Utilities > Generate jPDL... from the popup menu.
    popup generate jpdl
  2. Enter the Folder and click OK. The output files are generated. They includes:
    BookStore.zip (Deployable process archive)
    gpd.xml (Graphical process definition)
    processdefinition.xml (Process definition)
    processimage.jpg (Process image)

Install jBPM jPDL

  1. Prepare jBPM jPDL 3.2. May be downloaded from http://www.jboss.org/downloading/?projectId=jbossjbpm&url=http://downloads.sourceforge.net/jbpm/jbpm-installer-3.2.6.SP1.jar
  2. Prepare JBoss 5.0.0 GA. May be downloaded from http://www.jboss.org/downloading/?projectId=jbossas&url=https://sourceforge.net/project/showfiles.php?group_id=22866&package_id=16942&release_id=645033
  3. Prepare Java and MySQL.
  4. Execute java -jar jbpm-installer-3.2.b.SP1.jar to start installing the jBPM jPDL.
    jpmn installer
  5. Select installation path. Click Next to next page.
  6. Select jBPM3 JBoss Integration. Click Next to next page.
    jbpm3 jboss integration
  7. Select JBoss-5.0.0, and enter default in Server. Click Next to next page.
    jboss5
  8. Select MySQL as target database. Click Next to next page.
    mysql
  9. Select the JBoss-5.0.0 in JBoss Home. Click Next until installation completed.

Prepare jBPM jPDL database

  1. Login to MySQL as root.
  2. Create database jbpmtest.
  3. Execute the script file in $jPDL_INSTALLATION/database/jbpm.jpdl.mysql.sql.
  4. Execute the following scripts to create the testing data. (Note: the Users (Participants) are created in the following scripts.) INSERT INTO JBPM_ID_GROUP VALUES (1,'G','sales','organisation',NULL);
    INSERT INTO JBPM_ID_GROUP VALUES (2,'G','admin','security-role',NULL);
    INSERT INTO JBPM_ID_GROUP VALUES (3,'G','user','security-role',NULL);
    INSERT INTO JBPM_ID_GROUP VALUES (4,'G','hr','organisation',NULL);
    INSERT INTO JBPM_ID_GROUP VALUES (5,'G','manager','security-role',NULL);
    INSERT INTO JBPM_ID_USER VALUES (1,'U','user','user at sample.domain','user');
    INSERT INTO JBPM_ID_USER VALUES (2,'U','manager','manager at sample.domain','manager');
    INSERT INTO JBPM_ID_USER VALUES (3,'U','admin','admin at sample.domain','admin');
    INSERT INTO JBPM_ID_USER VALUES (4,'U','shipper','shipper at sample.domain','shipper');
    INSERT INTO JBPM_ID_MEMBERSHIP VALUES (1,'M',NULL,NULL,2,4);
    INSERT INTO JBPM_ID_MEMBERSHIP VALUES (2,'M',NULL,NULL,3,4);
    INSERT INTO JBPM_ID_MEMBERSHIP VALUES (3,'M',NULL,NULL,4,4);
    INSERT INTO JBPM_ID_MEMBERSHIP VALUES (4,'M',NULL,NULL,4,3);
    INSERT INTO JBPM_ID_MEMBERSHIP VALUES (5,'M',NULL,NULL,1,3);
    INSERT INTO JBPM_ID_MEMBERSHIP VALUES (6,'M',NULL,NULL,2,3);
    INSERT INTO JBPM_ID_MEMBERSHIP VALUES (7,'M',NULL,NULL,3,3);
    INSERT INTO JBPM_ID_MEMBERSHIP VALUES (8,'M',NULL,NULL,3,2);
    INSERT INTO JBPM_ID_MEMBERSHIP VALUES (9,'M',NULL,NULL,2,2);
    INSERT INTO JBPM_ID_MEMBERSHIP VALUES (10,'M',NULL,NULL,2,5);
    INSERT INTO JBPM_ID_MEMBERSHIP VALUES (11,'M',NULL,'boss',2,1);
    INSERT INTO JBPM_ID_MEMBERSHIP VALUES (12,'M',NULL,NULL,1,1);
  5. Create database user jbpmtest. Allow this user to have all privileges for database jbpmtest.

Deploy jPDL process

  1. Execute $jPDL_INSTALLATION/bin/run.bat to launch jBPM jPDL.
  2. Start a web browser and visit http://localhost:8080/jbpm-console.
  3. Login as manager with User Name manager, Password manager.
    login
  4. Click the Deploy link to start deployment.
    deploy
  5. Select the generated BookStore.zip and click Deploy to confirm deploy this process.
    deploy file
  6. Process is deployed. You can see its summary in Process Summary.
    process definition
  7. You also can click the Process Image link to show the business process diagram you drawn in VP-UML.
    process image

Execute process

  1. Login as user with User name user, Password user. (Note: After login, BookStore's summary should be shown automatically since there is only 1 process is deployed. If not, please click the Processes link to show a list of processes. Then click Examine link of BookStore to select BookStore.)
  2. Click the Start link to create the process instance.
    start process
  3. The process is started. A list of tasks is shown. However, there is no task in the list. Because the flow is hold on Start Event. Click the Tokens link to show a list of tokens.
    process tokens
  4. Click the Signal : toPlaceOrder link to trigger Place Order task.
    to place order
  5. Click the Task link to show a list of tasks.
    process tasks
  6. The PlaceOrder is shown on the list. its status is Not Started. Click the Start link to start the task.
    start task
  7. After the task is started. its status becomes Running. Assumes user have done the task. Click the End : toFork link to complete the task and trigger to Fork.
    end task
  8. There are 3 tasks connected from Fork. The Nothing task is a normal task, it will be started and completed automatically. So, you see there are only 2 tasks shown on the list after Place Order is completed.
    after fork
  9. Login as shipper and admin and repeat the above steps to start and complete the tasks Verify Store and Random Survey.
  10. After the tasks are completed. The status of process instance is Ended.
    finished

Resources

  1. BookStore.zip
  2. jPDLSample (before jPDL).vpp
  3. jPDLSample (after jPDL).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 (6)

written by cmjhingeniero on February 20, 2010

The integration is only with the jBPM-3.2 version or you can use with jBPM-4.2???

written by Lilian Wong on March 12, 2010

I'm sorry that during our implementation, only 3.x have web-client. Therefore, we support 3.x rather than 4.x.

written by Brian on July 19, 2010

We are working on a project to use JBPM 4.2, and we will implement our own web client.
Do you have any plan to support JBPM 4.x? Is yes, what is the schedule?

written by Furgas on February 4, 2011

Hello,
I'm also interested in exporting to jBPM 4 (hey, jBPM 5 is around the corner...). What's the status of this issue?

written by Jick Yeung on February 8, 2011

Hi Furgas,

Thank you for your post. We will consider your request. If we decide to move on to jBPM 4 or 5, I will let you know.

Best regards,
Jick Yeung

written by A.S. on April 26, 2011

We´re also interested in exporting to jBPM 4 !!! It would be great.

Write comment

Rating

Comment

Enter the calculation result

security code