-
1. Re: How to register a DeploymentEventListener in jBPM 6
swiderski.maciej Aug 12, 2015 3:25 AM (in response to pschaefer)are we talking about workbench or embedded?
for workbench best is to use CDI that simply define methods with observers so they will be called by cdi container.
For embedded the manual registration should work as long as the listener is of proper type.
HTH
-
2. Re: How to register a DeploymentEventListener in jBPM 6
pschaefer Aug 14, 2015 4:18 AM (in response to swiderski.maciej)I use jBPM as embedded. I developed my own application around jBPM using CDI and the jBPM services. The problem I try to solve is to do certain stuff, after I deployed a new process. I deploy a new DeploymentUnit like this:
String[] gav = deploymentId.split(":"); KModuleDeploymentUnit deploymentUnit = new KModuleDeploymentUnit(gav[0], gav[1], gav[2]); deploymentService.deploy(deploymentUnit);
I discoverd that the super Class of DeploymentService has a map with DeploymentEventListeners and these listeners get informed when the Deployment finished. The DeploymentService has also a Method addListener, but I don't know if this is the correct one to use. I have implemented my own DeploymentEventListener and have done something like this:
((ListenerSupport)deploymentService).addListener(deploymentEventListener);
But my Listener gets never called. What am I doing wrong?
-
3. Re: How to register a DeploymentEventListener in jBPM 6
pschaefer Aug 14, 2015 6:29 AM (in response to pschaefer)I found the solution, you can simply do:
public void onDeploy(@Observes @Deploy DeploymentEvent event) { }
Then thrrough CDI observer capabilities the method gets called.
-
4. Re: How to register a DeploymentEventListener in jBPM 6
swiderski.maciej Aug 17, 2015 2:24 AM (in response to pschaefer)feel free to mark question as answered so others can find it useful