Home

using task properties in a workflow script

You are here

3 posts / 0 new
Last post
using task properties in a workflow script

Sorry the short post, but i can really boil down the question to:

How can i put information into a taskInstance (from a webscript) that i can use in the next workflow ScriptTask.

Like:
Webscript:

task = worklfow.getTask(id);
task.properties.wf_reviewComment = "blabla";
task.endTask("next");

Workflow:
activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
<![CDATA[<import resource="classpath:alfresco/extension/templates/webscripts/UBXLib/UBXUtils.js">]]>
logger.error("Workflow: reviewTask, complete");
content = task.getVariableLocal('wf_reviewComment');
addComment(node, title, content);
</activiti:string>
</activiti:field>
</activiti:taskListener>

I really cant list all the ways i tried, I could not get it working.

Is this supposed to work anyhow or do i get the concept wrong?

Using community edition 4.0b

Thanks a lot for any help

Best Regards
Matthias Heckmann

Re: using task properties in a workflow script

Ok, update.

Just had another problem when i wanted to update the properties of a task instance.

The problem seems to be known as described in JIRA:
https://issues.alfresco.com/jira/browse/ALF-12661

So that generally means that currently you cant update task.properties using the JavaScript API.

if somebody could confirm:
1. that the issues are related
2. that my interpretation of the mentioned JIRA issue is correct

I am using alfresco community 4.0.b

Best Regards
Matthias Heckmann

Re: using task properties in a workflow script

Yes It looks similar.
Also,Check the comments given in the issue.
You can do it via JAVA then

Mits
If this post was helpful, please click "mark comment as useful"

Arvixe Web Hosting/ Alfresco Community Liaison |
Looking for quality Alfresco Web Hosting? Look no further thanArvixe Web Hosting!