Discussion:
[jboss-user] [jBPM] - Re: Exposing WorkItemHandler as an EJB (3.1) and referencing that work item handler from the BPMN process definition
Maciej Swiderski
2012-07-13 15:54:08 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: Exposing WorkItemHandler as an EJB (3.1) and referencing that work item handler from the BPMN process definition"

To view the discussion, visit: https://community.jboss.org/message/748070#748070

--------------------------------------------------------------
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 :)

Cheers
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/748070#748070]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Lukasz Zdobylak
2013-07-15 12:32:09 UTC
Permalink
Lukasz Zdobylak [https://community.jboss.org/people/lukasz.zdobylak] created the discussion

"Re: Exposing WorkItemHandler as an EJB (3.1) and referencing that work item handler from the BPMN process definition"

To view the discussion, visit: https://community.jboss.org/message/827964#827964

--------------------------------------------------------------
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.
Services would be as ejb3s but then how we can put this ejbCallerWorkItemHandler on the brms classpath?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/827964#827964]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2013-07-16 06:09:24 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: Exposing WorkItemHandler as an EJB (3.1) and referencing that work item handler from the BPMN process definition"

To view the discussion, visit: https://community.jboss.org/message/828115#828115

--------------------------------------------------------------
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.

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/828115#828115]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Lukasz Zdobylak
2013-07-16 06:45:51 UTC
Permalink
Lukasz Zdobylak [https://community.jboss.org/people/lukasz.zdobylak] created the discussion

"Re: Exposing WorkItemHandler as an EJB (3.1) and referencing that work item handler from the BPMN process definition"

To view the discussion, visit: https://community.jboss.org/message/828119#828119

--------------------------------------------------------------
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?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/828119#828119]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...