So to do it I need to know taskId. How can I get it in ScriptTask using groovy? I tried to call task.getId(), but got an exception in Activiti Explorer. Thanks a lot for your help.
I do not understand you question, but I will try to help. Assumptions:
* You have 2 process instances (A,B). * The process A is in waiting state (activity: UserTask). * process B after the start should complete user task from process A * process instance id A is input parameter to start the process instance B
Solution: Create task query from task service and ask for all task for process instance A. Query returns list of tasks for the given process instance with ids.