Rule Extension via Flow
  • 16 Jan 2024
  • 1 Minute to read
  • Dark
    Light

Rule Extension via Flow

  • Dark
    Light

Article Summary

Feature Details

Introduced in Version

8.18

Modified in Version

- -

Overview

Rule engines have limitations when it comes to manipulating data with complex strategies. This limitation can be overcome by using an Extension Flow. This Extension Flow extends the capabilities of a Rule by executing a Flow, allowing it to handle complex data manipulation before transferring the processed data back to the Rule.

If a Rule uses a Flow Extension, the Flow is executed first, followed by the Rule.


Key Points for Extension Flow

  • The Flow does not pose any special Flow behavior and is a standard Flow. Thus, users have the flexibility to pick an already-created Flow.

  • The Flow must have at least one output defined. Otherwise, an exception will be thrown when the Flow is added to the Rule.

  • The Extension Flow must be synchronous, meaning it cannot include any asynchronous operations such as Forms or Assignments.


Adding Extension Flow to Rule

  1. In the Rule Designer, navigate to the Rule Properties panel → Input → click on Pick or Create Extension Flow.

  2. A new dialog box will appear, offering the option to create a new Flow or select an existing one.


Input / Output Configuration of Extension Flow

Once the Extension Flow is added, all the inputs defined in the Flow will be available in the Properties panel of the Rule Designer. This feature allows users to easily pass values from the Rule Designer directly to the Extension Flow, providing additional convenience and flexibility.

Similarly, the output of the Extension Flow gets added to the inputs catalog of the Rule Designer to be used in the Rule.


Flow Diagram

The following diagram demonstrates how a Rule with Flow extension is executed.

  1. As soon as the Rule is run, the inputs from the Rule are passed to the extension Flow (if configured).

  2. The Extension Flow gets triggered, and the Flow is Run in the background.

  3. The output of the Flow is then passed to the Rule input catalog.

  4. The newly added input can now be used in the Rule engine as required.


Was this article helpful?