Monitor your processes in Jbpm console
- Published: 03 September 2010
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.
¦ ¦ jboss-logging.xml
¦ ¦ process.jpdl.xml
¦ ¦ process.png
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:
The login screen will popup. Enter one of the credentials from the jbpm4_id_user (for example alex/password)
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:
By clicking on the button, you will see the process picture just uploaded, with an arrow pointing the current state.
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: