Workflow Engine v0.1.0 WE View Source

This is the WorkflowEngine api module. For more info see the README

The business id is a unique identifier, chosen form the problem domain of the application wherein this library is used. It serves to both uniquely identify a workflow, but also to create a connection between the application domain and the workflow engine.

Link to this section Summary

Functions

Retrieve all documents that are stored on this workflow.

Ask the engine for its current state. These are the steps that the engine is able to resolve

Send an event to the workflow. In case there are more outgoing sequence flows than the default it is possible to follow an other outgoing flow (or multiple). This is done by defining the next state of the engine by passing a list of the next states.

Retrieve the workflow's history.

Initialise a workflow engine. The engine is identified by a business_id. This is a unique identifier to identify the engine with. Use this id as a means of connecting your business domain to a workflow.

Start executing a workflow engine.

Link to this section Functions

Link to this function

all_documents(business_id)

View Source (since 0.1.0)

Retrieve all documents that are stored on this workflow.

Link to this function

complete_task(business_id, task_name, next_steps \\ [])

View Source (since 0.1.0)

complete a task step.

Make sure that any required documents are added or else the task cannot be completed.

Link to this function

current_state(business_id)

View Source (since 0.1.0)

Ask the engine for its current state. These are the steps that the engine is able to resolve

Link to this function

get_document(business_id, document_name)

View Source (since 0.1.0)

Retrieve a document.

Link to this function

handle_event(business_id, event_name, next_steps \\ [])

View Source (since 0.1.0)

Send an event to the workflow. In case there are more outgoing sequence flows than the default it is possible to follow an other outgoing flow (or multiple). This is done by defining the next state of the engine by passing a list of the next states.

Link to this function

history(business_id)

View Source (since 0.1.0)

Retrieve the workflow's history.

Link to this function

init_engine(business_id, workflow)

View Source (since 0.1.0)

Initialise a workflow engine. The engine is identified by a business_id. This is a unique identifier to identify the engine with. Use this id as a means of connecting your business domain to a workflow.

Link to this function

start_engine(business_id)

View Source (since 0.1.0)

Start executing a workflow engine.

Link to this function

start_task(business_id, task_name)

View Source (since 0.1.0)

Start a task step

Link to this function

store_document(business_id, document_name, data)

View Source (since 0.1.0)

Store a document.

Link to this function

update_document(business_id, document_name, data)

View Source (since 0.1.0)

Update a document