In any business process normally there are multiple different users involved at different levels of that process. Those stack holders are very crucial part of any Business process so whenever we try to implement any workflow (Business Process) within alfresco we need to identify those different users , create those user of groups within alfresco and then set them as assignee for respective task of process.
Let us go through each of these steps in details.
Step1: Identification of different users involved in workflow
We need to go through requirement specification and flow of workflow and need to identify users involved at each stage and categories them in one of the following way.
Individual user, Group of users
There could be further complexity where particular task has multiple users or multiple groups involved.
Step2: Create users and Groups inside alfresco
Once we are done with identification create all those users and groups inside alfresco
Step3: Set assignees in Workflow
Main flow of workflow is defined in the process definition file so we also need to define which are the actors involved for particular task.
Alfresco has basically following predefined properties for accommodating users.
Variable | Description |
bpm:assignee | Individual user |
bpm:assignees | Set of user |
bpm:groupAssignee | Group |
bpm:groupAssignees | Set of Groups |
So based on requirement our assignee fall in any one of these category we need to uses one of above to define swimlane.
- Swimlanes are used to declare workflow “roles”
- Tasks are associated with a swimlane
The JBoss jBPM Identity Component is not yet plugged into Alfresco User management and thus cannot be used for swimlane and task assignments.
However, assignment may be achieved using the actor-id attribute of swimlanes and tasks.
For example, in the Adhoc Task Workflow, the Submit Adhoc Task defines an association (to cm:person) that represents the Assignee. The initiator selects a person in the Submit Adhoc Task Dialog which is then stored as a variable on the Task (named bpm_assignee). When the task is completed, the assignee variable is pushed into the process.
The process variable named “bpm_assignee” is now accessible in jPDL script and assignment expressions. Remember that references to Alfresco People are represented as Node objects and thus may be examined to obtain any property of the Person including their name or e-mail address. The following swimlane assignment demonstrates this.
<swimlane name="assignee"> <assignment actor-id="#{bpm_assignee.properties['cm:userName']}"/> </swimlane>
For Group assignment
<swimlane name="reviewer"> <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment"> <pooledactors>#{bpm_groupAssignee}</pooledactors> </assignment> </swimlane>
Or
<swimlane name=" reviewteam "> <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment"> <pooledactors>#{people.getGroup('GROUP_marketing')}</pooledactors> </assignment> </swimlane>
A special swimlane exists called “initiator”. This swimlane always has the actor that started the
Workflow. If you want to assign one or more tasks to the initiator, add the initiator swimlane to the process definition like this:
<swimlane name=”initiator”/>
Once we define different swimlanes we need to associate them with task within process definition file.
<tasknode name="reviewtask"> <task name="swf:testReview" swimlane="reviewteam"></task> <transition name="approve" to="approved"></transition> <transition name="reject" to="rejected"></transition> </tasknode>
Here whenever workflow reaches to this task it will automatically appears in my-task dashlet of all users of group called “marketing” because what we have done is created swimlane which represent marketing group users and then associated “reviewtask” task node with that swimlane.
Summary: This is how we involved different human actors in alfresco business processes (workflows) hope this helps developer in meeting up their requirements.
Looking for quality Alfresco Web Hosting? Look no further than Arvixe Web Hosting!