Task Completed
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2011 04:09 PM
Is there a way to issue a "task completed" command from a parallel-review workflow (process definition)?
I want to be able to "end" the workflow after a certain number of people have reviewed it.
This way it comes off everyone else's queue.
Thank you! In advance
I want to be able to "end" the workflow after a certain number of people have reviewed it.
This way it comes off everyone else's queue.
Thank you! In advance
Labels:
- Labels:
-
Archive
8 REPLIES 8

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2011 10:00 PM
Dear friend,
You can use parameter in workflow process (ex: wf_countReviewer), then check that parameter for action end workflow, You can search in this forum!
Good luck!
vinaxwater
You can use parameter in workflow process (ex: wf_countReviewer), then check that parameter for action end workflow, You can search in this forum!
Good luck!
vinaxwater
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2011 08:45 AM
Thank you, vinaxwater… but I am already doing that, and it is ignoring the count. I modified parallelreview_group_processdefinition.xml. The code says transition to approved when the approve count is 2. But all it does is it sets the "outcome" of the workflow to approved. It doesn't signal the token to move to the end.
Help…
Help…
<?xml version="1.0" encoding="UTF-8"?><process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:parallelgroupreview"> <swimlane name="initiator"></swimlane> <start-state name="start"> <task name="wf:submitGroupReviewTask" swimlane="initiator" /> <transition name="" to="startreview"/> </start-state> <node name="startreview"> <action class="org.alfresco.repo.workflow.jbpm.ForEachFork"> <foreach>#{people.getMembers(bpm_groupAssignee)}</foreach> <var>reviewer</var> </action> <event type="node-enter"> <script> <variable name="wf_approveCount" access="write" /> <expression> wf_approveCount = 0; </expression> </script> </event> <transition name="review" to="review" /> </node> <task-node name="review"> <task name="wf:reviewTask"> <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment"> <actor>#{reviewer}</actor> </assignment> <event type="task-create"> <script> if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate; if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority; </script> </event> </task> <transition name="reject" to="endreview" /> <transition name="approve" to="endreview"> <script> <variable name="wf_approveCount" access="read,write" /> <expression> wf_approveCount = wf_approveCount +1; </expression> </script> </transition> </task-node> <join name="endreview"> <transition to="isapproved" /> </join> <decision name="isapproved"> <transition name="reject" to="rejected" /> <transition name="approve" to="approved"> <condition>#{wf_approveCount == 2}</condition> </transition> </decision> <task-node name="rejected"> <transition to="end" /> </task-node> <task-node name="approved"> <transition to="end" /> </task-node> <end-state name="end"/></process-definition>
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2011 10:20 AM
I even removed a step, and it still doesn't end. What the heck is going on?
<join name="endreview"> <transition to="isapproved" /> </join> <decision name="isapproved"> <transition name="reject" to="rejected" /> <transition name="approve" to="end"> <condition>#{wf_approveCount == 1}</condition> </transition> </decision> <end-state name="end"/>
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2011 03:11 PM
I figured out that it never gets to this point until all reviewers in the group have reviewed it. So we are back to square 1. How do I trigger an "end"?
<decision name="isapproved">

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2011 11:30 PM
Dear friend,
I remember when develop alfresco's workflow for my process, i have this problem. That's in join must check for both transition to approve task and reject task, I can idea edit your code:
It's work fine in my system. You can debug with logger.log(wf_approveCount); for check value wf_approveCount in process.
Goodluck.
I remember when develop alfresco's workflow for my process, i have this problem. That's in join must check for both transition to approve task and reject task, I can idea edit your code:
<task-node name="review"> <task name="wf:reviewTask"> <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment"> <actor>#{reviewer}</actor> </assignment> <event type="task-create"> <script> if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate; if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority; </script> </event> </task> <transition name="reject" to="endreview" > <script> <variable name="wf_approveCount" access="read,write" /> <expression> wf_approveCount = 0; </expression> </script> </transition> <transition name="approve" to="endreview"> <script> <variable name="wf_approveCount" access="read,write" /> <expression> wf_approveCount = wf_approveCount +1; </expression> </script> </transition> </task-node> <join name="endreview"> <transition to="isapproved" /> </join> <decision name="isapproved"> <transition name="reject" to="rejected" > <condition>#{wf_approveCount == 0}</condition> </transition> <transition name="approve" to="approved"> <condition>#{wf_approveCount == 2}</condition> </transition> </decision> <task-node name="rejected"> <transition to="end" /> </task-node> <task-node name="approved"> <transition to="end" /> </task-node> <end-state name="end"/>
It's work fine in my system. You can debug with logger.log(wf_approveCount); for check value wf_approveCount in process.
Goodluck.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2011 11:14 AM
Dear friend,
Thanks! Also – Where does logger.log end up logging to? And do I have to change any settings to get logger to work?
Thanks! Also – Where does logger.log end up logging to? And do I have to change any settings to get logger to work?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2011 12:01 PM
Dear friend,
Sorry I guess I didn't explain correctly. Let's say there are 3 reviewers. As soon as 2 people approve, I want the workflow to end… I don't want it to remain in the 3rd person's task list. When I run the code with your changes, it doesn't work the way I would like it to.
What version of Alfresco are you using? I wonder if that makes a difference.
Thanks
Sorry I guess I didn't explain correctly. Let's say there are 3 reviewers. As soon as 2 people approve, I want the workflow to end… I don't want it to remain in the 3rd person's task list. When I run the code with your changes, it doesn't work the way I would like it to.
What version of Alfresco are you using? I wonder if that makes a difference.
Thanks

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2011 10:00 PM
Dear friend,
I use version alfresco 2.9B, it's build from source in SVN. The workflow work fine it's have conditions in process.
Goodluck.
vinaxwater
I use version alfresco 2.9B, it's build from source in SVN. The workflow work fine it's have conditions in process.
Goodluck.
vinaxwater
