View Source WorkflowMetal.Task.Supervisor (workflow_metal v0.2.1)

DynamicSupervisor to supervise all tasks of a workflow.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Abandon the task forcibly.

Open a task(`GenServer').

Pre-execute a task and the locked tokens.

Link to this section Types

Specs

application() :: WorkflowMetal.Application.t()

Specs

task_id() :: WorkflowMetal.Storage.Schema.Task.id()

Specs

task_schema() :: WorkflowMetal.Storage.Schema.Task.t()

Specs

Specs

Specs

Specs

workitem_schema() :: WorkflowMetal.Storage.Schema.Workitem.t()

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

force_abandon_task(application, task_id)

View Source

Specs

force_abandon_task(application(), task_id()) :: :ok

Abandon the task forcibly.

Link to this function

offer_tokens(application, task_id, token_schemas)

View Source

Specs

offer_tokens(application(), task_id(), [token_schema()]) :: :ok

Offer tokens to a task.

Link to this function

open_task(application, task_schema)

View Source

Specs

open_task(application(), task_schema() | task_id()) ::
  WorkflowMetal.Registration.Adapter.on_start_child()
  | {:error, :task_not_found}

Open a task(`GenServer').

Link to this function

preexecute(application, task_id)

View Source

Specs

Pre-execute a task and the locked tokens.

Link to this function

update_workitem(application, task_id, workitem_schema)

View Source

Specs

update_workitem(application(), task_id(), workitem_schema()) :: :ok

Update workitem state.

Link to this function

withdraw_tokens(application, task_id, token_schemas)

View Source

Specs

withdraw_tokens(application(), task_id(), [token_schema()]) :: :ok

Withdraw tokens from a task.