cancel
Showing results for 
Search instead for 
Did you mean: 

startWorkflow(workflowPackage, properties?)

jamesc5
Champ in-the-making
Champ in-the-making
Hi,

I've got 2.9B installed on windows server 2003. I'm trying to figure out the Workflow Javascript API. The wiki (http://wiki.alfresco.com/wiki/Workflow_JavaScript_API) says JscriptWorkflowDefinition has a method


startWorkflow(workflowPackage, properties)

What is properties, the second argument? Also, what does this method return? I'm assuming it's a workflowInstance. This is what I've got so far. Which doesn't work (throws a null pointer exception).


var pack = workflow.createPackage();
var workflowInstance = workflow.latestDefinitions[1].startWorkflow(pack, null);
1 REPLY 1

jamesc5
Champ in-the-making
Champ in-the-making
After banging around a bit I've found this post:
http://forums.alfresco.com/viewtopic.php?f=12&t=10583

In the java code I see that params is

Map<QName, Serializable>

Question: Is there a way to access the QName constants from WorkflowModel in javascript? If not, what is the correct way to construct the params to start a workflow from javascript?