AnsweredAssumed Answered

The workflow doesn' t start

Question asked by frank83 on Jan 29, 2008
Latest reply on Feb 9, 2008 by frank83
Hi I have a problem; i would start a Reject & Approve workflow only adding a content in a space. So I have used this code taken in wiki:

var workflow = actions.create("start-workflow"); 

workflow.parameters.workflowName = "jbpm$wf:review";

workflow.parameters["bpm:workflowDescription"] = "The attached documents have been uploaded . Please review within 3 days.";

workflow.parameters["bpm:assignee"] = "admin";

var futureDate = new Date();

futureDate.setDate(futureDate.getDate() + 3);

workflow.parameters["bpm:workflowDueDate"] = futureDate;

workflow.execute(document);

I saved it in DataDictionary/Scripts, then  the rule "Execute script" and so after creating the content in the space, the workflow doesn' start. Why?
I have to install something? An answer please.Sorry the inexperience.
Thanks

Outcomes