View Source StepFlow.Workflows (StepFlow v1.8.0)

The Workflows context.

Summary

Functions

Link to this function

apply_default_query_filters(query, params \\ %{})

View Source
Link to this function

change_workflow(workflow)

View Source

Returns an %Ecto.Changeset{} for tracking workflow changes.

Examples

iex> change_workflow(workflow)
%Ecto.Changeset{source: %Workflow{}}
Link to this function

create_workflow(attrs \\ %{})

View Source

Creates a workflow.

Examples

iex> create_workflow(%{field: value})
{:ok, %Workflow{}}

iex> create_workflow(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Link to this function

delete_workflow(workflow)

View Source

Deletes a Workflow.

Examples

iex> delete_workflow(workflow)
{:ok, %Workflow{}}

iex> delete_workflow(workflow)
{:error, %Ecto.Changeset{}}
Link to this function

duplicate_workflow(workflow_id, user_uuid)

View Source

Duplicates a Workflow.

Examples

iex> duplicate_workflow(workflow_id, user_uuid)
{:ok, Integer}

iex> duplicate_workflow(workflow_id, user_uuid)
{:error, %Ecto.Changeset{}}
Link to this function

filter_status(query, params, key, start_date \\ nil)

View Source
Link to this function

get_completed_statistics(scale, delta)

View Source
Link to this function

get_processing_workflow_live()

View Source

Returns processing live workflow with their reference and identifier

Link to this function

get_step_definition(job)

View Source

Gets a single workflows.

Raises Ecto.NoResultsError if the Workflow does not exist.

Examples

iex> get_workflows!(123)
%Workflow{}

iex> get_workflows!(456)
** (Ecto.NoResultsError)
Link to this function

get_workflow_for_job!(job_id)

View Source

Gets a single workflows containing the specified job ID.

Raises Ecto.NoResultsError if the Workflow does not exist.

Examples

iex> get_workflow_for_job!(19)
%Workflow{}

iex> get_workflows!(456)
** (Ecto.NoResultsError)
Link to this function

get_workflow_version_as_string(workflow)

View Source

Convert workflow version fields to a version string

Link to this function

list_workflows(params \\ %{})

View Source

Returns the list of workflows.

Examples

iex> list_workflows()
[%Workflow{}, ...]
Link to this function

pause(workflow, action, trigger_date_time)

View Source
Link to this function

preload_workflows(workflows, result \\ [])

View Source
Link to this function

update_workflow(workflow, attrs)

View Source

Updates a workflow.

Examples

iex> update_workflow(workflow, %{field: new_value})
{:ok, %Workflow{}}

iex> update_workflow(workflow, %{field: bad_value})
{:error, %Ecto.Changeset{}}