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.
Offer tokens to a task.
Open a task(`GenServer').
Pre-execute a task and the locked tokens.
Update workitem state.
Withdraw tokens from a task.
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
token_schema() :: WorkflowMetal.Storage.Schema.Token.t()
Specs
workflow_id() :: WorkflowMetal.Storage.Schema.Workflow.id()
Specs
workflow_identifier() :: WorkflowMetal.Workflow.Supervisor.workflow_identifier()
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
.
Specs
force_abandon_task(application(), task_id()) :: :ok
Abandon the task forcibly.
Specs
offer_tokens(application(), task_id(), [token_schema()]) :: :ok
Offer tokens to a task.
Specs
open_task(application(), task_schema() | task_id()) :: WorkflowMetal.Registration.Adapter.on_start_child() | {:error, :task_not_found}
Open a task(`GenServer').
Specs
preexecute(application(), task_id()) :: WorkflowMetal.Task.Task.on_preexecute()
Pre-execute a task and the locked tokens.
Specs
update_workitem(application(), task_id(), workitem_schema()) :: :ok
Update workitem state.
Specs
withdraw_tokens(application(), task_id(), [token_schema()]) :: :ok
Withdraw tokens from a task.