06-18-2010 06:06 AM
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);
06-18-2010 06:48 PM
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);
06-21-2010 04:30 PM
06-21-2010 08:48 PM
04-18-2011 09:37 PM
var transitionId = args["transitionId"];
var task = workflow.getTaskById(taskId);
var futureDate = new Date();
futureDate.setDate(futureDate.getDate() + 7);
04-19-2011 02:37 AM
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!Fordville,
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.l...">
${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>
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.