AnsweredAssumed Answered

[javascript] Take Ownership of a pooled task

Question asked by granddams on Jul 13, 2011
Latest reply on Jul 29, 2011 by granddams
Hi all,

i'd like to create my own javascript webscript which could give ownership of a pooled task to a specific user. Simple idea isn't it?
But i'm looking for a few days, and i'm a bit lost with tracks i found.

* the following line doesn't work
workflow.getTaskById(PooledTaskid).properties["cm:owner"] = "admin";
Is it really the property "owner" which i've to update?

* How can i use the method "setProperties" if it really exists in the workflow api?
What about method "setPooled" in the workflow api? Do you have any exemples of how i can use it?

* (last post)
these posts use a java backed webscript which seems to work, but i search a solution with javascript api cause i suck in java…

Any ideas?

And if i'm REALLY obliged to use java, i work on alfresco 3.4e and there's just a sdk for 3.4d, will i be in troubles?
One solution could be to create a java backed webscript which makes what i want and a seconde solution is perhaps like in this french post ( to extend the javascript api with my own class.
I don't know which class i've to extend and how to use code of the post
Map<QName, Serializable> params = new HashMap<QName, Serializable>();
params.put(ContentModel.PROP_OWNER, owner);
WorkflowTask updatedTask = workflowService.updateTask(taskId, params, null, null);  
Moreover, since 2009 the code could have change, isn't it?

Any help would be very appreciated!