View Source Lightning.Workflows.Workflow (Lightning v2.10.4)

Ecto model for Workflows.

A Workflow contains the fields for defining a workflow.

  • name A plain text identifier

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(),
  id: Ecto.UUID.t() | nil,
  inserted_at: term(),
  jobs: term(),
  lock_version: term(),
  name: String.t() | nil,
  project:
    nil | Lightning.Projects.Project.t() | Ecto.Association.NotLoaded.t(),
  project_id: term(),
  runs: term(),
  snapshots: term(),
  triggers: term(),
  updated_at: term(),
  work_orders: term()
}

Functions

Link to this function

request_deletion_changeset(workflow, attrs)

View Source
@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.

Link to this function

workflow_activated?(changeset)

View Source
@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.