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

Sumeru Saha do-not-reply at jboss.com
Sat May 18 09:55:35 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/818341#818341

Hi David,

Was your problem resolved? I'm doing things similar to what you were doing ... i wanted to create a Domain Specific service task called "CallaJava" for that i wrote the below workietm definition (WID)

  "name" : "CallJava", 
  "parameters" : [ 
    "Interface" : new StringDataType(), 
    "Operation" : new StringDataType(), 
    "ParameterType" : new StringDataType(),
    "Parameter" : new ObjectDataType("com.sample.service.Student")
  "results" : [ 
    "Result" : new ObjectDataType("java.util.Map") 
  "displayName" : "CallJava", 
  "icon" : " http://localhost:8080/drools-guvnor/rest/packages/defaultPackage/assets/java-icon/binary http://localhost:8080/drools-guvnor/rest/packages/defaultPackage/assets/java-icon/binary" ,
  "defaultHandler" : "com.sample.service.ExtendedServiceTaskHandler"

I've put the jar containing my custom WorkItemHandler, a class called "com.sample.service.ExtendedServiceTaskHandler" witin *jbpm-gwt-console-server.war/WEB-INF/lib*

I've added an entry in the *jbpm-gwt-console-server.war/WEB-INF/classes/META-INF/CustomWorkItemHandlers.conf* (like below)

  "Log": new org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler(),
  "CallJava": new com.sample.service.ExtendedServiceTaskHandler(ksession),

Now i can get this handler invoked with parameters that i mentioned in the WID, i can have any java code invoked from within the handler, BUT my problem is that i can't pass any variables from the process flow (defined in the BPMN process in designer) into this handler - i can only pass literal values (of primitive types like String, int etc.). Have you been able to do that?


Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130518/7d5cd65f/attachment.html 

More information about the jboss-user mailing list