Forward and Backward Rule Chaining
  • 21 Feb 2020
  • 1 Minute to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Forward and Backward Rule Chaining

  • Dark
    Light

Article summary

Overview

Rule Chains are a set of rules combined in a sequence that generate facts (outcomes). They add more context to the process that can be used. They can be used in any kind of business Process where dynamic decisions making is necessary. Forward and backward Rule chaining are two types of Rule chaining that can be used. Forward Rule chaining makes all outputs available as inputs to be used throughout the sequence. Backward rule chaining limits the inputs and outputs that can be used.

What is Forward Rule Chain?

Forward Chaining is the ability to take inputs, generate outputs and consume those outputs as inputs downstream. This is the default setup with Rule chains.

What is Backward Rule Chain?

Backward Chaining is the ability to select an outcome and only require inputs that are necessary to reach that outcome. When outputs are selected, this narrows down the inputs only for that output. This process limits the number of inputs that are brought into the Rule chain. It will not run all the rules.

Example

This example has a Rule Chain setup and will explain how Forward and Backward Rule chaining works. This Rule chain example is created to provide a treatment plan for a patient. Below is the image of how the Rule Chain is Built.

2020-01-23_11h06_32.png

Forward Rule Chain

By default, the example Rule Chain is a Forward Rule chaining since all the outcomes/Inputs are used through the process. When this rule chain is ran it will display all the inputs: "Age", "Ailment", "Patient", and outputs: "Days", "Dosage Frequency", "Result", "Patient Health", "Adult Supervision Required", "NecessaryMedication".

2020-01-23_11h13_00.png

Backward Rule Chain

For Backward Rule Chaining, some outcomes will be deselected from the properties tab of the Step. Notice that as the outcomes are deselected the Inputs are removed as well. This is because only the inputs required for the selected outcome are used. In the example below, the user only wants the "Patient Health" outcome so only that outcome is selected. This reduced the input values to only "Patient" value.

Backward chaining.gif

When this Rule chain is run with the modifications, the Input and outputs are limited compared to the results of the Forward rule chain.

2020-01-23_11h42_31.png

This concludes the example on Forward and Backward Rule chain.


For more information navigate to Rule Chains


Was this article helpful?

What's Next