cancel
Showing results for 
Search instead for 
Did you mean: 

Assignee Constraint and not able to view all fields during Workflow

intrinsic
Champ in-the-making
Champ in-the-making
Hello world,

I have 2 problems I am facing when deploying a workflow.
I am using Eclipse Juno with Activiti to create the workflows and I am deploying them into an Alfresco 4.2 Community version (on my laptop) for testing.
Problem 1
At the moment I have 4 steps in the workflow. startTask - reviewTask - approveTask - end
The information that is placed into startTask is visible in the reviewTask. I then have a few fields that the reviewer fills in. In the approveTask the fields from startTask are visible but the additional fields added during the reviewTask is not visible.
I am not sure what additional I need to add in order for the information to be captured and passed through. I have tried so many different ways I can but it always returns (none).

Problem 2
This is a bit more of an advanced setup which I believe is out of my capabilities but I was wondering if I could just get some more information about it. Is it possible to have a constraint list "ie:item1, item2, item3" then if the user who has started the workflow selects item1 in the list then it would be assigned to assignee1, if the user selects item2 then the workflow will be assigned to assignee2 and so forth.

I would greatly appreciate any assistance and if any additional information is needed please let me know.

Thank you
2 REPLIES 2

intrinsic
Champ in-the-making
Champ in-the-making
After working for 2 days trying to find the solution I finally found it. Due to my lack of experience it was a really simple fix.
By simply adding a javascript file with the below code, the information on task 2, task 3 and so on are now captured and are presented in the tasks that follow.
<javascript>
function doReviewTaskComplete () {
   execution.setVariable('retest_reviewComment', task.getVariable('retest_reviewComment'));
}
</javascript>
I didn't know you had to add javascript at the end of each task in order to capture the new data. But at least I figured it out.

intrinsic
Champ in-the-making
Champ in-the-making
I had some support from another user who uses Alfresco. Below is the javascript I used in order to assign a user to the task by a selection the user selected in the task before it.
<javascript>
function doReviewTaskStart () {
   task.setAssignee('assignee name')
   if ('workflow prefix_property name' == 'value from property');
}
</javascript>
Below is an example with actual values in it.
<javascript>
function doExecutiveTaskStart () {
   task.setAssignee('John')
   if ('research_animal' == 'Giant Panda');
}
</javascript>