Monitor your processes in Jbpm console

This tutorial has been written for an old version of jBPM which is now deprecated.

If you want to get started quickly with jBPM, we recommend the following quickstarts:

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