Liking cljdoc? Tell your friends :D

boundary.workflow.schema

Malli schemas for declarative workflow state machines.

A workflow defines:

  • A set of named states
  • Transitions between states, with optional guards and permissions
  • Side effects triggered on transition

A workflow instance tracks:

  • Which entity (type + id) is being managed
  • The current state of that entity
  • Metadata for guard / context evaluation
Malli schemas for declarative workflow state machines.

A workflow defines:
- A set of named states
- Transitions between states, with optional guards and permissions
- Side effects triggered on transition

A workflow instance tracks:
- Which entity (type + id) is being managed
- The current state of that entity
- Metadata for guard / context evaluation
raw docstring

AuditEntryclj

An immutable record of a single workflow transition.

An immutable record of a single workflow transition.
sourceraw docstring

explain-workflow-definitionclj

(explain-workflow-definition def)

Returns human-readable validation errors for a WorkflowDefinition.

Returns human-readable validation errors for a WorkflowDefinition.
sourceraw docstring

StateConfigclj

Optional display metadata for a workflow state.

Optional display metadata for a workflow state.
sourceraw docstring

TransitionDefclj

A single transition within a workflow definition.

A single transition within a workflow definition.
sourceraw docstring

TransitionRequestclj

Request to perform a workflow transition.

Request to perform a workflow transition.
sourceraw docstring

TransitionResultclj

Result after performing a transition.

Result after performing a transition.
sourceraw docstring

valid-audit-entry?clj

(valid-audit-entry? entry)

Returns true when the given map is a valid AuditEntry.

Returns true when the given map is a valid AuditEntry.
sourceraw docstring

valid-workflow-definition?clj

(valid-workflow-definition? def)

Returns true when the given map is a valid WorkflowDefinition.

Returns true when the given map is a valid WorkflowDefinition.
sourceraw docstring

valid-workflow-instance?clj

(valid-workflow-instance? instance)

Returns true when the given map is a valid WorkflowInstance.

Returns true when the given map is a valid WorkflowInstance.
sourceraw docstring

WorkflowDefinitionclj

A complete workflow definition.

Example: {:id :order-workflow :initial-state :pending :states #{:pending :paid :shipped :delivered :cancelled} :state-config {:pending {:label "Pending" :color :yellow} :paid {:label "Paid" :color :green}} :transitions [{:from :pending :to :paid :label "Mark as Paid" :required-permissions [:finance :admin]} {:from :paid :to :shipped} {:from :shipped :to :delivered :auto? true :guard :tracking-delivered?} {:from :pending :to :cancelled}] :hooks {:on-enter-paid [create-invoice-fn] :on-any-transition [log-audit-fn]}}

A complete workflow definition.

Example:
  {:id             :order-workflow
   :initial-state  :pending
   :states         #{:pending :paid :shipped :delivered :cancelled}
   :state-config   {:pending {:label "Pending" :color :yellow}
                    :paid    {:label "Paid"    :color :green}}
   :transitions    [{:from :pending :to :paid  :label "Mark as Paid"
                     :required-permissions [:finance :admin]}
                    {:from :paid    :to :shipped}
                    {:from :shipped :to :delivered :auto? true :guard :tracking-delivered?}
                    {:from :pending :to :cancelled}]
   :hooks          {:on-enter-paid    [create-invoice-fn]
                    :on-any-transition [log-audit-fn]}}
sourceraw docstring

WorkflowInstanceclj

A running instance of a workflow, associated with a domain entity.

A running instance of a workflow, associated with a domain entity.
sourceraw docstring

WorkflowInstanceInputclj

Input to create a new workflow instance.

Input to create a new workflow instance.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close