Creating Statement Rules
  • 15 Aug 2024
  • 2 Minutes to read
  • Dark
    Light

Creating Statement Rules

  • Dark
    Light

Article summary

Overview

A Statement Rule is the most commonly used Rule type. This Rule uses input data and pre-defined conditions based on the data type to form logical statements that evaluate either as True or False. The Rule can be organized and rearranged based on the business need.


Properties

The following sections describe the function of each property found under the Properties tab. 

Service Settings

The SERVICE SETTINGS category configures properties regarding the use of API Services to call the Statement Rules.

PropertyFunction
Integration Type Dictates whether the Statement Rule is or isn't called using a REST Service that supports HTTP methods. 

API Service Uses REST to call on the Statement Rule.


Data Format Determines the format of the called Statement Rule; options include JSON, Raw, RawJson, RawXml, and XML. 


Reference TypeChooses the method by which the Statement Rule is referenced; options include Id, Id or Path, Path, and Url.


Override Service URLAllows customization of the Service URL. The Service URL allows the user to make API calls using the Base Portal URL, followed by "restapi" and the rest of the user-configured Url. 


Configure HTTP MethodsSelects the desired HTTP methods; GET, POST, and/or PUT. 

NoneDoes not use REST to call the External Statement Rule.

Input 

Used to determine how data is provided for the Input column of the Truth Table

PropertyFunction
Specify Default InputsAllows the user to provide default data for the Statement Rule from within the Statement Rule Designer. 
PICK OR CREATE DEFAULT SAMPLE SETAllows the user to PICK or CREATE a Report for use as sample data.

Output 

This section pertains to how data is handled after the Statement Rule is run.

PropertyFunction
Allow ActionsEnables the UNITTESTS category, which is used to enable Actions on Unit Tests that are run using the Statement Rule
Allow Else ResultAdds a new outcome as an Else to the Result block.
Missing ResultAdds a new outcome as Missing to the Result block.

Settings 

Determines whether the Statement Rule is active/enabled and for what period of time. 

PropertyFunction
EnabledEnables the Statement Rule by default.
Use Enabled RulesEnables the Statement Rule based upon a user-defined Rule. 
Begin DateEstablishes the beginning date for when the Statement Rule is enabled. 
End DateSets when the Statement Rule will be disabled.

Example

  1. Create a Rule and define the inputs. This example uses Email (String) and Expenses(Decimal).
  2. Choose input from Select Data Element. Choose the Verb (condition). Set the value for the condition, which could be constant or passed dynamically through the Select From Flow.
  3. Click on the Add. Add Condition to add another Either/Or block.
  4. Once the Either/Or statement block has been created, click Add and define conditions for each section.
  5. By right-clicking on the conditions block, users can take the following actions:

    User ActionsDescription
    Add ConditionAdds an "and" condition.
    Add Either/Or Group
    Will add another Either/Or condition.
    Add NotApplies the not condition to the Rule.
    DeleteDeletes the selected condition.
    Move Up or Move DownProvides flexibility in organizing the Rule by moving conditions up or down.
    CopyCopies the Block and the condition within it. Only AND block with a single condition can be copied.
    PastePastes the copied block.
    Paste AfterPastes the copied block below the selected block.
    Swap Output Data (available only on Then block)This will swap the result from True to False. (similar to not condition)


Feature Changes

DescriptionVersionDateDeveloper Task
Added the ability to Flip True/False on Statement Rules
8.12 June 7, 2023
[DT-037939]

For further information on Rules, visit the Decisions Forum.

Was this article helpful?