User Activity

The user Activity is used to create an actionable item assigned to a user. In addition the User Activity creates a Task that is assigned to one or more users. The Task governs the actions the user must complete and when. The User Activity configures how the Task will be assigned and completed, while the Task is the object that governs how the user interacts with the system while the Task is running.

Because User Activities always assign a Task to a user, the terms 'User Activity' and 'Task' are often used interchangeably. Technically, the Task is a separate object from the User Activity in the Process Director system, but both are inextricably linked, and are initiated, run, and completed in tandem. From the end user's perspective, the User Activity and Task are essentially indistinguishable; however, from an implementer's perspective these objects are not the same. When creating a condition, the dropdown menu for the Choose System Variable dialog box has separate groups for Tasks and Timeline activities, each with their own attributes to access.

The Task options are only relevant to a user Task, while the Timeline Activity options are applicable to all Process Timeline activity types. The Task—which, again, is an inextricable part of a User Activity—has some evaluable properties that are not relevant to other types of Timeline Activity and are only useable when a user Task is running.

The distinction between the two is not enormously important, but it's something to keep in mind as an implementer, especially when building conditions related to User Activities. Some of the conditions you might wish to evaluate can only be found in the Task group of the dropdown menu. Similarly, the Task group is not relevant for creating conditions for non-User activities.

User Assignment #

When a User activity starts, task assignment to the configured participants runs immediately, and only runs once. If there are any running or completed instances of the Process Timeline, changing the Timeline definition will not affect them. Once the Task assignment has been made for an activity, the only way to change it in a running activity instance is to open the Process Timeline instance, open the properties for the running activity, and manually change participants or, if the configured participants have been changed, restart the activity. Both of these actions are an administrative intervention in the running instance.

The important thing to remember is that Task assignment can only occur once, and only when the activity starts running. Only the participants who are configured when the activity starts will be included in the task assignment.

You should also note that the Restart Users property, described below in the Advanced Options Tab section, may still restart some previously assigned users, based on the settings chosen. This property should be set to Start only configured task participants to ensure that only the currently configured users are assigned to the task upon restart.

If a Task has been assigned to a user, it will appear in the user's Task List. The user must complete the task before it can be removed from the Task List. A user who is assigned a task will be automatically given permission to any object in the Process Timeline package so they may complete the task. Examples of this task can be an approval task or update task.

When a Task is assigned to a user with an invalid UID or user ID, Process Director will immediately stop the process, and place the Process Timeline Activity into an error state. This is also true for anonymous user assignments if the email address isn't a valid format (Process Director can't validate the email address itself, only the format).

Note If your process includes tasks for unauthenticated users, please refer to the documentation on Anonymous Users for special concerns that may apply to some settings.

In addition to the common properties tabs that appear for all Timeline activities, the configuration settings below are unique to this Activity Type.

Documentation Example #

The example below walks through the process of configuring a User Activity.

Participants Tab #

Determines which users are a participants of the user task. Users can be added via the Add Participant button, and the participants can be specified via the Participant Type dropdown.

By default, this property is set to choose the Timeline Initiator, which is the user who prompted the Process Timeline to begin. There are several other options available to choose:

  • The Groups participant type will select all members of a Process Director User Group for Task assignment. BP Logix recommends that the Group participant type be selected whenever possible.
  • The Business Rule participant type will assign Users that are returned by a Business Rule. Unlike Groups, Business Rules reside in the Content List, and can be edited by anyone with access to them. So, while not as secure as Groups, assignment by Business Rule is more flexible, and enables complex assignment scenarios.
  • The System Variable participant type uses a System Variable that returns a User or Group to assign a Task.
  • The From Form Field participant type enables you to specify the task assignee from a User Picker Form field.
  • The Users participant type enables you to select specific users as Task assignees. This participant type is not recommended for activities that have multiple assignees, or where a single user might participate in many processes.

