Configuring rules to auto-complete tasks

You can create a rule that will close all associated tasks on a dataform regardless of the origin of the task (Workflow Channel or manual). This means you do not have to close tasks manually. Our example dataform (in the following image) uses the method _TaskAutoCompleteAll. This method completes all non-archived tasks that are associated with a dataform except for tasks that define a recurring rule.

To configure an auto-complete rule:

1. Go to System Admin > Advanced > Manage Rules.

The Custom Logic Rules dashboard opens.

2. To add a business rule, click Add.

The Rule Details form opens.

Rule Details Window Showing Auto Complete Task Configuration

3. Complete the form fields:
Dataform This is the dataform where this rule will execute when the dataform is saved.
Method Select _TaskAutoCompleteAll.
Rule Title Provide an abbreviated explanation of what this rule does.
Rule Type ClientSpace controls this field automatically. When you select the method _TaskAutoCompleteAll, the Rule Type is set to Biz Logic.
Description Provide a more thorough explanation of what this rule is to accomplish.

Primary Source

Select the dataform or tabbed child form to use as the source for the primary trigger evaluation.

Note: To save a Primary Source field value, you must select a corresponding trigger field, operator, and value. If you do not, the source value clears upon saving.

Secondary Source

Select the dataform, tabbed child form, Server Data Proc 1 (SDP1) or Server Data Proc 2 (SDP2) to use as the source for the secondary trigger evaluation, if applicable.

Note: To save a Secondary Source field value, you must select a corresponding trigger field, operator, and value. If you do not, the source value clears upon saving.

Primary Trigger Field Select the field that auto-completes the task.
Primary Trigger Value Type the value of what is stored in the database for the Trigger Field.
Secondary Trigger Field Select an additional trigger condition that must be met if necessary.
Secondary Trigger Value Set the secondary trigger value.
Execution Pipeline Leave this set to Default.
Execution Order

This field controls the order in which rules will execute first. Rules execute from lowest to the highest number. It may be necessary to look at other rules already configured on this dataform to determine the order of precedence for executing rules.

Execution Order of Precedence: Within the Rules system, there is a distinct order of precedence that occurs, that being HardError, SoftError, BizLogic. This means that setting a field to a specific value automatically with BizLogic, then validating that field with a Hard Error will never occur in the correct order, as the Hard Error will fire before the BizLogic fills the field. This order of precedence happens irrespective of the execution order placed on the configured rule, so Hard Errors will fire in Execution order least to greatest, then Soft Errors will fire in their order of execution, then the Biz Logic will happen, again in the order of execution set on each rule.

Save Action Will this rule be applied on Insert of a new dataform, or the update of an existing dataform or on both?
Workspace Template Select the Workspace Template(s) to which this rule applies.

SendNotification

When the method _TaskAutoCompleteAll is selected, then the SendNotification option is enabled. Select this option to send notifications when all tasks are auto-completed.

4. To activate the rule, select Active. Active is enabled by default.
5. Click Save.