As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
var taskId = args["taskId"]; var transitionId = args["transitionId"]; var task = workflow.getTaskById(taskId); var futureDate = new Date(); futureDate.setDate(futureDate.getDate() + 7); // What do I do here, there is no setProperty or anything like it that I can find? // task.setProperty("bpm:workflowDueDate", futureDate); task.endTask(transitionId);
var taskId = args["taskId"]; var transitionId = args["transitionId"]; var task = workflow.getTaskById(taskId); var futureDate = new Date(); futureDate.setDate(futureDate.getDate() + 7); // This does *not* work, unfortunately var workflowProperties = task.getProperties(); workflowProperties["bpm:workflowDueDate"] = futureDate; task.setProperties(workflowProperties); task.endTask(transitionId);
var transitionId = args["transitionId"]; var task = workflow.getTaskById(taskId); var futureDate = new Date(); futureDate.setDate(futureDate.getDate() + 7);
In the code below…where/how are you getting the transitionid? How are you populating this in the previous step? I can't seem to bring any value to this webscript that is actually the transitionid for an adhoc workflow. I'm stuck here! var transitionId = args["transitionId"]; var task = workflow.getTaskById(taskId); var futureDate = new Date(); futureDate.setDate(futureDate.getDate() + 7); Help?
My Tasks Todo: <table cellspacing=0 cellpadding=2> <tr> <th>ID</th> <th>Type</th> <th>Name</th> <th>Created Date</th> <th>Due Date</th> <th>Priority</th> <th>% Complete</th> <th>Status</th> <th>Completed</th> <th>Transitions</th> </tr> <tr> <td colspan="11"><hr/></td> </tr> <#list workflow.assignedTasks as t> <tr> <td><a href="/alfresco/wcs/GreatApp/workflow/actionList?taskId=${t.id?html}">${t.id}</a></td> <td>${t.type}</td> <td>${t.name}</td> <td>${t.properties["cm:created"]?datetime}</td> <td><#if t.properties["bpm:dueDate"]?exists>${t.properties["bpm:dueDate"]?datetime}<#else><i>None</i></#if></td> <td>${t.properties["bpm:priority"]}</td> <td>${t.properties["bpm:percentComplete"]}</td> <td>${t.properties["bpm:status"]}</td> <td>${t.isCompleted?string("Yes", "No")}</td> <td> <#list t.transitions as transition> <#if !transition.label?contains(":internal")> <span class="${t.id} ${transition.id}"> <a href="http://localhost:8080/alfresco/wcs/GreatApp/workflow/form?taskId=${t.id}&transitionId=${transition.label?html}&debug=1"> ${transition.label?html} </a> </span> <#if transition_has_next><span class="separator">|</span></#if> </#if> </#list> </td> </tr> </#list> </table>
<webscript> <shortname>listTasks</shortname> <description>listTasks test</description> <url>/GreatApp/test/listTasks</url> <authentication>user</authentication> <transaction>required</transaction> <format default="html">any</format> </webscript>