[jboss-user] [jBPM] - How to set serviceTask exit value

Laura delli Paoli do-not-reply at jboss.com
Fri Dec 14 04:33:30 EST 2012


Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"How to set serviceTask exit value"

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

--------------------------------------------------------------
Hello everybody, 
I created such a service task:
[
    "name" : "LogTask",
    "parameters" : [
                    "par1" : new StringDataType(),
                    "par2" : new StringDataType(),
    ],
    "results" : [
        "LogTaskExitValue" : new IntegerDataType()
    ],
    "displayName" : "LogTask",
    "category" : "External Applications",
    "defaultHandler" : "eu.discoveryreply.serviceLayer.jbpm.RunActionHandler",
    "dependencies" : [
    ]
  ]

and the following handler

public class LogTaskHandler implements WorkItemHandler {

          @Override
          public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {
       }


          @Override
          public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
                    System.out.println("This is LogTaskHandler");
                    int exitValue=1;
                    Map<String, Object> result = new HashMap<String, Object>();
                    result.put("LogTaskExitValue", new Integer(exitValue));

                    manager.completeWorkItem(workItem.getId(), result);
          }
}

but I cannot access the LogTaskExitValue varaible from a script task placed in the same process, after the log task.

Can anyone help me setting the LogTask Output?

Thanks 
Laura
--------------------------------------------------------------

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

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/20121214/731beec1/attachment.html 


More information about the jboss-user mailing list