AnsweredAssumed Answered

Activiti REST API and

Question asked by mwm1 on Sep 2, 2015
Latest reply on Sep 7, 2015 by mwm1
Dear all,
I have one program client which use Activiti REST API to start process using CXF such as below:


ProcessInstanceCreateRequest reqProcess = new ProcessInstanceCreateRequest();

      reqProcess.setProcessDefinitionKey("processRequest");
      variable.setName("requestFromClient");
      variable.setValue(requestObject);
      reqProcess.setVariables(variables);
      
      int resp = WebClient.fromClient(rsWebClient)
            .header("Authorization", setUser()).accept("application/json")
            .type("application/json").path("/service").path("/runtime")
            .path("/process-instances").post(reqProcess).getStatus();

      return resp;


That works well.

On the other hand, I have deployed process running on Tomcat  with Activiti REST which consume Request from the client to finalize process flow.

The problem I can't do execution.getVariable("requestFromClient")

If I make toString, I can see the request from client
LOGGER.info("requestFromClient–>"
            + execution.getVariable("requestFromClient").toString());

I can see either all variables in the process by doing

for (String string : varNames) {

         LOGGER.info("Variable Named " + string + " exists");
      }


My question is how to get request from client in the process. Actually, I have  execution.getVariable("requestFromClient")  which is null.
Thank you for your reply.
Best regards
;-)

Outcomes