05-21-2009 01:07 PM
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;
}
}
}
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;
}
05-22-2009 05:08 AM
var task = workflow.getTaskById(taskId);
task.endTask(transId);
05-22-2009 05:44 AM
05-22-2009 06:53 AM
05-22-2009 09:24 AM
05-22-2009 09:30 AM
05-22-2009 09:34 AM
05-22-2009 10:18 AM
05-22-2009 10:26 AM
11-10-2009 10:38 AM
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.