cancel
Showing results for 
Search instead for 
Did you mean: 

getProcessinstance with variables

robinho
Champ in-the-making
Champ in-the-making
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
1 REPLY 1

robinho
Champ in-the-making
Champ in-the-making
I found it
in TTSProcess, java service task:

Map<String,Object> map = execution.getVariables();