Lightning.Workflows.ParamsComparator (Lightning v2.14.5-pre1)

View Source

Functions for comparing workflow structures and detecting changes. This module provides functionality to compare workflows semantically (ignoring IDs and metadata by default) or exactly (comparing all fields). It's useful for detecting structural changes, generating checksums for caching, and workflow versioning.

Summary

Functions

Compares two workflow structures to determine if they are semantically equivalent.

Functions

equivalent?(workflow1, workflow2, opts \\ [])

Compares two workflow structures to determine if they are semantically equivalent.

Options

  • :mode - Either :semantic (default) or :exact
    • :semantic - Ignores IDs, timestamps, and other metadata
    • :exact - Compares all fields
  • :ignore - Nested keyword list of fields to ignore Format:
    ignore: [
      workflow: [:name, :project_id],
      jobs: [:body, :adaptor],
      triggers: [:cron_expression, :custom_path],
      edges: [:enabled]
    ]
    Special values:
    • jobs: :all - Ignore all job fields
    • triggers: :all - Ignore all trigger fields
    • edges: :all - Ignore all edge fields