Workflow Engine v0.1.0 WE.Workflow View Source

The workflow module is a module used for describing a workflow. A workflow is a collection of steps tied together by sequence flows. There are two types of steps. These are events and tasks. An event is a step where the workflow is notified of something. It is a single point in time. A task is a step with a start, an end and a duration.

Link to this section Summary

Functions

Connect two steps to eachother by adding a sequence flow. Each step should always have one and only one outgoing default sequence flow. (except stop events)

Add a document to a step. When the step is empty the document will be added to the workflow instead. Only one document can be added per step or one per workfow when added without a name.

Add an endpoint for a workflow

Add a human task. This is something a human does.

The workflow receives a message.

Add a non-default sequence flow. This is used when a step needs more than 1 outgoing sequence flow.

Add a service task. This is something a system does.

Add a starting point for a workflow.

Create a workflow.

Link to this section Types

Link to this section Functions

Link to this function

add_default_sequence_flow(workflow, from, to)

View Source (since 0.1.0)
add_default_sequence_flow(WE.Workflow.t(), String.t(), String.t()) ::
  WE.Workflow.t()

Connect two steps to eachother by adding a sequence flow. Each step should always have one and only one outgoing default sequence flow. (except stop events)

Link to this function

add_document(workflow, document, step_name \\ "")

View Source (since 0.1.0)
add_document(Workflow.t(), WE.Document.t(), String.t()) ::
  Workflow.t() | no_return()

Add a document to a step. When the step is empty the document will be added to the workflow instead. Only one document can be added per step or one per workfow when added without a name.

Link to this function

add_end_event(workflow, name)

View Source (since 0.1.0)
add_end_event(WE.Workflow.t(), String.t()) :: WE.Workflow.t()

Add an endpoint for a workflow

Link to this function

add_human_task(workflow, name)

View Source (since 0.1.0)
add_human_task(WE.Workflow.t(), String.t()) :: WE.Workflow.t()

Add a human task. This is something a human does.

Link to this function

add_message_event(workflow, name)

View Source (since 0.1.0)
add_message_event(WE.Workflow.t(), String.t()) :: WE.Workflow.t()

The workflow receives a message.

Link to this function

add_sequence_flow(workflow, from, to)

View Source (since 0.1.0)
add_sequence_flow(WE.Workflow.t(), String.t(), String.t()) :: WE.Workflow.t()

Add a non-default sequence flow. This is used when a step needs more than 1 outgoing sequence flow.

Link to this function

add_service_task(workflow, name)

View Source (since 0.1.0)
add_service_task(WE.Workflow.t(), String.t()) :: WE.Workflow.t()

Add a service task. This is something a system does.

Link to this function

add_start_event(workflow, name)

View Source (since 0.1.0)
add_start_event(WE.Workflow.t(), String.t()) :: WE.Workflow.t()

Add a starting point for a workflow.

Link to this function

all_required_document_ids(workflow)

View Source
all_required_document_ids(WE.Workflow.t()) :: [String.t()]
Link to this function

all_required_document_ids_for_step(workflow, step_name)

View Source
all_required_document_ids_for_step(WE.Workflow.t(), String.t()) :: [String.t()]
Link to this function

get_document_reference(workflow, document_id)

View Source
get_document_reference(WE.Workflow.t(), String.t()) ::
  {:ok, WE.DocumentReference.t()} | {:error, String.t()}
Link to this function

get_document_references(workflow)

View Source
get_document_references(WE.Workflow.t()) :: [WE.DocumentReference.t()]
Link to this function

get_end_events(steps)

View Source
get_end_events([WE.State.t()]) :: [State.t()]
Link to this function

get_next(workflow, current_name)

View Source
get_next(WE.Workflow.t(), String.t()) :: [WE.State.t()]
Link to this function

get_next_steps_by_sequenceflows(workflow, sequenceflows, state)

View Source
get_next_steps_by_sequenceflows(Workflow.t(), [SequenceFlow.t()], WE.State.t()) ::
  [WE.State.t()]
Link to this function

get_start_event!(workflow)

View Source
get_start_event!(WE.Workflow.t()) :: WE.State.t() | no_return()
Link to this function

get_step_by_name(workflow, name)

View Source
get_step_by_name(WE.Workflow.t(), String.t()) ::
  {:ok, WE.State.t()} | {:error, String.t()}
get_step_by_name(WE.Workflow.t(), WE.State.t()) :: WE.State.t()
Link to this function

get_steps(workflow)

View Source
get_steps(WE.Workflow.t()) :: [WE.State.t()]
Link to this function

sequence_flows(workflow)

View Source
sequence_flows(WE.Workflow.t()) :: [WE.SequenceFlow.t()]
Link to this function

workflow(name)

View Source (since 0.1.0)
workflow(String.t()) :: WE.Workflow.t()

Create a workflow.