0
votes

I wanted to get workflow taskId in a script task variable(Java Script/Groovy) and want's display it on user form.

Please let me know if you have any Idea regarding this.

we are using Alfresco process service 1.9 version

Thanks in Advance.

1
you mean the task id of usertask before the script task? - Abbas Kararawala
@AbbasKararawala, That's correct, I want a task id of usertask, and I have to use it in a script task which I am taking before next level user assignee. - Deepak Talape

1 Answers

1
votes

Store the taskId in a process variable using a *ExecutionListener. create a spring bean that implements the activiti Execution Listener, in the overriden method notify(DelegateExecution execution) set your variable like:

execution.setVariable("your_var", your_var_value);

In the Script Task you can access process variables using the Execution. e.g.:

execution.getVariable("your_var");

follow the developer series for more details.