Expose Step as a Rule
  • Updated on 10 Jul 2015
  • 3 minutes to read
  • Print
  • Dark
    Light

Expose Step as a Rule

  • Print
  • Dark
    Light

This tutorial demonstrates how to expose a step as a rule. This configuration is available for any step in Decisions that has a True/False outcome. The configuration, Expose Step as a Rule, is helpful when we need separate outcome paths ( one for true and one for false*)* . It  is also useful when we need to merge a rule steps multiple outcome into a single outcome.
Example
In a Designer Folder, clickCreate Flow.
2018-01-02_095750.png

Name the flow and click OK to proceed to the Flow Designer .
2018-01-02_095927.png

In the Flow Designer we add a Random Rule step from All Steps [Catalog] > Data > Rules category.
2018-01-02_100033-1024x768.png

This is a Rule Step that has two outcome paths,True andFalse . Depending on the rule's evaluation, our flow will execute either path.
2018-01-02_100050.png

For this example we will have a notification display if this rule evaluates as False . On the False outcome we add a Show Popup step from the Favorite Steps drop down.
2018-01-02_100136-1024x768.png

In the resulting window we configure the Subject and Message for the Show Popup step and click Add .
2018-01-02_100230-1024x768.png

Connect the outcome from the Show Popup step to the End Step . On the True outcome from the Random Rule step we add another Random Rule step from All Steps [Catalog] > Data > Rules .
2018-01-02_100418-1024x768.png

Select the second Random Rule step on the workspace to configure it. This time we do not want two outcomes from the rule step. We want this step to output both True and False values to one Outcome Path . This grants us the ability to use it for Form Control Visibility . In the step configurations, locate and expand the Outcomes section and uncheck the Expose Step as a Rule checkbox. In the Outputs section we can confirm that our step has only one outcome path now.
2018-01-02_100557-1024x768.png

On the Done outcome path from the second Random Rule step, add a Show Form step from the Favorite Steps category.
2018-01-02_100655-1024x768.png

In the resulting window we name the form and click Create to proceed.
2018-01-02_100727-1024x768.png

Our form is designed with an Action Button and a Label component. The key point for our example is that the Label visibility depends on the Flow Data's Boolean input. We will use the outcome from the second Random Rule to display the Label . When finished, save and close the Form Designer .
2018-01-02_100729.png

In the Flow Designer we connect the outcome from the Form Step to the End Step . Then, we select the Form Step on the workspace to configure data mapping for the Label visibility control in the Form . We locate showLabel Input, and with Select Value Mapping type , we select the Output from the second Random Rule step.
This completes our Flow . To test, click the Debug Flow link on the top panel of the Flow Designer .
2018-01-02_101407.png

Our Flow executes on the False outcome path from the first Random Rule step*.*
RuleEvaluatesFalse.png

When the flow is rerun, eventually, our Form shows up but the Label on the Form is not visible.
2018-01-02_101529.png

This means that our Flow executes on the True outcome path from thefirst Random Rule step and the second Random Rule step outputs a False value. When the flow is ran again, our Form displays thelabel's text. Therefore the outcome from the second Random Rule step is True as shown below.
2018-01-02_101628.png

Was this article helpful?