Monitor your processes in Jbpm console

User Rating: 4 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Inactive
 

If you are new to JBPM 4 you might be confused how to trace your processes graphically. It's not too complicated and this article shows it.

The jbpm console is deployed as part of the jbpm installation. In order to get working your console you need at first to install some users, in order to access the administrative section.

Refer to this tutorial for more information about Jbpm 4 installation:

So, supposing you have designed a small process example and deployed both the jpdl processs file and the image along with a Web application.

C:.
¦   index.jsp
¦
+---WEB-INF
    ¦   web.xml
    ¦
    +---classes
    ¦   ¦   jboss-logging.xml
    ¦   ¦   process.jpdl.xml
    ¦   ¦   process.png
    ¦   ¦
    +---lib

Now, when the process and the image information need to be deployed also on the database storage:

 ProcessEngine = new Configuration().buildProcessEngine();

RepositoryService repositoryService = processEngine.getRepositoryService();
ExecutionService executionService = processEngine.getExecutionService();

 repositoryService.createDeployment()
        .addResourceFromClasspath("process.jpdl.xml")
        .addResourceFromClasspath("process.png")
        .deploy();

Ok. Now start your process :

 Map variables = new HashMap();
   variables.put("content", "good");

   ProcessInstance processInstance = executionService.startProcessInstanceByKey("Tiscali", variables);

Now, let's open the jbpm console so that you can verify the process state. Point your browser to:

http://localhost:8080/jbpm-console

The login screen will popup. Enter one of the credentials from the jbpm4_id_user (for example alex/password)

jbpm4 jbpm 4 jbpm-console tutorial
Now navigate to the Process Definition from the left tree panel and point to the Process Instance.

You will see the Button "Diagram" will be activated:

jbpm4 jbpm 4 jboss tutorial jbpm-console

By clicking on the button, you will see the process picture just uploaded, with an arrow pointing the current state.

jbpm4 jbpm 4 tutorial jbpm-console

All in all the process graph is not so interactive. However from the process definition you have all the information to create a customized process  graph, for example using DHTML or Java drawing Api.

Here's an interesting thread discussion about it:

http://community.jboss.org/message/400745

Related articles available on mastertheboss.com

JBPM tutorial

JBoss jBPM 3 is a flexible, extensible framework for process lang

How do I fire an action every time a JBPM Node enters?

JBoss recipe of the day

JBoss Jbpm superstates

What is a superstate ? a Superstate is a group of nodes. Supersta

Jbpm Mail delivery

Almost every workflow needs a notification of the process activit

How do you embed Java code in your JPDL ?

  You can use a BeanShell expression to add a Java script in you

JBPM best practices

There's no perfect rule to model your workflow, it depends on the