Skip to content

fix(workflow): optional context param on engine + WorkflowState typed state#13

Merged
Headgent merged 1 commit into
developfrom
fix/260615_workflow-state-typed-context
Jun 15, 2026
Merged

fix(workflow): optional context param on engine + WorkflowState typed state#13
Headgent merged 1 commit into
developfrom
fix/260615_workflow-state-typed-context

Conversation

@Headgent

Copy link
Copy Markdown
Contributor

B1 des F9-Pakets (Builder). Engine nimmt einen optionalen 3. Context-Param (non-breaking, nativer Rückgabetyp unverändert). Neue generische WorkflowState-Klasse (@template TPayload) trägt payload→original→modified und implementiert die volle WorkflowContextInterface per Delegation. Zielversion: v1.0.4 (patch). Hängt an contract v1.0.5 (^1.0).

… state

Workflow::__invoke gains an optional third $context param: when provided the
engine appends results to it and returns it; when omitted, behaviour is unchanged
(fresh WorkflowContext per run) — non-breaking, native return type untouched.

Adds WorkflowState: a generic (@template TPayload) state object carrying the typed
payload -> original -> modified three-step. It implements the full
WorkflowContextInterface by delegating chain + mantle slots to an internal
WorkflowContext, so a process orchestrator can pass it through the engine while
reading $state->payload fully typed without generating the class per process.
@Headgent Headgent merged commit 75e53cb into develop Jun 15, 2026
3 checks passed
@Headgent Headgent deleted the fix/260615_workflow-state-typed-context branch June 15, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant