-1

I use JBPM 6.5.0.Final and deploy the application to Tomcat 8.5.5 . I configure all input and output mapping of each state. But after I assign new values to some attributes in a state, the web server still shows the previous values after exiting that state. Does anyone knows what are the possible causes?

@Override
public void executeWorkItem(WorkItem arg0, WorkItemManager arg1) {
    Map<String, Object> params = dummyAuthenticate(arg0, arg1);
    System.out.println("params >>>> " + JSONObject.toJSONString(params));
    arg1.completeWorkItem(arg0.getId(), params);
}

private Map<String, Object> dummyAuthenticate(WorkItem arg0, WorkItemManager arg1) {
    Map<String, Object> params = new HashMap<String, Object>();
    HashMap dataMap = (HashMap) arg0.getParameter("xml");
    params.put("nodeId", arg0.getName());
    params.put("returnCode", "00000001");
    params.put("description", "HELLO");
    return params;
}

This is the log

>>> manager: [class org.jbpm.runtime.manager.impl.SingletonRuntimeManager]
>>> engine: [class org.jbpm.runtime.manager.impl.SynchronizedRuntimeImpl]
>>> before signalEvent.
params >>>> {"returnCode":"00000001","description":"HELLO","nodeId":"Authenticate"}
>>> after signalEvent.
output >>>>>> ["20161118152028481(85 ms)","00000000","Y"]
18-Nov-2016 15:20:47.621 INFO [http-nio-9999-exec-9] org.apache.cxf.interceptor.AbstractLoggingInterceptor.log Outbound Message
陳思憫
  • 1
  • 1

1 Answers1

0

I am not sure what exactly your process definition looks like but I assume you map your process variables to work item input parameters and then want to map output parameters back to process variables.

Are you sure you are correctly mapping output parameters back to your process variables? They are stored in Result variable (java.util.Map) as you can see in my answer and comment here.

Community
  • 1
  • 1
livthomas
  • 1,160
  • 1
  • 14
  • 25