Decision task changes the flow of the tasks depending on a logical decision. The next step to be run is based on the results of the expression. The condition is a SQL, or C# expression that'll evaluate to a 1 or 0.

  • In this example, the Decision task runs a process that checks if the system's validation rules have passed or failed. This task considers both the status of the Enforce field and the defined tolerance.
Decision task runs a stored procedure to check if validation rules defined in the system have passed or failed.
  • In this example, a Decision task is used to determine whether a Data Transfer task was completed successfully. A corresponding email is then sent using the Send Email task.
Decision task is used to determine whether a Data Transfer task was completed successfully. A corresponding email is then sent using the Send Email task.

The key parameters include:

ParameterDescription
NameEnter the name that appears on the task.
Condition

An expression that'll evaluate to a 1 or 0. This field works together with the Script Type parameter.

For example, DateTime.Now.Month == 12.

Script Type

Select the type of script to be run:

  • SQL: Select this option to run an SQL stored procedure that evaluates to a 1 or 0.

    For example, fl.ValidationRules @Model, @Scenario, @Date, @Entity, @Audit, @Currency, @Validation.
  • C#: Select this option to evaluate a C# expression.

    For example, DateTime.Now.Month == 12
Data SourceIf the Script Type is SQL, then the Data Source indicates the schema to run the SQL statement against.
ParametersIf the script requires any parameters, they are defined in the Parameters section.
TimeoutEnter the time that the system will wait for the activity to complete.
Advance RuleSpecify how to advance to the task. The default is All predecessors have completed. 
Enforce

Specify whether the validations are hard (enforced) or soft.

For example:

  • A rule that's set to enforce will only fail if it's outside of the defined tolerance.
  • A rule that's set to not enforce will pass validations regardless of the tolerance defined.

A Decision task must be used within the workflow to leverage this feature.

To configure a Decision task:

  1. Drag the Decision task onto the Workflow Editor canvas to add it.
    Find the Decision task in the Workflow Controls section of the Workflow toolbox.
  2. Select the Decision task and select the Edit icon to edit the parameters in the Task Configuration pane. 
  3. Fill in the required parameters. 
ParameterValue
If the Script Type is SQL
  • Enter the name and parameters of an SQL stored procedure that evaluates to a 1 or 0.
  • The Data Source indicates the schema to run the SQL statement against.
If the Script Type is C# Enter an expression that'll evaluate to a 1 or 0.
  1. Select OK to apply changes in the Task Configuration pane.
  2. Select Save to save the workflow.
  3. Select Play in the Workflow Editor toolbar to start the workflow.
    The workflow process starts.