Update task properties
![johanpi johanpi](https://connect.hyland.com/legacyfs/online/avatars/Blue-user-logo.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2009 01:07 PM
I cannot get the move/transition to work
My create workflow
function doWorkflow(wupload){ if (wupload != null) { try { // Get the workflow definition var workflowDefinition = workflow.getDefinitionByName("jbpm$con_rfswf:changeANDrequest"); // Create the workflow package to contain the file nodes var workflowPackage = workflow.createPackage(); var assignees = new Array(); var workflowParameters = new Array(); var futureDate = new Date(); futureDate.setDate(futureDate.getDate() + 7); workflowParameters["bpm:workflowDueDate"] = futureDate; workflowPackage.addNode(wupload); assignees[0] = lstApprover; workflowParameters["bpm:assignee"] = assignees[0]; workflowParameters["bpm:workflowDescription"] = wupload.name; var workflowPath = workflowDefinition.startWorkflow(workflowPackage, workflowParameters); } catch(error) { status.code = 500; status.message = "error=" + error; status.redirect = true; } }}
My move/transition
function transitionsByID(taskID){ var task = workflow.getTaskById(taskID); try { var assignees = new Array(); assignees[0] = lstApprover; var workflowParameters2 = new Array(); var futureDate = new Date(); futureDate.setDate(futureDate.getDate() + 17); workflowParameters2["bpm:dueDate"] = futureDate; workflowParameters2["bpm:assignee"] = assignees[0];//workflowService.setVariable("bpm:assignee", assignees[0]);workflowService.updateTask(taskID,workflowParameters2,null,null); workflow.endTask(taskID, "Service Provided"); } catch(error) { status.code = 500; status.message = "error=" + error; status.redirect = true; } return task;}
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2009 05:08 AM
just
var task = workflow.getTaskById(taskId);task.endTask(transId);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2009 05:44 AM
but how can you call workflowService.updateTask ?
In a web script workflow.workflowService is "undefined" !
Can u help me ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2009 06:53 AM
http://wiki.alfresco.com/wiki/Workflow_JavaScript_API#JscriptWorkflowTask
It looks like you can access the "properties" directly from the Java Script Task.
![johanpi johanpi](https://connect.hyland.com/legacyfs/online/avatars/Blue-user-logo.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2009 09:24 AM
workflowService.updateTask ? was from another sample.
I cannot find updateTask. It only endTask.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2009 09:30 AM
![johanpi johanpi](https://connect.hyland.com/legacyfs/online/avatars/Blue-user-logo.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2009 09:34 AM
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2009 10:18 AM
![johanpi johanpi](https://connect.hyland.com/legacyfs/online/avatars/Blue-user-logo.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2009 10:26 AM
I cannot see how.
Could you indicate one example?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2009 10:38 AM
Did you find a solution to this problem ?
![](/skins/images/A90266AC6EB1934BC937DAFB2842964E/responsive_peak/images/icon_anonymous_message.png)