← All package workshops
Workflows / INTERACTIVE WORKSHOP

Native persisted workflow engine

Flow v2.2.1

Execute the installed native Flow API directly. Inspect task instances, assignment strategies, fan-out, rejected actions and real after-commit events. Host policy is deliberately separate.

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.

INTERACTIVE

Editable native step definitions

Create native step and transition rows from your bounded graph; invalid destinations are checked by Flow when actioned.

INTERACTIVE

Parallel task instances

Finish one branch and inspect its unfinished siblings, even when the native convenience pointer says END.

INTERACTIVE

User and email strategies

Choose single-user, multi-user or email lists and observe the native strategy’s actual reassignment result.

INTERACTIVE

Exact task selection

Use the integer instance step ID to distinguish repeated or parallel occurrences of one local step.

INTERACTIVE

Rejected transitions roll back

Undefined actions and missing destinations preserve the pending task and emit no committed transition event.

UNDERSTAND THE BEHAVIOR

Native Flow is a durable Laravel model state machine.

Build direct Flow steps and commands, then inspect actual assignments, transitions and pending parallel branches. Compare the native API with the optional Workflow composition.

01

Step builders configure the actual engine

Each step declares its local ID, transitions, strategy and strategy parameters. Commands explicitly start, act or reassign. Run next command replays a prefix against fresh Eloquent rows; an empty sequence does not start the flow.

02

Native actions do not imply actor authorization

The direct action API has no expected-version or idempotency-key contract and does not authorize a supplied actor. Native reassignment checks the current assignment. Application authorization must guard direct calls, or the Workflow layer can supply its scoped command contract.

03

Assignments have strategy-specific semantics

single_user validates the replacement list and retains its first entry. Email and multiple-user strategies have different stored assignments; email-list self-reassignment is not native user reassignment. This fixture does not send real email or notifications.

04

Parallel branches remain separately pending

Completing one branch does not mean every branch completed. An unknown action or missing destination should preserve the pending task through the package transaction. Any Tools diagram shown is an optional graph projection, not the Flow engine.

GO FURTHER

Try the boundary cases.

  1. Replay a direct serial path

    Run the default sequence one command at a time. Expected: draft starts, submit opens review, reassignment changes its stored assignee, and approve completes the native path. Inspect step history and native rows at each prefix.

  2. Change assignment strategies

    Compare Email assignment and Multiple reviewers. Expected: the actual stored assignment forms differ. Try a valid single-user reassignment with more than one new user: the strategy validates the list and selects its first member. The direct action still needs host actor policy.

  3. Complete only one parallel branch

    Run Parallel completion and stop after the first branch action. Expected: the other branch remains pending. Append an act command for step security with action approve to finish the other branch. Alter a destination in the step builder to an unavailable step and compare the preserved pending state after rejection.

  4. Inspect rejection without inventing replay safety

    Run Unknown action remains pending, Wrong subject refuses reassignment and Completed task refuses a second action. Expected: each reports its actual native refusal and resulting rows. Repeating a direct action is not an idempotent receipt replay; use the connected Workflow lab to explore that separate contract.

COMPOSE THE RESPONSIBILITIES

Useful alone.
Better when the boundaries fit.

Flow is independently useful on Laravel models. Workflow adds portable definitions, scoped host authorization and versioned receipt replay; Fields validates action data and Tools reviews definitions. Choose each boundary deliberately rather than treating the adapter stack as required for native Flow.

Workflow Fields Workflow Tools Read every API and recipe