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.


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

activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<![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);

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:

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

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

Feel free to get in touch with me on my email(mitpatoliya[AT]gmail[DOT]com) for Alfresco Consultation or any related professional services.

forums index