[SOLVED] Editing Properties in a workflow task
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2010 06:05 PM
Hi,
I am wondering if there is anyway in Webscript (Javascript) to set a workflow task property?
For instance if I want to change bpm:comment to "Test", what would be the Javascript code for it?
I tried doing
That didn't work. I was only able to read but not write to the property.
Any suggestion or comment is appreciated.
Thanks
I am wondering if there is anyway in Webscript (Javascript) to set a workflow task property?
For instance if I want to change bpm:comment to "Test", what would be the Javascript code for it?
I tried doing
var task.workflow.getTaskById(<id>);task.properties['bpm:comment'] = "Test";
That didn't work. I was only able to read but not write to the property.
Any suggestion or comment is appreciated.
Thanks

Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2010 03:23 AM
I'm not sure because I am a beginner but I think the correct code is like this:
As this example (used for starting a workflow instance):
But I repeat… I'm not sure…try reading the workflow javascript apis…
task.parameters['bpm:comment'] = "Test";
As this example (used for starting a workflow instance):
var workflow = actions.create("start-workflow");workflow.parameters.workflowName = "jbpm$ep:document";workflow.parameters["bpm:workflowDescription"] = "description: you can write everything";
But I repeat… I'm not sure…try reading the workflow javascript apis…
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2010 07:33 PM
I'm not sure because I am a beginner but I think the correct code is like this:task.parameters['bpm:comment'] = "Test";
As this example (used for starting a workflow instance):var workflow = actions.create("start-workflow");workflow.parameters.workflowName = "jbpm$ep:document";workflow.parameters["bpm:workflowDescription"] = "description: you can write everything";
But I repeat… I'm not sure…try reading the workflow javascript apis…
Hi raptus,
Thanks for the info, but I'm actually trying to change the properties of an already running workflow (task).
Thanks

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2010 05:32 PM
Hi,
Got a reply with Alfresco, the Javascript API for setting task properties such as setProperties() has not been implemented yet. So, instead, go with the Java-backed webscript route and use WorkflowServices.
Thanks
Got a reply with Alfresco, the Javascript API for setting task properties such as setProperties() has not been implemented yet. So, instead, go with the Java-backed webscript route and use WorkflowServices.
Thanks

