AnsweredAssumed Answered

task properties in javascript workflow api

Question asked by r1ch4rd on Oct 30, 2008
[Also posted in the web scripts forum; apologies for the duplication]

Hi Folks,

I am trying to introduce a REST web service for controlling workflows using the web scripts framework. I've found it relatively straightforward to write GET requests which expose the workflow state, but I am having problems controlling the workflow. There are methods such as [definition].startWorkflow(), which will take some task properties as an argument, but I need to be able to pass in further workflow properties as the process executes. I have been able to execute the following code with success:

var task = workflow.getTaskByID(taskID);["someProperty"] = "someValue";

but this property only persists for the duration of the existance of the javascript task object. I need to persist this information in Alfresco somehow. I've looked at the source code for the java objects which back the javascript api, and can't find anything like a commit() or save() method, or see any persistance annotations. How can I get my properties to persist between requests?

Or am I approaching workflow task model properties in the wrong way?

Any advice gratefully appreciated.