AnsweredAssumed Answered

Accessing Process Variable in external Groovy Script launched from Java Service Task

Question asked by sankarts on Jan 13, 2015
Latest reply on Jan 21, 2015 by jbarrez
My requirement is to launch external Groovy script from Java Service Task (which implements JavaDelegate).

In the Groovy script, I need to access the "Process Variable" through Execution Context i.e. DelegateExecution.


        def myArray = [] as ArrayList
   myArray  = (ArrayList)execution.getVariable("myGetVar");
   execution.setVariable("mySetVar", myArray.get(myArray.size()-1) );

Just wondering, what could be the preferred way to pass "execution" context from Java class to external Groovy script file?

Thanks in advance.

Outcomes