Workflow Engine v0.1.0 WE.Document View Source

This module represents a piece of required or optional data that can be attached to a workflow step or a workflow in general.

Link to this section Summary

Types

possible values: :complete | :incomplete

possible values: :required | :optional

t()

Link to this section Types

Link to this type

document_status()

View Source
document_status() :: :complete | :incomplete

possible values: :complete | :incomplete

Link to this type

document_type()

View Source
document_type() :: :required | :optional

possible values: :required | :optional

Link to this section Functions

Link to this function

data(doc)

View Source (since 0.1.0)
data(WE.Document.t()) :: map()

Retrieve the data.

Link to this function

document(name)

View Source (since 0.1.0)
document(String.t()) :: WE.Document.t()

Create a document. By default a document is required.

The same document name can only be used once per workflow.

Link to this function

from_reference(ref)

View Source
from_reference(WE.DocumentReference.t()) :: WE.Document.t()
Link to this function

has_name?(doc, document_name)

View Source
has_name?(WE.Document.t(), String.t()) :: boolean()
Link to this function

is_complete?(doc)

View Source
is_complete?(WE.Document.t()) :: boolean()
Link to this function

is_optional?(doc)

View Source
is_optional?(WE.Document.t()) :: boolean()
Link to this function

is_required?(doc)

View Source
is_required?(WE.Document.t()) :: boolean()
Link to this function

name(doc)

View Source (since 0.1.0)
name(WE.Document.t()) :: String.t()

Retrieve the name.

Link to this function

optional_document(name)

View Source (since 0.1.0)
optional_document(String.t()) :: WE.Document.t()

Create an optional document.

Link to this function

same_name?(doc1, doc2)

View Source
same_name?(WE.Document.t(), WE.Document.t()) :: boolean()
Link to this function

set_document_complete(doc)

View Source
set_document_complete(WE.Document.t()) :: WE.Document.t()
Link to this function

set_document_is_incomplete(doc)

View Source
set_document_is_incomplete(WE.Document.t()) :: WE.Document.t()

Retrieve the document_type.

Link to this function

update_data(document, data)

View Source
update_data(WE.Document.t(), term()) :: WE.Document.t()