View Source StepFlow.Workflows (StepFlow v1.8.0)
The Workflows context.
Summary
Functions
Returns an %Ecto.Changeset{}
for tracking workflow changes.
Creates a workflow.
Deletes a Workflow.
Duplicates a Workflow.
Returns processing live workflow with their reference and identifier
Gets a single workflows.
Gets a single workflows containing the specified job ID.
Convert workflow version fields to a version string
Returns the list of workflows.
Updates a workflow.
Functions
Returns an %Ecto.Changeset{}
for tracking workflow changes.
Examples
iex> change_workflow(workflow)
%Ecto.Changeset{source: %Workflow{}}
Creates a workflow.
Examples
iex> create_workflow(%{field: value})
{:ok, %Workflow{}}
iex> create_workflow(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Deletes a Workflow.
Examples
iex> delete_workflow(workflow)
{:ok, %Workflow{}}
iex> delete_workflow(workflow)
{:error, %Ecto.Changeset{}}
Duplicates a Workflow.
Examples
iex> duplicate_workflow(workflow_id, user_uuid)
{:ok, Integer}
iex> duplicate_workflow(workflow_id, user_uuid)
{:error, %Ecto.Changeset{}}
Returns processing live workflow with their reference and identifier
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)
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)
Convert workflow version fields to a version string
Returns the list of workflows.
Examples
iex> list_workflows()
[%Workflow{}, ...]
Updates a workflow.
Examples
iex> update_workflow(workflow, %{field: new_value})
{:ok, %Workflow{}}
iex> update_workflow(workflow, %{field: bad_value})
{:error, %Ecto.Changeset{}}