[jboss-user] [jBPM] - Re: Example of simple process of executing a service task in JBPM Console.

Sumeru Saha do-not-reply at jboss.com
Mon Jun 3 04:30:49 EDT 2013


Sumeru Saha [https://community.jboss.org/people/sumerus] created the discussion

"Re: Example of simple process of executing a service task in JBPM Console."

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

--------------------------------------------------------------
Hi David - thanks for your reply. I've got this problem resolved of creating Domain specific service handlers. 

@Alvinuw - I'm not sure if you're also trying the same stuff as i was doing but below are the steps i did for getting a domain specific handler working in jBPM 5.4 & jBoss BRMS 5.3

1. Modify the Work definition in Guvnor
2. Upload the icon image for your new Domain specific service (for my case CallJava) into Guvnor

** After these 2 steps done successfully, the new Service Task icon will start appearing in your component pallete of the designer under the section Service Task

3. Put the jar containing custom work item handler class into jbpm-gwt-console-server.war (for jbpm 5.4) or jbpm-business-central-server.war (for jboss brms) -> WEB-INF/lib
4. Modify and added an entry in the *(...)-server.war/WEB-INF/classes/META-INF/CustomWorkItemHandlers.conf* (like below)
 [
  "Log": new org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler(), // this was existing from before
  "CallJava": new com.sample.service.ExtendedServiceTaskHandler(ksession),
]
5. If the drools.session.conf file is present in  *(...)-server.war/WEB-INF/classes/META-INF/,* *make sure it has the below line. (In BRMS, these 2 files drools.sssion.conf & CustomWorkItemhandler.conf  are not there initially, you need to create them in brms. jBPM 5.4 already had these files)*
*
*
*drools.workItemHandlers = CustomWorkItemHandlers.conf
*
6. Include the service task in your BPMN2 flow and do proper Parameter Mapping (Data Input Assignments) to pass in Process Variables. Make sure whatever values you want to pass into the handler's "execute" method, they're already set into kcontext by executing the kcontext.setVariable("someProcessVar", someProcessVar)

Hope these help.

Thanks
Sumeru
---
--------------------------------------------------------------

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130603/8abb8fe3/attachment-0001.html 


More information about the jboss-user mailing list