cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to get updated values shown on the Share Workflow Details page

lyles
Champ in-the-making
Champ in-the-making
I'm developing a custom Activiti workflow on 4.2.c and have been trying to get updated values shown on the Share workflow details page.

However that appears to be impossible!

Apparently, the workflow details page always shows the original values from the submit task when the workflow was started.

Jeff Potts' 2nd ed. tutorial on advanced workflows indicates otherwise, and states that it is possible to configure workflow-details forms for any task, and not just the submit task. Supposedly, the workflow details page will use the form from the last completed task with a matching <form id="workflow-details"> configured.

However, this does not work. I have configured a
<form id="workflow-details">
for my revise task (where I can modify the group_assignees parameter that is set in the submit task). But the workflow details page still shows the form from the submit task with the original value for group_assignees even after the revise task has successfully modified the value of group_assignees.

Has anyone had success in getting updated values shown on the Share workflow details page.
4 REPLIES 4

mitpatoliya
Star Collaborator
Star Collaborator
There are two kind of properties we are dealing with in workflow.
1) Workflow properties
2) Task properties

Workflow properties are set one perticular workflow instance which will have only one instance and most of the properties are set during startup and remain same till the end and will be shown on workflow detail.

For task properties there are different set of properties associated with each task. properties which we set during review and approval proecess most of those properties are task properties which will be visible in task detail.

Hope this gives you some more insight.

lyles
Champ in-the-making
Champ in-the-making
Thanks for the reply.

I've been struggling with this for a while, so I understand the differences and how process properties are copied to the tasks automatically but have to be coded to be set in the reverse direction.

The problem is that the workflow details page always shows the original value, which is wrong after the revise task has changed it. I'm looking for a way to show a property or variable in the workflow details page that will show the updated value and not the wrong value.

rjohnson
Star Contributor
Star Contributor
If you look in the model for a workflow there are some properties which have wf in them and some with bpm. Now, from what I have experienced (which is very little) it is quite hard to set the bpm or workflow variables, because normal assign type actions (thisvariable = thatvariable) don't work.

For example, if you have a form collecting an item of data, to make that available across tasks you have to do


execution.setVariable("sort-of-global-variable-name", task.getVariableLocal("form-field-name"));


You also have task assignees and workflow assignees and the two are different and the task assignee is not automatically inherited from the workflow assignee, which is reasonable enough when you think about it and setting a task assignee does not affect the workflow assignee, again, reasonable enough.

There are global variables which seem to relate to the workflow, e.g. bpm_assignee but again setting these does not seem to be as easy as a = b. I suspect you will need something like:-


execution.setVariable("bpm_assignee",task.getVariableLocal("you local assignee"));


I've never tried the specific thing you are trying to do so I just don't know for sure but I did struggle with the whole setting variables issue in my own (very small) custom workflow.

kraynopp
Champ in-the-making
Champ in-the-making
I have the same problem. Statement like
execution.setVariable("sort-of-global-variable-name", task.getVariableLocal("form-field-name"));

works well for everything except Workflow Details page. This page contains only original values of variables. Maybe values of Workflow Details page can be modified explicitly by some other way? Maybe some other objects like execution and task exists? I am looking for solution…
P.S.: alfresco version 4.2.c