View Source WorkflowMetal.Workitem.Supervisor (workflow_metal v0.2.1)
DynamicSupervisor
to supervise all workitems of a workflow.
Link to this section Summary
Functions
Abandon a workitem.
Returns a specification to start this module under a supervisor.
Complete a workitem.
Open a workitem(`:gen_statem').
Lock tokens before a workitem execution.
Link to this section Types
Specs
application() :: WorkflowMetal.Application.t()
Specs
workflow_id() :: WorkflowMetal.Storage.Schema.Workflow.id()
Specs
workflow_identifier() :: WorkflowMetal.Workflow.Supervisor.workflow_identifier()
Specs
workitem_id() :: WorkflowMetal.Storage.Schema.Workitem.id()
Specs
workitem_output() :: WorkflowMetal.Storage.Schema.Workitem.output()
Specs
workitem_schema() :: WorkflowMetal.Storage.Schema.Workitem.t()
Link to this section Functions
Specs
abandon_workitem(application(), workitem_id()) :: WorkflowMetal.Workitem.Workitem.on_abandon() | {:error, :workitem_not_found} | {:error, :workitem_not_available}
Abandon a workitem.
Returns a specification to start this module under a supervisor.
See Supervisor
.
Specs
complete_workitem(application(), workitem_id(), workitem_output()) :: WorkflowMetal.Workitem.Workitem.on_complete() | {:error, :workitem_not_found} | {:error, :workitem_not_available}
Complete a workitem.
Specs
open_workitem(application(), workitem_schema() | workitem_id()) :: WorkflowMetal.Registration.Adapter.on_start_child() | {:error, :workitem_not_found}
Open a workitem(`:gen_statem').
Specs
preexecute(application(), workitem_id()) :: WorkflowMetal.Task.Task.on_preexecute() | {:error, :workitem_not_found} | {:error, :task_not_available}
Lock tokens before a workitem execution.