AnsweredAssumed Answered

How to set a property before workflow transition

Question asked by sgartner on Jun 18, 2010
Latest reply on Apr 19, 2011 by sgartner
I have a workflow in state A and I need to transition it to state B in JavaScript when a user does something in my application.  In order to transition to state B I need to set the due date that they have to complete B by.  I figured I would just set bpm:workflowDueDate to today + 7 days, but I can't figure out how to set a property in an existing workflow before transitioning.  Here's the code so far, with the taskID and transitionID coming in:


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);

Help?

Outcomes