Define Business Events > Defining business events based on native workflows > Read Rule Association Status service tasks
  

Read Rule Association Status service tasks

You can use Read Rule Association Status service tasks to orchestrate task outcomes based on the validation statuses of rule associations defined in Enrichment and Validation Orchestrator.
For more information about Enrichment and Validation Orchestrator, see Orchestrating data enrichment and validations.
Consider the following workflow for a product onboarding process:Workflow for product onboarding, with user tasks, service tasks, a parallel gateway, and decision gateways for checking description and brand name, leading to either product onboarding or rejection.
The workflow includes multiple tasks to evaluate product details. The Check Description and Check Brand Name service tasks check the statuses of the rule associations in Enrichment and Validation Orchestrator for the product description and brand name fields. The service tasks return the statuses of the rule associations for the objective groups configured as input for the service tasks. Task outcomes, such as onboarding the product, updating its details, or rejecting it, are then determined according to the rule association statuses.
To configure a Read Rule Association Status service task, drag a service task component to the required swimlane and perform the following steps:
  1. 1Configure properties for Read Rule Association Status service tasks.
  2. 2Configure input details for Read Rule Association Status service tasks.
  3. 3Configure conditions for Read Rule Association Status service tasks.

Configure properties for Read Rule Association Status service tasks

Specify the service task type and define its basic properties.
    1Select a service task in the designer.
    2Select Read Rule Association Status.
    3Enter a name for the service task.
    4Optionally, edit the internal ID and add a description.

Input details for Read Rule Association Status service tasks

After you configure the properties of a service task, configure input details to identify the rule associations and their validation statuses for the service task.
Input details for Read Rule Association Status service tasks consist of evaluation criteria. Evaluation criteria identify rule associations based on objective groups and severity types of rule associations. To check the statuses of rule associations from different objective groups, add multiple evaluation criteria to a Read Rule Association Status service task. You can configure a task outcome for each evaluation criteria.
Each evaluation criteria consists of the following details:
Consider the example of the workflow for product onboarding. A portion of a workflow for product onboarding, with user tasks, service tasks, a parallel gateway, and decision gateways for checking description and brand name, leading to either product onboarding or rejection. The Evaulation Criteria section of the Input Details tab is highlighted. An evaluation criteria consists of several input fields.
The evaluation criteria check the statuses of rule associations with information, warning, and error severity types from the selected objective group, Predefined Objective Group for Item. If a rule association didn't run and has no status, its status defaults to Success. If a rule association has an Exception status, it remains Exception.
Based on the statuses of the rule associations that an evaluation criteria identifies, the evaluation criteria is assigned a status. You can then configure a task outcome based on that status.
For more information about evaluation criteria statuses, see Evaluation criteria status.

Evaluation criteria status

Each evaluation criteria returns a status based on how you configure the criteria and the statuses of rule associations that the criteria identifies. You can configure a task outcome for each evaluation criteria status.
An evaluation criteria can have one of the following statuses in the following order of priority:
The order of priority ensures that the criteria has the Exception result even if one rule association has the Exception status. If all rule associations run successfully, then the criteria returns the Success result.
Evaluation criteria have different results based on the combination of statuses they return:
Note:
You can configure evaluation criteria to override the Unknown and Exception statuses of rule associations. If you select the success or failed option for the
Set Rule Associations Without Status
field while configuring an evaluation criteria, then evaluation criteria can't return the Unknown status. Similarly, if you turn on the
Set the Exception Status as Failed
toggle, then the criteria can't return the Exception result.

Configure input details for Read Rule Association Status service tasks

Configure evaluation criteria to identify rule associations and their validation statuses in Enrichment and Validation Orchestrator. You can configure a task outcome for each evaluation criteria.
    1Select a service task in the designer.
    2On the Input Details tab, enter a name for the criteria.
    3Select an objective group whose rule associations you want to use.
    4Select a severity type based on which you want to identify rule associations.
    5Select the status to which to set rule associations without statuses.
    6Optionally, to set the evaluation criteria to the Exception result when an identified rule association returns the Exception status, turn on the Set the Exception Status as Failed toggle.
    7Configure additional evaluation criteria for different objective groups .

Conditions for connections for Read Rule Association Status service tasks

To design different paths in workflows, use decision gateways or inclusive gateways after service tasks. To determine the outcomes of outgoing connections from the gateways to other components in the workflow, configure conditions.
A conditions is a simple expression that uses the internal ID of a service task, criteria names, and criteria results. Conditions use the results of evaluation criteria to determine task outcomes.
For more information about expressions, see Expressions.
Consider the example of the workflow for the product onboarding process: A portion of a workflow for product onboarding, with user tasks, service tasks, a parallel gateway, and decision gateways for checking description and brand name, leading to either product onboarding or rejection. The properties of the selected connection is highlighted. The properties include name, a toggle to set the connection as the default connection, condition, and description. The Condition field contains the value for the scenario when the evaluation criteria has the Success status.
The Brand name check status decision gateway determines the task outcome based on the output value of the Check Brand Name service task.
The following sample condition is added to the connection to configure the workflow to proceed to the next step in the product onboarding process if the evaluation criteria returns the Success status:
check_brand_name.output.criteriaResult[criteriaName="CheckBrandName"][1].criteriaStatus="Success"
Similarly, the following sample conditions can be added to other connections from the Brand name check status decision gateway based on the evaulation criteria statuses:
Note:
If you want to set a connection as the default connection when conditions in other outgoing connections aren't met, then you don't have to configure a condition for the connection.

Configure conditions for Read Rule Association Status service tasks

To design different paths in workflows, configure conditions for the decision gateways or inclusive gateways after service tasks.
    1Select an outgoing connection from a service task and enter a name for it.
    2Enter a condition that uses the internal ID of the service task, a criteria name, and a criteria result.
    3Optionally, to set a connection as the default connection when conditions in other outgoing connections aren't met, turn on the Set as Default toggle.