Can't get taskid from ScriptTask (groovy)

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2014 04:20 AM
I want to call external script using ScriptTask step. External script after finish his job call REST API to complete task like this:
POST http://login
ass@host/activiti-rest/service/runtime/tasks/23045 body: '{"action":"complete"}'.
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.
POST http://login

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.
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2014 01:49 AM
Hi,
I do not understand you question, but I will try to help.
Assumptions:
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.
Regards
Martin
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
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.
Regards
Martin
