-
1. Re: jBPM6: Deploy custom work item handlers OTB
swiderski.maciej Jun 4, 2014 1:41 AM (in response to lauradp)1 of 1 people found this helpfulnot in 6.0.x due to limitation in handling properly classloaders, it will be possible in 6.1.0 with two options:
- deployment descriptors
- kmodule.xml
in one of these files you'll be able to define work item handlers and then the handlers (as implementation) would need to be added as dependency to your project.
HTH
-
2. Re: jBPM6: Deploy custom work item handlers OTB
lauradp Jun 4, 2014 12:40 PM (in response to swiderski.maciej)Thanks for your answer Maciej!
I tried to add a jar containing my workItems as a global jboss module (http://www.mastertheboss.com/jboss-as-7/how-to-install-a-module-on-jboss-as-7),
<subsystem xmlns="urn:jboss:domain:ee:1.0" >
<global-modules>
<module name="my.module.name" slot="main" />
</global-modules>
</subsystem>
but I get the same error
should I add this module to jbpm dependencies, and, If so, how should I edit build.xml file?
-
3. Re: jBPM6: Deploy custom work item handlers OTB
swiderski.maciej Jun 5, 2014 3:44 AM (in response to lauradp)I assume you only paced the jar on classpath (global modules should be added to all deployments) but there is no configuration that tells jbpm about your handler. So you need to add configuration in the conf file that is stored in WEB-INF/classes/META-INF.
Alternatively you can place these drools.session.conf and CustomWorkItemHandlers.conf (copy them from web app) in your home directory as these files should be read from there too if you don't want to edit files in web appl.
HTH
-
4. Re: jBPM6: Deploy custom work item handlers OTB
lauradp Jun 5, 2014 3:56 AM (in response to swiderski.maciej)Hi Maciej,
thanks for your answer.
I placed my_module.jar and module.xml in
%JBOSS_HOME%/modules/my_module_path/main
end I declared it in standalone.xml:
<subsystem xmlns="urn:jboss:domain:ee:1.0" >
<global-modules>
<module name="my.module.name" slot="main" />
</global-modules>
</subsystem>
What do you mean when you say: "So you need to add configuration in the conf file that is stored in WEB-INF/classes/META-INF."?
What do you mean with m"my home directory" and if I place there drools.session.conf and CustomWorkItemHandlers.conf can I run my processes from jbpm-console.
Laura
-
5. Re: jBPM6: Deploy custom work item handlers OTB
swiderski.maciej Jun 5, 2014 4:07 AM (in response to lauradp)look here where you can find example of conf files that are responsible for registration of work item handlers. So you go to jbpm-console.war/WEB-INF/classes/META-INF and add entry for you handler into CustomWorkItemHandlers.conf or copy these files into your user home directory and then modify. Anyway you need to modify CustomWorkItemHandler.conf file. Easiest is to modify that one stored in WEB-INF/classes/META-INF
HTH
-
6. Re: jBPM6: Deploy custom work item handlers OTB
lauradp Jun 5, 2014 9:41 AM (in response to swiderski.maciej)Maciej,
you mean that If I create a new version of the module containing one more workitemHandler for a new service I need to add a new entry in the CustomWorkItemHandler.conf placed inside jbpm-console.war.
What about creating a MyCustomWorkItemHandler.conf in my module's jar. Is there any way for referencing it only once in jbpm-console.war's configuration?
Laura
UPDATE
I modified myHandlersModule.jar putting a META-INF folder containing MyCustomWorkItemHandlers.conf with custom my handlers declarations, then I tested this configuration:
1) In jbpm-console.war bpm-console.war/WEB-INF/classes/META-INF/drools.session:
drools.workItemHandlers = MyCustomWorkItemHandlers.conf
while starting demo I get the errors reported in deploy-err.log attachment, when running my process I get the error listed in error2.log attachment.
-
deploy-err.log.zip 3.0 KB
-
error2.log.zip 2.0 KB
-
-
7. Re: jBPM6: Deploy custom work item handlers OTB
lauradp Feb 3, 2015 1:41 PM (in response to swiderski.maciej)Hi Maciej,
can you confirm that custom workItem can be deploed in jBpm 6.1?
How does it work?
Laura
-
8. Re: jBPM6: Deploy custom work item handlers OTB
sanjay05222 Feb 3, 2015 2:49 PM (in response to swiderski.maciej)Hi Maciej ,
I have tried custom work item by following below mention steps and it works fine but I would like to have more details of how to configure using the kmodule.xml/deployment descriptors.
Steps Followed : Which Works.
1. Extended the class from the WebSericeWorkItemHandler or similar interace provided in the Jbpm
2. Packed the class in jar.
3. Dropped in the web-inf\lib folder
4. Configured in the CustomWorkItemHandlers.conf
5. Add the info in the xxx.wid file inside the jbpm myproject.
6. Redeploy the war and Execute the BPM Process.
Please provide if you can step by step for your second solution where we don't have to hack the jbpm-console.war and able to do it by just within the jbpm project we create and deploy it directly . I think that is the key point for this to be more successful.
Pardon me Laura just incase I am hijacking your question.
Thanks
Sanjay Gautam
-
9. Re: jBPM6: Deploy custom work item handlers OTB
brepine Apr 2, 2015 1:06 PM (in response to lauradp)Hello,
I'm working on the same.
Has anyone found a solution to this?
Modifying the jpbm-console.war is less than ideal.
Thanks,Burt Repine
-
10. Re: jBPM6: Deploy custom work item handlers OTB
barnaby33 Apr 15, 2015 10:54 AM (in response to lauradp)How about creating a custom work item handler and registering it once, where it goes into JNDI and gets out the actual handler as an EJB, or Spring Bean. That way you could actually use DI to configure the handler to do things like query and update databases.
I'm new to jBPM and using 6.2, but the processes involved in custom work item handlers seem pretty barbaric.