AnsweredAssumed Answered

getProcessinstance with variables

Question asked by robinho on Feb 9, 2016
Latest reply on Feb 9, 2016 by robinho

I want to start another process from my current process.

public void execute(DelegateExecution execution) throws Exception {
                   String message = (String) execution.getVariable("sqsmessage");
         Map<String, Object> mapSQSmessage = new HashMap<String, Object>();
         mapSQSmessage.put("message", message);
               //start TTSProcess
                     ProcessEngine processEngine = ProcessEngineConfiguration.createProcessEngineConfigurationFromResourceDefault()
             RuntimeService runtimeService = processEngine.getRuntimeService();
             ProcessInstance processInstance =
             runtimeService.startProcessInstanceById("TTSProcess", mapSQSmessage);       

Now in my TTSProcess how can I retrieve the variable mapSQSmessage?
I cannot find it in the runtimeService API.
I search the method to get the processinstance(if that is necessary?) and get the variable passed from "startProcessInstanceById" to start the new TTSprocess.