Assign resources and roles to an activity

Based on whether you assign resources to an activity at design time or at runtime, they can be:

  • Static: Assign resources at design time if you know in advance which resource group or person can perform the job. For example, to hire personnel, select HR.

  • Dynamic: Assign resources at runtime to make the decision at the time of taking the activity. For example, select a resource with a specific skill level to complete a complex job.

You can assign resources and roles to an activity either manually or dynamically.

Note A process map has access to all roles created within that process map. For a fragment, any roles defined at a case level are also available. You can assign roles to an activity along with other types of resources, such as groups, individuals, or variables.

Manually allocate resources

Manually define which resources should work on a particular activity. Allocating resources manually gives you the flexibility to assign more efficient resources to activities of high importance to better balance the work.

Note You can manually allocate resources only for manual activities. Manual allocation and rules cannot be used simultaneously.

When the activity is set to use manual allocation, the status appears as Awaiting Allocation. However, if preconditions are defined for an activity, the status is Awaiting Events, and once the necessary events are raised, the status changes to Awaiting Allocation.

Once a resource is assigned to the activity awaiting allocation, the status of the activity changes to Pending.

Before manually allocating resources to an activity, set the Allocate property of the activity to Yes.

Tip On the process map, select the activity, click Settings on the Properties bar, and then click Yes for Allocate.

Dynamically allocate resources

You can allocate resources at runtime, depending on their skills and availability. Allocating resources dynamically has the following advantages:

  • Provides more flexibility to your business processes, as opposed to using design-time static resources. Static resource allocation only works in the ideal working environment where each activity is assigned to a specific person who is always available.

  • Helps you model real-life work allocation. In real life, jobs can only be assigned to the right user (with the right skills) who are available at a given time.

To define a dynamic resource, do the following:

  • Define a String variable for the process.

  • At design time, assign the String variable as a resource to the activity. At runtime, the System populates this string variable with a value containing the ResourceID in the XML format.

Note You can use a .NET activity to make the method call and populate the string variable. This activity is normally inserted before the dynamic activity.

TotalAgility provides APIs to use as dynamic variables. For example, the DynamicResourceService is used to create dynamic resource XML. Several methods are available within DynamicResourceService, such as AddResource, AddGenericResource, DeleteResource, GetNumberOfResources, and AddResourcesUsingServerIds. One method is used to pass in a resources user name and get back the resourcesID in XML format.

The method to use depends on the conditions within the process map.

You can assign resources dynamically with or without applying rules or using a previous resource. You can also update activity resource information. See the following topics for more information: