You can test a Ruleflow using a Ruletest just as you use it to test a Rulesheet. When you test a Ruleflow in a Ruletest, the input data that you define is processed by the first Rulesheet in the Ruleflow’s sequence. After the first Rulesheet completes executing, its output becomes the input to the next Rulesheet in the sequence, and so on, until the last Rulesheet completes executing.

To test a Ruleflow using a Ruletest, you must select the Ruleflow as the Ruletest’s test subject either while creating the Ruletest or by modifying the Test Subject property in the Ruletest editor.

You specify inputs for a Ruletest by:

  1. In a Ruletest editor, drag 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. You can delete attributes that you do not require.

    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:



    Note: 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.
  2. Specify 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 Rulesheet expressions, 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.

    When you enter values for the Ruletest, it is ready to test:



    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.
  3. Select Ruletest > Run All Tests.

The Output pane then displays the final output of the Ruleflow. The Rule Messages view displays all rule messages that are created as a result of rules firing in each Rulesheet.