1 of 1 people found this helpful
Second option is definitely the way to go, in my opinion. This is why work item handlers are available so various implementation can be provided without waiting for another release of the engine. Moreover, since this is open source we value a lot community contribution so if you consider implementing this maybe you could later on contribute it to the code base so next release could already have that out of the box
Hi Maciej, can you then please advice how to deploy this kind of workItemHandlers to the exsisting BRMS?
We in our company have BRMS set up as a common automation service to which we want to deploy processes but the brms shall handle the execution of a process instances (I mean that we don't want to run in the Thread od our app).
Services would be as ejb3s but then how we can put this ejbCallerWorkItemHandler on the brms classpath?
Lukasz, the common way for including custom work item handlers for jbpm/brms in version 5 is to place the libs into the jbpm-console-server/business-central-server war, inside WEB-INF/lib so the jbpm runtime engine can find it. Then you need to register them on the ksession and that is again done via files bundled in the *-server.war. Inside WEB-INF/classes/META-INF folder you should find CustomWorkItemHandlers.conf file, you need to add your custom work item handler there in following form:
"NAME OF THE WORK ITEM": new FullyQualifiedClassName()
if there are any entires already defined just add them as next element of the array. This is MVEL file and you should be able to use ksession as constructor argument if you need access to ksession inside your work item handler.
Thank you for fast response.
We have few issues here
1) when we have jboss as 7, the modules deployed don't have static name (those are extracted in directories which names are hashes)
2) we need to dynamically deploy processes (and service impl) to the working instance of jboss brms and restarting brms is rather unacceptable. (there are many applications that would use brms).
Can you also help me understanding how jbpm works in context of the Threads?
I mean I am not sure if jpbm is fully operational service which manages own threads or it is using threads of clients which are calling some methods?
Eg when we start process instance from REST if it is started in thread managed by business-central, but when process reaches wait state (asynch service without completeWorkItem) and then external service wants to completeWorkItem, the process will continue in external service thread?