Detect Changes Node in Pathways

From FojiSoft Docs
Revision as of 22:43, 5 March 2025 by Mitchell.Hirsche (talk | contribs) (Mitchell.Hirsche moved page "Detect Changes" Node in Pathways to Detect Changes Node in Pathways)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


The Detect Changes node is used to monitor specific variables or expressions within a workflow and detect if any changes occur after executing a series of tasks. This node helps identify dynamic changes in data during the workflow's runtime, enabling more responsive and adaptive process handling.


Configuration Fields

  1. Name:
    • Description: The unique name of the "Detect Changes" node.
    • Requirement: Optional but recommended for clarity in workflows.
  2. Tracked Expression:
    • Description: Defines the variable or expression to monitor for changes during workflow execution.
    • Options:
      • Script: Use a script-based expression for complex logic and evaluations.
      • Handlebars Template: Use a Handlebars-based template for straightforward dynamic evaluations.
    • Requirement: Mandatory. You must specify the tracked expression.
  3. Output Flag Variable Name:
    • Description: The name of the output variable that will store a flag indicating whether a change was detected.
    • Values:
      • The output variable will be assigned a boolean value:
        • true: If a change in the tracked expression is detected.
        • false: If no change is detected.
    • Requirement: Mandatory.

Usage Example

  1. Scenario:
    • Monitor the status of a database query result during a workflow. If the result changes (e.g., a new record is added), trigger a subsequent task to process the updated data.
  2. Setup:
    • Set Tracked Expression to evaluate the database query output.
    • Specify an output flag variable name like isChanged.
    • Use a conditional node later in the workflow to check the isChanged flag and decide the next steps.

Key Features

  • Dynamic Monitoring: Tracks changes to expressions or variables in real time.
  • Customizable Expressions: Supports both script-based and Handlebars Template logic.
  • Change Detection Output: Provides a boolean flag for conditional logic downstream in the workflow.

This node is essential for workflows that depend on detecting changes in state or data to trigger dynamic actions.