Assign a Task

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Business Rules > Business rules examples >

Assign a Task

Overview

Sometimes, business requirements demand that the same user is assigned several tasks in parallel from a process. Regular assignation rules jeopardize this requirement, given that assignment is done sequentially or by load, when activities are after a parallel gateway or a inclusive gateway, they can be assigned to different users. Bizagi offers two functions to return the assigned user's ID that matches the criteria. Keep in mind that these functions do not directly assign the task, this has to be done manually.

 

To get the next assigned user by load, use the following method:

 

CHelper.LoadAssig(AssigneeList, Me)

 

The following attributes are needed:

AssigneeList: List of users to select the assignee.

Me: this parameter is fixed.

 

To get the next assigned user by sequence, use the following method:

 

CHelper.SecuentialAssig(AssigneeList, Me)

 

The following attributes are needed:

AssigneeList: List of users to select the assignee.

Me: this parameter is fixed.

 

Example

Suppose that for our organization's Travel Request process we need the same Administrative Assistant that registers the bookings to manage the travel advance. This is because that person will know which are the traveler's hotel privileges, it's location, and meals included to calculate the best amount for the advance.

 

assignTask01

 

To select a user by load, use the following expression:

 

assignTask03

 

The expression shown above is as follows:

var userList = CHelper.getUsersForRole("AdministrativeAssistant");
var idAssignedUser = CHelper.LoadAssig(userList, Me);
<TravelRequest.idAdministrationAssistant> = idAssignedUser;

 

Otherwise, if you wish you select the user using a sequence, use the following expression:

 

assignTask02

 

The expression shown above is as follows:

var userList = CHelper.getUsersForRole("AdministrativeAssistant");
var idAssignedUser = CHelper.SecuentialAssig(userList, Me);
<TravelRequest.idAdministrationAssistant> = idAssignedUser;

 

Finally, when configuring performers make sure that the selected user is assigned the activities by using this setup:

 

assignTask04