Chapter 5. Assigning Tasks

The previous chapter described all the components of the Tahiti application and how each one starts and stops.

This chapter shows you how to specify who is permitted to start a process instance and which users can perform each task in a process. You will update the process diagram to specify who is permitted to start an instance of the process and who is permitted to carry out each human task. There are several layers of decisions:

  • In the process diagram, you specify placeholders (actors) and some logical definitions (actor filter specification).
  • When you configure a process for deployment you map the placeholders to sets of users (actor mapping).
  • When the process runs, the live information is used (actor filter evaluation).

The BPMN standard defines a Performer, which specifies the resource that can perform an activity. For a human task, the resource is a person. The performer can be specified as an individual, a group, an organizational role or position, or any combination of these criteria.

The standard does not define a way to show performers in the diagram. However, it does define the concept of a lane. The container for a process in a diagram is a pool. You can divide a pool into several lanes (think swimlanes in a swimming pool). A lane can be used to organize a diagram into whatever categories you find useful, and the standard contains an example of lanes that match groups within an organization.

This chapter deals with who does what in a process, but does not consider Tahiti components that are not part of a process, like the vacation statement page. Access to these pages is controlled by login credentials, and is explained in Chapter 10.

Actors

In Bonita BPM, you use a combination of the organization definition and actors to specify who performs human tasks in a process. The organization definition contains all the people in your organization, along with the groups they belong to and the roles they have. The simplest way to structure this is to match it to your corporate hierarchy, though this is not mandatory. Your organization definition also needs to include any users outside your company who participate in processes, such as suppliers. Bonita BPM Studio contains an example organization structure, which you can use for testing while you develop a process. To see the example and how it is defined, go to the Organization menu and choose Manage. You will find Helen and her team, and the rest of the ACME employees.

You assign an actor to a lane as a placeholder for the people who can perform the human tasks in the lane. The advantage of this is that it gives a visual representation of the tasks carried out by the same actor. You are recommended to choose lane names and actor names that are clearly connected.

You can also specify an actor for a human task. This overrides the definition for the lane.

To convert the actor-placeholders into names of real people, you use actor mapping. You can map an actor to a part of the organization by specifying a group, a role, or group and role. You can also map an actor to a specific person, though this is not recommended. The mapping means that you can update your organization whenever you have a change in staffing, when an employee joins the company, switches roles internally, or leaves the company, but you do not need to update the process definitions. When a process runs, it always uses the current organization information to evaluate the actor mapping.

Filtering

After you have specified the actor for a human task, either explicitly or in the lane, you can override this by specifying an actor filter. An actor filter can either refine the actor definition or replace it completely.

An actor filter is specified in the process diagram, but is evaluated at runtime. This means that the filter can use information about the specific process instance. For example, if you assign the manager actor to the Review request task, this is not a sufficiently precise definition: the task needs to be performed by the manager of the employee who submitted the vacation request.

An actor filter can also use external system information.

Example

Suppose that the new Tahiti application is going to be tested by the employees in the HR department before it is put into production. Helen Kelly is the manager of the HR group. She belongs to the HR group and has the manager role. April Sanchez is a member of the HR group, and reports to Helen.

This is the logic sequence for determining who carries out activities when someone submits a vacation request:

Actor
In the process diagram, the Employee lane is mapped to the Employee actor.
Actor filter definition
The Employee actor is assigned to the Review request task (because this is the default actor). An actor filter is defined for the task, specifying that Review request task must be carried out by the manager of the person who submitted the request.
Actor mapping
When the process is configured and ready for testing to start, the Employee actor is mapped to the HR group. This means that anyone in the HR group can start a process instance by submitting a vacation request.
Actor filter evaluation
After a process instance is started, the identity of the requester is known, so when the actor filter is evaluated, the manager is identified and the task is assigned to them. If April submits a vacation request, Helen is asked to review it.

Updating the Process Diagram

In this section, you will update the process diagram to add a lane for each type of user, and then specify the actors for each lane.

There is already a default lane for Employees, so you just need to add lanes for Manager and HR. To add the Manager lane:

  1. Go to the palette and drag the swimlane icon onto the diagram. You can drop it anywhere on the background inside the pool. The new lane is added to the diagram.
  2. Click inside the new lane to select it.
  3. Go to the Details panel, General tab, Lane pane. 
  4. In the Name field, specify the name of the lane, Manager lane.

