WorkflowStem.Capabilities (workflow_stem v0.2.0)

Copy Markdown View Source

Capability runner adapter for workflow_stem consumers.

Relationship to the foundation

The stepwise engine path delegates to Mobus.Stepwise.Engine, which uses Mobus.Stepwise.Capabilities internally. That module reads from :mobus_stepwise config — bridged at startup by WorkflowStem.Application.

This module (WorkflowStem.Capabilities) remains for the FSM and Flow engine paths, which have their own capability execution flows. It reads from :workflow_stem config directly (not bridged).

Consumers that only use the stepwise engine can ignore this module; configure :workflow_stem, :capability_runner_adapter and the bridge handles the rest. FSM/Flow consumers call execute/3 here directly.

Summary

Functions

adapter()

@spec adapter() :: module() | nil

enabled?()

@spec enabled?() :: boolean()

execute(tenant_id, capability_handle, input)

@spec execute(String.t(), String.t() | atom(), map()) ::
  {:ok, term()} | {:error, term()}