2 Replies Latest reply on Dec 14, 2012 6:18 AM by Laura delli Paoli

    How to set serviceTask exit value

    Laura delli Paoli Master

      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 {



                public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {





                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?