Do the same to add the HR lane.

Now move the diagram elements into the relevant lane by dragging and dropping them. When you do this, the links between elements usually get tangled. It is easier to move all the elements first, then move the links to make them tidier. It is not essential to keep your diagram tidy, but it makes it much easier to maintain and to collaborate with other process developers.

The position of a service task is not connected to any actor definition. However, a service task is usually done on behalf of an actor, so it is useful to position it in the lane for that actor. In your diagram, position a service task that sends an email message in the lane of the person whose actions cause the message to be sent.

When you have finished, your diagram should look like Figure 5-1:

diagram with lanes
Figure 5-1. Lanes show who performs tasks

Notice that the HR lane is empty. This is because HR receives information from the process but does not take any actions. It is still useful to keep the empty lane as a visible reminder that HR is involved in the process.

During development, while the process definition is unfinished, it is completely normal to see error and warning indicators. Generally these indicate where the definition is not yet complete, so they are useful reminders. However, you should check them from time to time to make sure that you have not introduced any errors. To list all the errors and warnings, go to the Details panel, Validation status tab, and click Refresh.

Tips for Updating a Diagram

Tidy diagrams are easier to maintain. Here are some tips to help you keep your diagram tidy when you are updating it.

Space

When you add lanes to a diagram, it can quickly become bigger than the default size of the whiteboard, even if you are displaying Bonita BPM Studio at full screen. You can change the size of the whiteboard by dragging the bottom and left-side borders. You can also use the Maximize/Minimize icons at the top-right of the whiteboard to switch between the default view and a view that shows only the whiteboard.

There is also an option in the View menu to reduce the size of the icons in the toolbar to leave more space on your screen for the whiteboard.

Pool size

You can make a pool bigger or smaller by selecting it and clicking the plus or minus icons that appear around the perimeter. 

Alignment

When you drag an element around the whiteboard, red horizontal and vertical guide-rules appear as elements get near to alignment, and disappear again when elements are not aligned. When you see the guide-rules, move the element slowly until it is aligned as you want.

Alternatively, you can switch the mouse pointer from “selection” mode to “vertical alignment” or “horizontal alignment.” You need to click the appropriate icon at the bottom left of the whiteboard and select the elements to align. For selection you can either hold down the Ctrl key and click elements to select or you can use the selection box to select several elements. When you have finished aligning elements, remember to switch back to “selection” mode (the default) by clicking the default pointer icon.

Chronology

A process diagram does not show chronology. However, for simplicity, it is preferable to keep one direction for forward! With the exception of loops, avoid having links that go “back.”

Assigning Actors and Filters

Now that you have created the lanes, the next step is to assign actors to the human tasks.

In the Employee lane, there are no visible human tasks, but an actor must be specified for the lane to define who can start an instance of the process. In this case, the actor that you need to assign, Employee, is already assigned to the lane by default, so no action is necessary.

To see the actor that is assigned to a lane:

  1. Click the lane to select it.
  2. Go to the Details panel, General tab, Actors pane.
  3. The “Select an actor” line shows the actor that is currently assigned. You can change this using the drop-down menu. If there is no suitable actor defined, you can add an actor by clicking the Add button.

In the Manager lane, use an actor filter to assign the review task to the manager of the employee who submitted the request. To do this:

  1. Click the Manager lane to select it.
  2. Go to the Details panel, General tab, Actors pane.
  3. In the “Select an actor” line, choose the Employee actor from the drop-down list.
  4. Next to “Actor filter,” click the Set button. A popup opens.
  5. In the list on the right, click “Initiator manager” to select it.
  6. Click Next.
  7. Enter a name, requesterManager, for the actor filter.
  8. Click Next.
  9. Check the box for “Assign task automatically.”
  10. Click Finish.

The result of this is that when an employee submits a vacation request, which initiates the process, the employee’s manager is identified by the process and is automatically assigned the review task.

In the HR lane there are no human tasks, so it is not necessary to assign an actor.

Summary

You have updated the diagram to specify who carries out the human tasks, adding visual information about the people impacted by the elements in the process.

The next chapter describes how to define the data model for your application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.98.166