04-19-2012 10:35 PM
04-20-2012 04:44 AM
04-28-2012 08:25 PM
04-29-2012 08:37 AM
05-01-2012 05:59 AM
this is possible in both jBPM and Spring. You need to incorporate a system action when the user choses to reject his/her task, which will withdraw the task(s) assigned to (the) other assignee(s). In jBPM you can achieve this through e.g. through a jBPM script on the "rejected" transition that looks up the other tasks and signals an appropriate transition on it.If you don't mind, can you gime a sample code ?
05-04-2012 04:33 AM
<transition name="join" to="completeExecutionBranches">
<script>
<expression><![CDATA[
/* end parallel tasks in a for-loop */
/* NOTE: The current task is one of those tasks, so our "parent" token is the root for the forks */
Collection children = token.getParent().getChildren().values();
for (Token child : children) {
/* NOTE: don't mess up the current token */
if (child.getId() != token.getId()) {
/* NOTE: "end" must be a valid transition */
Collection tasks = taskMgmt.getUnfinishedTasks(child)
for (TaskInstance task : tasks) {
task.end("end");
}
}
}
]]></expression>
</script>
</transition>
[/code]
This example assumes you only have one task between your fork and join, and which has a valid transition namend "end".
Please note: For the tasks ended by this script, the current user is automatically set as the modifier / owner of the task and no (additional) data is being set in the tasks. If there are mandatory task properties to be filled, this may fail if they have not yet been set.
You should also be fairly familiar with the jBPM engine in general (not just how you use it in Alfresco) when you work with the jBPM core like this.
Regards
Axel
05-08-2012 03:13 AM
Hello,
an example based on jBPM script would be:
<transition name="join" to="completeExecutionBranches">
<script>
<expression><![CDATA[
/* end parallel tasks in a for-loop */
/* NOTE: The current task is one of those tasks, so our "parent" token is the root for the forks */
Collection children = token.getParent().getChildren().values();
for (Token child : children) {
/* NOTE: don't mess up the current token */
if (child.getId() != token.getId()) {
/* NOTE: "end" must be a valid transition */
Collection tasks = taskMgmt.getUnfinishedTasks(child)
for (TaskInstance task : tasks) {
task.end("end");
}
}
}
]]></expression>
</script>
</transition>
[/code]
This example assumes you only have one task between your fork and join, and which has a valid transition namend "end".
Please note: For the tasks ended by this script, the current user is automatically set as the modifier / owner of the task and no (additional) data is being set in the tasks. If there are mandatory task properties to be filled, this may fail if they have not yet been set.
You should also be fairly familiar with the jBPM engine in general (not just how you use it in Alfresco) when you work with the jBPM core like this.
Regards
Axel[/quote]
Thank you for your reply 😛
02-06-2013 09:12 AM
02-07-2013 05:33 AM
02-11-2013 05:39 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.