For more complex user assignment scenarios, the Add Participant button enables you to add as many participants as you need to an activity. It also enables you to choose different participant types for each assignee. As a practical matter, there is no upper limit to the number of Users assigned a Task, though, in most cases, the number of people assigned to a Task is relatively small.

When multiple users are assigned to a task, a Subtask can be created for each user. You must have a form field that specifies the name of each desired subtask.

In this example, each user is assigned a Subtask Name from a different form field, i.e., Subtask1Name, Subtask2Name, and Subtask3Name. When the users are assigned their task, Both the Task Name (which is the Activity's Name) and Sub Task Name will be assigned to them, so that you can track both the task and subtask for each user as they are completed.

For Process Director v 6.0.100 and higher, each subtask can have a unique due date, assigned via a System Variable. Unlike prior versions, where a single due date was assigned to both the Timeline Activity and all of it's included subtasks, you can now configure a Business Rule to return a unique Due Date for each subtask, based on any evaluable condition, such as the Sub Task Name.

In this example, the Business Rule, named SubtaskDueDatesBR, will return one of three different due dates, based on the name of the Subtask, e.g. "Subtask1", "Subtask2", or "Subtask3". On the Due Date tab of the Timeline Activity, this Business Rule is reverenced in the Set due date from system Variable property to provide the appropriate due dates for each subtask.

Since each subtask is assigned to as different user, Process Director will pass the Sub Task Name for that user to the Business Rule when the subtask is assigned, which will return the unique due date for each subtask participant.

Results Tab #

The Results Tab appears when either the User or Wait Activity Types are selected. The Process Activity also has a result, which is generated automatically, and is explained in the "Results of a Process Activity" section below.

A user Activity in the Process Timeline can have results assigned to it. Multiple results can be added to an Activity by clicking on the Add Result button.  Each result will have its own properties, which are presented in a tabbed interface.

The results will be used as the Activity result for the task, which will appear in the Routing Slip and in the Timeline Administration screen.

Result handling is the methodology used to respond to one or more Activity Results. We may need to do different things when different results are selected. Result handling defines how our application will respond to this selection. By default, when a user selects a result button, the activity completes, the result is recorded, and Process Director moves on to the next activity.

Let's take an example of an approval activity that has three configured results, and look at what result handling might be needed for each result:

  • Approve: No handling needed. Move to the next eligible activity.
  • Resubmit: Send back to the submitter for changes.
  • Deny: End the Process Timeline.

For each result, we need the application to do something completely different, but we need to implement result handling for the Resubmit and Deny results.

For most use cases, BP Logix recommends that approval activities all be placed inside a Parent activity with appropriate Looping conditions. Encapsulating the approval activities inside a Loop offers the easiest and most efficient method for configuring approval activities and handling disparate results.

Conditions Tab #

This is one of the two tabs displayed for each result's configuration settings.

The Conditions Tab includes the following controls.

Conditions Tab

Conditional Termination

Conditional termination is the methodology for ending an activity when specific conditions apply. There are three primary methods for applying conditional termination.

Consensus Results

Consensus results are only applicable to Timeline Activities that have more than one user assigned. On the Results tab of a user activity, each Result has two properties that enable you to specify that the activity will end when either a percentage or number of users select a specific result: %/# of participants that choose this result.

When a Task is assigned to multiple users, you can use one of these properties to specify that this result will be selected if the configured percentage or number of participants, respectively, chooses that result.

For example, if we have an activity that has 5 users as participants, we can set the # of participants that choose this result property to '3'. If we do, then when the activity runs, if three of the participants choose this result, the activity will complete, and the result will be recorded as the activity result. If the other two participants haven't yet completed the task, they'll be marked as not needed.

So, if we had two results, Approve and Deny, we might implement a more sophisticated set of conditions. We could set Approve as the result if three participants select it but set Deny as the result if only one participant selects it.

Obviously, setting this property requires some thought. If you have four results, and five participants are assigned the task when the activity runs, none of the results might have three of the participants select it. In that case, the activity will still end, but the result will be a list of all results selected by the participants.

When implementing consensus results, it's best to ensure that, irrespective of the results chosen by the participants, a definitive result is recorded for the activity.

Conditional Results

The Activity result condition met when property enables you to specify a condition that, when met, will set the configured result as the result for the activity.

Once the specified condition is met, the activity result is set, irrespective of the Task completion status of any participants. It's important to remember, however, that setting this property does not end the activity when the result is set. All participants in the Task will still be active, and, unless you end the activity, they can still participate and change the activity result. Your result will still be recorded when the condition is met, but activity participants can select their own results, which might be different.

For activities with a single user as a participant, an activity ends and the result is set at the same time the user selects a result button. But that's not true for activities with multiple participants. Each participant may select a different result, but the activity does not end until all participants have completed their Tasks. Similarly, setting a conditional result simply adds an additional result to the activity without completing it. By default, the activity won't complete until the user Tasks have been completed, so some additional configuration is required.

To complete the activity when a conditional result is set, you must also go to the Completed When tab and set the Completed When dropdown to When any Result Condition is Met. With this property configured, the activity will end when the conditional result is set. All active participants will be marked as Not Needed, and their tasks will be completed automatically.

Completed When Conditions

You can set a condition on the Completed When tab to complete an activity when a specified condition set evaluates as true. This condition is set using the When conditions met property. Once a condition has been specified, you'll need to set the set the Completed When dropdown to All Users Complete or Result Condition Met, to ensure the activity ends when the Completed When condition is true. Once again, some additional configuration is needed to supply a result when this configuration is implemented.

While setting a result does not end an activity automatically, an activity cannot end until a result has been set. If you set a Completed When condition to end an activity, then you must also configure a default result for the activity. Each result configured on the Results tab has a Default Result property. You must set one, and only one, result as the Default Result for the activity. Process Director must be able to identify a single result as the default to apply to the activity, or the activity cannot be completed. If you implement a Completed When condition without setting a Default Result, or if you select more than one result as the Default Result, then the activity will fall into an error state when the Completed When condition runs.

To resolve this error state administratively, you must open the Process Timeline definition to provide the proper Default Result configuration. You can then open the properties for the Timeline instance that's in the error state and navigate to its Administration/Timeline tab. You'll need to restart the activity that's in an error state, then click the Refresh button to prompt a reevaluation of the condition, which should set the appropriate Default Result and end the activity.

While the activity is in an error state, remember that the activity is still running, and the task assignments for the activity are still active. The error state only prevents the activity from completing. It does not prevent any action from the activity participants. A participating user can still complete their task by selecting a result, which would complete the activity. Of course, the result the user selects may not be the result you that desire as the Default Result. Only administrative action can ensure the correct configuration and clear the error state.

Options Tab

This is one of the two tabs displayed for each results configuration settings. The Options Tab includes the following controls.

Options Tab

Due Date Tab #

The standard options for the Due Date tab are described in the Due Date Tab section of the Timeline Activities topic. The User Activity Type also has an additional option specific to the User Activity Type.

Advanced Options Tab #

This tab provides many additional settings for controlling task assignment, completion, Activity restarts, and more, as described below.

Other Activity Types

To view the documentation for other Activity Types, you can navigate to them using the Table of Contents displayed in the upper right corner of the page, or by using one of the links below.

Notify: This Activity Type sends email notifications to users who aren't participants in the process.

Process: This Activity Type invokes a different process that will run as a separate, synchronous subprocess.

Script: This Activity Type enables you to invoke a custom script.

Custom Task: This Activity Type invokes a Custom Task to run when the Activity starts.

Form Actions: This Activity Type enables you to manipulate the Form used for the process.

Branch: This Activity Type enables you to change the operation of the Process Timeline to invoke a specified Activity.

Parent: This Activity Type serves as a container for other activities and to create a looping segment in a Process Timeline.

End Process: This Activity Type enables you to conditionally end a process.

Wait: This Activity Type enables you to pause a Process Timeline.

Case: This Activity Type enables you to manipulate the Case instance that is associated with the Process Timeline.