[jboss-user] [jBPM] - Re: getting process variables available in service task

Thomas Colditz do-not-reply at jboss.com
Tue Aug 13 03:30:17 EDT 2013


Thomas Colditz [https://community.jboss.org/people/fellowtom] created the discussion

"Re: getting process variables available in service task"

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

--------------------------------------------------------------
Hi,

thanks for your replies. I dont know how to change "=" to "->" since using the editor(eclipse-plugin) doesn't offer this ability. You can just type parameter and variable. And the xml(service task) looks like:

<serviceTask id="_4" name="Service Task" operationRef="_4_ServiceOperation" implementation="Other" >
     <ioSpecification>          <dataInput id="_4_param" name="Parameter" />
          <dataOutput id="_4_result" name="Result" />
          <inputSet>
               <dataInputRefs>_4_param</dataInputRefs>
          </inputSet>
          <outputSet>
               <dataOutputRefs>_4_result</dataOutputRefs>
          </outputSet>
     </ioSpecification>
</serviceTask>

So there is no mapping with my variable "s" visible here.     

@Maciej: What do you mean with how/when i read from workItem? Here the sample code:
public class SampleServiceTask implements WorkItemHandler{
     public void executeWorkItem(WorkItem workItem, WorkItemManager workItemManager) {
          System.out.println(workItem.getParameter("param"));
          workItemManager.completeWorkItem(workItem.getId(), null);
    }
    public void abortWorkItem(WorkItem workItem, WorkItemManager workItemManager) {
          System.out.println("Service task aborted.");
    }
}

It makes no difference if I set "param" as precess variable on start or not ("s" ofc is set). I think I'm doing something very basic wrong atm.

Greeting,
Tom
--------------------------------------------------------------

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

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/20130813/d5ed19f5/attachment-0001.html 


More information about the jboss-user mailing list