Retrieve taskId from custom control share tier
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2015 04:44 AM
I am trying to integrate a custom control within my custom workflow derived from bpm:workflowTask, in Alfresco 4.2.
My custom control invokes a webscript in the repo tier, and I need to pass the taskId for which the control instance is running to that webscript.
My goal is to retrieve task variables from the webscript by using
I don't know how to retrieve the taskId in my control.inc.ftl; any hint appreciated.
My custom control invokes a webscript in the repo tier, and I need to pass the taskId for which the control instance is running to that webscript.
My goal is to retrieve task variables from the webscript by using
var taskId = args["taskId"];var task = workflow.getTaskById(taskId);
I don't know how to retrieve the taskId in my control.inc.ftl; any hint appreciated.
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2015 09:32 AM
Hi,
You can get the task id using
You can get the task id using
${args.itemId}
in any control of the task-edit form.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2015 03:35 PM
I succeded in retrieving itemId, thanks.
That however appears to be the id of the workflow definition, not the id of the instance, therefore I cannot use it to retrieve the variables.
Did I miss something?
Elio
That however appears to be the id of the workflow definition, not the id of the instance, therefore I cannot use it to retrieve the variables.
Did I miss something?
Elio
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2015 07:29 AM
On which form are you trying to get your task id ?
The itemId is the workflow definition id on the start task form, but it should be the task id in any other task edit form.
The itemId is the workflow definition id on the start task form, but it should be the task id in any other task edit form.
