AnsweredAssumed Answered

getProcessinstance with variables

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

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()
             .buildProcessEngine();
             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.

thanks

Regards
Rob

Outcomes