Lightning.Workflows.Workflow (Lightning v2.19.0-pre)
View SourceEcto model for Workflows.
A Workflow contains the fields for defining a workflow.
nameA plain text identifier. Any codepoint except a control character, seeLightning.Validators.validate_name/3, and at most 255 of them, which is the width of the column. The cap is higher than a job's 100 because workflow names predate any rule on the field, and nothing longer than the column width can already be stored.
Summary
Functions
Forces an update to the workflows updated_at timestamp and the
lock_version. This is useful when updating a child record like jobs or
triggers and a snapshot needs to made; but the Workflow itself didn't change.
Returns true if the workflow has any triggers that are going to be activated.
Types
@type t() :: %Lightning.Workflows.Workflow{ __meta__: Ecto.Schema.Metadata.t(), concurrency: term(), delete: term(), deleted_at: term(), edges: term(), enable_job_logs: term(), id: Ecto.UUID.t() | nil, inserted_at: term(), jobs: term(), lock_version: term(), name: String.t() | nil, positions: term(), project: nil | Lightning.Projects.Project.t() | Ecto.Association.NotLoaded.t(), project_id: term(), runs: term(), snapshots: term(), triggers: term(), updated_at: term(), versions: term(), work_orders: term() }
Functions
@spec touch(t()) :: Ecto.Changeset.t(t())
Forces an update to the workflows updated_at timestamp and the
lock_version. This is useful when updating a child record like jobs or
triggers and a snapshot needs to made; but the Workflow itself didn't change.
@spec workflow_activated?(Ecto.Changeset.t()) :: boolean()
Returns true if the workflow has any triggers that are going to be activated.
New triggers are enabled by default, but existing triggers are only considered
activated if their enabled field is changed to true.