As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
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.
<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
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 :P
<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 :P