Pular para o conteĂşdo principal

Postagens

Mostrando postagens com o rĂłtulo jbpm

Using jBPM embedded and CDI in a JavaFX application

A few years ago I wrote about using jBPM remote API from JavaFX . That was straightforward because the remote APIs are usually simply wrappers to REST APIs running on server side. Since then a few things happened: jBPM is in version 7.7, that article was for jBPM 6.3.0! In version 7 the Business Central execution server was replaced by Kie Server (we even wrote a JavaFX client for Kie Server ) A new jBPM services API was introduced and it is mature and ready for production use. CDI 2.0 was released and it allows the use of CDI in standalone Java applications ( and in a JavaFX application as we described ). We could use jbpm embedded at that time, but we would have to make use of underlying Kie APIs (RuntimeManager, KieSession, etc), which I was not willing to use at that time. With services API we can easily bring jbpm to every Java application, just just one of its flavors: CDI, EJB, Spring or pure Java. But what is different from using embedded jbpm from Kie Server?...

Registering a custom process event listener in jBPM or BPM Suite

Two Steps are required to  use a custom process event listener in jBPM 6.5 or BPM Suite 6.4: 1) Create the class that implements org.kie.api.event.process.ProcessEventListener . This class can be in your BPM Suite project or in a separated dependency. In any case you will need the org.jbpm:jbpm-flow:6.5.0.Final maven dependency in your project. If you use a separated maven project with your process event listener, make sure to add it as a dependency; 2) Register the custom listener in kie-deployment-descriptor.xml  on the "Event Listeners" sections and use the full qualified class name and the resolver as reflection. Now if you execute a process your process event listener methods should be called. For example, I have the following simple test processes: And in my process event listener I did override the before node triggered method to print the node name, so when I execute the business process I see the following in console: See the code for a simple ...