Workflow Logic Blocks

Workflow logic blocks allow you to configure event handlers for a Screen through an intuitive point-and-click interface. You can define complex actions and conditional logic that can be triggered by attribute field updates, custom events, or at different stages of a screen's execution sequence.

To open the logic block editor for a screen:

  1. Publish the workflow (see Workflow Publishing).
  2. Open the screen's <> menu.
  3. Select Open Logic Block Editor.

Add, Rename, Find, and Delete Workflow Logic Blocks

To manage logic blocks, use the left panel of the logic block editor to:

  • Create a logic block: Click + Add New Logic Block at the bottom of the panel.
  • Rename a logic block: Click the logic block's name to select it, then type to overwrite the existing name.
  • Find a logic block: Use the Search logic block field at the top of the panel to enter search keywords.
  • Delete a logic block: Hover over the logic block's name and click the trashcan icon that appears next to it.

Configure a Workflow Logic Block's Executable Logic

The executable logic defines the actions or computations that the logic block performs when its trigger conditions are met (see Configure a Workflow Logic Block's Trigger(s)). To add executable logic to a logic block:

  1. In the logic block editor, select the logic block by clicking its name in the left panel.
  2. In the logic block editor's main panel, click the + buttons to add conditional blocks or actions to the executable logic.

Configure a Workflow Logic Block's Trigger(s)

A trigger is an event that causes a logic block’s executable logic to run. You can configure multiple triggers for each logic block.

To configure a trigger:

  1. In the Logic Block Designer, select the logic block by clicking its name in the left panel.
  2. Click the gear icon in the top-right corner of the screen to open the right panel.
  3. Fill in the sections in the Triggers & Functionality tab:
    • Functionality: Optionally enter a description of the logic block's triggers and executable logic.
    • Triggers - Data Change: Click +Add Data Change Trigger to run the executable logic when a specific attribute field is updated.
    • Triggers - On Event: Click +Add On Event Trigger run the executable logic based on one of the following events:
      • On Step Enter - Each time the screen is displayed and the screen's user interface is rendered.
      • Before Go Next - Before advancing to the next step in the workflow.
      • Before Go Previous - Before reverting to the previous step in the workflow.
      • Before Save Data - Before the screen data is saved to the database (e.g., when clicking Next).
      • After Data Refresh - After the screen state is loaded from the database.
      • On Navigation Error - When a navigation action fails.
      • Custom Event - A custom event (e.g. defined using a Button).

Preview the Workflow Logic Block's Code

The code underlying each logic block is generated automatically as you configure the block from the point-and-click interface. To view this code:

  1. In the Logic Block Designer, select the logic block by clicking its name in the left panel.
  2. Click the gear icon in the top-right corner of the Logic Block Designer to open the right panel.
  3. Select the Code Preview tab to display the generated code.

Review the Workflow Logic Block Triggers

To review the step's logic blocks grouped by their triggers:

  1. In the Logic Block Designer, click the gear icon in the top-right corner to open the right panel.
  2. Select the Triggers & Blocks tab to view all triggers configured for the form step, along with their associated logic blocks.