Rule Engine
The Rule Engine allows organizations to define and manage rules for the workflows
Consider an example that you can set up a rule to provision a user in an application only if their type is Agent and they have a specific role.
Managing such rules often involves complexities like fetching user-selected properties or making multiple API calls and the Rule Engine simplifies this process.
Configuring Rule Engine in Cobalt
To configure the Rule Engine:
Navigate
Navigate to the integration in Cobalt and click on Config Portal
.
Create Dataslot
Create a new dataslot and set its type to Rule Engine.
Rule Engine Columns
Rule Engine has 3 columns:
-
LHS - This column lets users select the option that they want to use in the rule.
-
Operator - This column lets users select the operator that they want to use with the LHS value.
-
RHS - The value to compare against the LHS field.
After you create a Rule Engine dataslot, you can configure the Options
that you want to show for the LHS column.
Dynamic Columns and Operators using Conditional Code
If your use case requires you to use dynamic options you can select Use Data Source
and select a workflow that responds with a list of options instead.
The Rule Engine provides a Conditional Code
block for advanced customizations. This block allows you to dynamically set Operators and RHS values based on the selected LHS.
A sample code snippet is available in the Rule Engine settings to help you get started.
Use method cobaltRuleEngine.setColumnProperties
to modify available options dynamically.