cancel
Showing results for 
Search instead for 
Did you mean: 

Task assignment to sub-group

evdgeest
Champ in-the-making
Champ in-the-making
Hello,

I want to create the following scenario:
A user root group called GBA
A user sub-group within GBA called sub-group1 (this group consists of users in GBA)
A user sub-group within GBA called sub-group2 (this group consists of managers in GBA)

The initiator starts an advanced workflow on a document, he assigns this workflow for the root group GBA. The workflow must somehow know that the next task is assigned to sub-group1 within his root group GBA. And when that task is finished, the workflow must automatically goes to sub-group2.

I hope you can understand my description, if not I will clarify it.

Thanks in advance.

Edwin
1 REPLY 1

davidc
Star Contributor
Star Contributor
There are several approaches to supporting group assignment - however, I've assumed the use of pooled tasks.  Group ids within Alfresco are unique (even if structured within sub-groups), so the following process definition outline may be used to support a process where upon starting the workflow, the first task is assigned to sub-group1 and then on completion of that task, the next task is assigned to sub-group2.


<?xml version="1.0" encoding="UTF-8"?>

<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:test2">

    <swimlane name="initiator" />

    <start-state name="start">
        <task name="wf:submitGroupReviewTask" swimlane="initiator" />
        <transition name="" to="review1" />
    </start-state>

    <swimlane name="reviewer1">
        <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
            <pooledactors>#{people.getGroup("GROUP_sub-group1")}</pooledactors>
        </assignment>   
    </swimlane>

    <task-node name="review1">
        <task name="wf:reviewTask" swimlane="reviewer1" />
        <transition name="" to="review2" />
    </task-node>

    <swimlane name="reviewer2">
        <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
            <pooledactors>#{people.getGroup("GROUP_sub-group2")}</pooledactors>
        </assignment>   
    </swimlane>

    <task-node name="review2">
        <task name="wf:reviewTask" swimlane="reviewer2" />
        <transition name="" to="end" />
    </task-node>

    <end-state name="end" />

</process-definition>