Set Workflow Users Alfresco jBPM Workflow

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="#{['cm:userName']}"/>


For Group assignment

<swimlane name="reviewer">

<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">





<swimlane name=" reviewteam ">

<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">




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>



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!

Tags: , , , , , , , , , , , , , | Posted under Alfresco | RSS 2.0

Author Spotlight


I love opensource technologies working with those technologies from the time I have stepped in to the Software Industry. Alfresco CMS is my area of expertise. I have worked on various complex implementations which involved integration of Alfresco with other technologies, extensively worked with JBPM workflows and Webscripts.

Leave a Reply

Your email address will not be published. Required fields are marked *