Cain v0.3.14 Cain.ExternalWorker behaviour View Source

Helper to handle external tasks with the Camunda-BPM.

Link to this section Summary

Types

Time in milliseconds to be locked for a Cain.ExternalWorker process while fetching a topic.

Name of the topic name in the BPMN-Model to be referenced.

Valid return values for Cain.ExternalWorker computing a referenced topic function.

Reference format to indicate the referenced.

MFA of the actual function which should be applied.

Functions

Returns a specification to start this module under a supervisor.

Link to this section Types

Specs

bpmn_error() :: {:bpmn_error, error_code(), error_message(), varibles()}

Specs

error_code() :: binary()

Specs

error_details() :: binary()

Specs

error_message() :: binary()

Specs

incident() :: {:incident, error_message(), error_details(), 0, retry_timout()}

Specs

lock_duration() :: [{:lock_duration, pos_integer()}]

Time in milliseconds to be locked for a Cain.ExternalWorker process while fetching a topic.

Specs

ref_topic_name() :: atom()

Name of the topic name in the BPMN-Model to be referenced.

Specs

retries() :: pos_integer()

Specs

retry() ::
  {:incident, error_message(), error_details(), retries(), retry_timout()}

Specs

retry_timout() :: pos_integer()

Specs

success() :: {:ok, varibles()}

Valid return values for Cain.ExternalWorker computing a referenced topic function.

Specs

Reference format to indicate the referenced.

Specs

topics() :: [topic()]

Specs

varibles() :: %{optional(atom()) => any()}
Link to this type

work_to_be_processed()

View Source

Specs

work_to_be_processed() :: {module(), atom(), keyword()}

MFA of the actual function which should be applied.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this section Callbacks

Specs

register_topics() :: topics()