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
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)
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.
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
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.
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.
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.
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.
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.
all_required_document_ids(workflow)
View Sourceall_required_document_ids(WE.Workflow.t()) :: [String.t()]
all_required_document_ids_for_step(workflow, step_name)
View Sourceall_required_document_ids_for_step(WE.Workflow.t(), String.t()) :: [String.t()]
get_document_reference(workflow, document_id)
View Sourceget_document_reference(WE.Workflow.t(), String.t()) :: {:ok, WE.DocumentReference.t()} | {:error, String.t()}
get_document_references(workflow)
View Sourceget_document_references(WE.Workflow.t()) :: [WE.DocumentReference.t()]
get_end_events(steps)
View Sourceget_end_events([WE.State.t()]) :: [State.t()]
get_next(workflow, current_name)
View Sourceget_next(WE.Workflow.t(), String.t()) :: [WE.State.t()]
get_next_steps_by_sequenceflows(workflow, sequenceflows, state)
View Sourceget_next_steps_by_sequenceflows(Workflow.t(), [SequenceFlow.t()], WE.State.t()) :: [WE.State.t()]
get_start_event!(workflow)
View Sourceget_start_event!(WE.Workflow.t()) :: WE.State.t() | no_return()
get_step_by_name(workflow, name)
View Sourceget_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()
sequence_flows(workflow)
View Sourcesequence_flows(WE.Workflow.t()) :: [WE.SequenceFlow.t()]
workflow(name)
View Source (since 0.1.0)workflow(String.t()) :: WE.Workflow.t()
Create a workflow.