Specify input for a Ruletest
- Last Updated: June 29, 2022
- 2 minute read
- Corticon
- Version 7.2
- Documentation
In the business world, a Corticon Decision Service may receive input in different formats such as JSON and XML. However, in a Ruletest, you must specify input data in the Corticon data format.
You specify inputs for a Ruletest by:
- Dragging entities from the Rule Vocabulary view, and dropping them into the Input pane. Each time you drag and drop an entity, you create an instance of the entity, adding all the attributes in the entity to the Input pane. However, you can delete attributes that you do not require.
- Specifying values for the attributes by double-clicking name and
entering its value. The syntax for specifying these values is similar to that of
specifying attribute values in Rulesheets, with one difference—you must not enter any
values in quotes, even if the data type of the attribute is String, DateTime, Date or
Time. If you enter quotes, the Ruletest treats it as part of the value. Note: If you break any of these rules while specifying attribute values in the Input pane, Corticon Studio indicates a mismatch with a warning icon.
You can specify different entities as well as multiple instances of the same entity. When you specify multiple instances of the same entity, each entity is assigned an identity number. The identity number is 1 for the first instance of the entity, and is incremented by one for each additional instance that you drag and drop.
In the following example, several entities form the request from associations. The customer is the primary entity. The customer's association with a preferred account and with a shopping cart are what you want, and then multiple associations between items that are in the customer's shopping cart:
When you enter values for the Ruletest, it is ready to test: