← All package workshops
Workflows / INTERACTIVE WORKSHOP

Connected procurement review

Workflow v1.0.0

Replay a real procurement lifecycle: Fields validates trusted payload schemas, Tools reviews the immutable definition, Workflow authorizes and records commands, and native Flow transitions actual tasks. Domain state and outbox remain host-owned.

01 / CONFIGURE

Choose a scenario. Change the inputs or build a sequence of commands.

02 / RUN

Execute the installed package against a new fictional example.

03 / INSPECT

Follow the result, actual calls, generated output and integration code.

THE WORKBENCH

Make it your example.

Your server-side changes are temporary. External-service examples use local response fixtures. Start with sample data.

Execution result

Waiting for your first run
No execution yetEdit inputs ↑

Start with a preset, or change the input and run it.

The behavior is the example.

Your result will show the values, decisions and generated output from the actual package.

EXPLORE THE PACKAGE

What you can exercise here.

HOST INTEGRATION

Editable graph and fictional host permissions

Change transitions separately from the fixture’s role, assignment and fixed domain-effect policy.

INTERACTIVE

Scoped member and destination policy

Existing identities from another workspace cannot act or receive replacement assignments.

INTERACTIVE

Exact replay and stale-version conflicts

Retry an original key, change its input or recover from an outdated version without repeating committed callbacks.

HOST INTEGRATION

Atomic domain callbacks and outbox

A failed purchase update rolls back tasks, receipts and the outbox; safe recovery commits once.

INTERACTIVE

Reviewed history import and resumption

Review the exact snapshot hash, retain source evidence, import without past effects and resume a pending task.

INTERACTIVE

Command and full-message pagination

Page real queries and read historical messages beyond the timeline’s fifty-message preview.

UNDERSTAND THE BEHAVIOR

Portable definitions need explicit runtime boundaries.

Build steps, members, permissions and commands for a connected procurement review. Exercise real Workflow execution through native Flow, Fields validation, receipts, callbacks and reviewed history imports.

01

Builders configure both definition and fictional host policy

Step transitions are package definition data; member workspace/role and permission/effect rows configure fixed trusted application policy. They do not become executable PHP. An approval still requires authorized assignment and validated in-review purchase data.

02

Identity, expected version and step occurrence matter

Commands carry actor, key and expected_version. Exact command replay returns the current run without reapplying an effect, even after later cycles; the immutable original receipt retains its original result and version. A local step name can occur more than once; step_id disambiguates multiple pending occurrences.

03

Failure recovery belongs in the transaction

Invalid Fields payloads, stale versions, foreign members and failed callbacks should leave the durable purchase and native projection coherent. The failure presets expose package command outcomes and host effect/outbox observations; no real email or purchase is sent. The packaged Fields form redisplays rejected submit values and field errors. Apply values to command selects the exact submit-effect operation, including renamed steps/actions and later cyclic resubmissions.

04

Reviewed imports preserve saved history

Snapshot builders describe trusted reviewed task history, source identity and evidence. review-import computes the exact hash expected by import. Import does not emit old effects or events. Reimport after a resumed approval returns the current run and preserves its original immutable receipt without resetting the approved subject.

05

Messages and receipts paginate separately

History page controls select command receipts. messages_page, messages_per_page and message_command_id select full messages independently, with 0 meaning all commands. Counts and pages must be read from their own projections.

GO FURTHER

Try the boundary cases.

  1. Reject invalid action data without advancing

    Run through the default start and submit commands, then choose the submit operation in Apply values to command. Clear title or enter invalid amount_cents in the actual rendered Fields form and submit it. Expected: the selected command payload changes, rejected values and field errors redisplay, the workflow stays at its prior version and no purchase effect commits. Restore valid values and rerun. In a cycle, choose the later submit command explicitly instead of editing the first occurrence.

  2. Compare exact replay with a stale new command

    Run Approve then exact replay. Expected: the repeated approval key returns the current run, preserves the original receipt and applies no duplicate approval effect. Run Stale note then recover: the stale new key fails; the corrected version succeeds. Changing a key turns a replay attempt into a new command.

  3. Exercise policy and rollback together

    Run Refuse foreign destination and Roll back failed approval, then Failed callback then safe recovery. Expected: scope/assignment rejection and callback failure preserve coherent native/domain state; a fresh valid recovery command can complete. Edit members or permissions to inspect this fixed fictional host policy.

  4. Follow parallel review and a cycle

    Run Finish both parallel branches and inspect the intermediate pending tasks. Compare Replay the original rejection after resubmission: the old receipt identifies its original step occurrence and does not act on the new pending occurrence. Use exact step_id when local step names become ambiguous.

  5. Review, import and resume saved history

    Run Review and import saved history, then Import, resume approval and exact reimport. Expected: the reviewed hash checks exact snapshot content while host policy authorizes import, historical messages survive, old effects are not emitted, and final reimport preserves approved state. Change the snapshot without refreshing expect to see rejection.

  6. Inspect full messages independently

    Use a sequence containing a note and action messages. Change history_per_page, then messages_per_page and message_command_id. Expected: receipt pagination and full-message pagination change independently; filtering by a command selects its messages without changing receipt execution.

COMPOSE THE RESPONSIBILITIES

Useful alone.
Better when the boundaries fit.

This lab composes Workflow, native Flow, Fields and Workflow Tools through actual package contracts. Fields and native Flow remain usable independently; Workflow supplies a connected adapter layer, and Tools depends on Workflow and Flow. Application membership, domain effects, subject ownership, external delivery and import-review policy stay in the host.

Flow Fields Workflow Tools Read every API and recipe