HIL Presentation Contract v1.3

Human-In-The-Loop
Envelope Standard

A unified, channel-agnostic contract for suspending and resuming workflow execution via human interaction — across Web, Slack, Email, Mobile, and API channels.

The Two-Envelope Pattern

sequenceDiagram participant S as BizFirst Server participant W as Web / Slack / Email participant U as Actor (User) Note over S: Phase 1 — Suspension S->>W: HilPresentationRequestEnvelope Note over W: Renders UI from Presentations[]
Shows per-step or envelope Actions[] W->>U: Form / Chat prompt / Approval panel Note over U: Actor reviews context data
fills form / replies / approves U->>W: Clicks action button Note over W: Phase 2 — Response W->>S: HilPresentationReplyEnvelope Note over S: Routes on Decision field
Reads Payload.DataSteps[] or Payload.Data{}

Key Design Principles

PrincipleHow it is applied
Zero-config defaultsReplyOptions.EnableSteppedDataReturn = true, EnableFlatDataReturn = true — both payload shapes populated without any setup.
Per-step action resolutionIf Presentation.Actions is non-empty, those buttons are shown for that step. Otherwise the envelope-level Actions[] is used. Multi-step flows get different buttons per step; single-step flows need no step-level actions.
Channel-agnosticSame envelope dispatched to Web, Slack, Email, Mobile simultaneously via Channels[].
Decision vs ActionNameDecision = standard routing token for output ports. ActionName = domain-specific button name echoed from the UI.
CorrelationID tracingServer assigns CorrelationID (GUID); client echoes it unchanged. Enables distributed tracing and deduplication.
Multi-step sequentialPresentations[] processed in Order sequence. All step data returned in one reply via DataSteps[].
Naming standardAll abbreviations ALL CAPS per Rule_011-M: EngageSessionID, CorrelationID, ReplyToID, WorkflowID.

HIL Node Types

NodeHilTypePresentationTypeDefault DecisionPhase
approvalapprovalapprovalapproved / rejected / escalated / abstainedMid-workflow
formformformsubmitted / cancelledMid-workflow
form-triggerformformsubmitted / cancelledEntry trigger
chatchatchatapproved / rejected / repliedMid-workflow
chat-triggerchatchatrepliedEntry trigger
chat-receivechatchatrepliedPassive listener