Skip to content

Releases: wol-soft/php-workflow

Step dependencies

21 Apr 09:06
48c6886
Compare
Choose a tag to compare

Each workflow step implementation can now define step dependencies which are evaluated before the step is executed:

public function run(
    \PHPWorkflow\WorkflowControl $control,
    // The key customerId must contain a string
    #[\PHPWorkflow\Step\Dependency\Required('customerId', 'string')]
    // The customerAge must contain an integer. But also null is accepted.
    // Each type definition can be prefixed with a ? to accept null.
    #[\PHPWorkflow\Step\Dependency\Required('customerAge', '?int')]
    // Objects can also be type hinted
    #[\PHPWorkflow\Step\Dependency\Required('created', \DateTime::class)]
    \PHPWorkflow\State\WorkflowContainer $container,
) {
    // Implementation which can rely on the defined keys to be present in the container.
}

See the Readme for more details.

Custom output formatter

23 Mar 14:08
f21bcef
Compare
Choose a tag to compare

New features

Adds support for custom output formatter. The following formatters are implemented by the library:

  • GraphViz: generates GraphViz code which represents the workflow execution
  • WorkflowGraph: generates a SVG file which displays a graph representing the workflow execution

Breaking changes

  • The function signature of the WorkflowStep::run method has changed. The method must return void
  • The array returned by the method WorkflowResult::getWarnings is now indexed by integer values represented by the STAGE_* constants defined in WorkflowState instead of a textual representation of the stage. To get the textual representation the static method ExecutionLog::mapStage(int $stage): string can be used
  • The debug output for loops has changed slightly:
    • A start entry has been added
    • Loops are indented now

Add support for loops ➰

11 Nov 16:09
0ce615b
Compare
Choose a tag to compare

View the readme to get more information about loops

1.0.0

06 Sep 13:21
Compare
Choose a tag to compare
remove support for global middlewares

0.1.0

26 Aug 12:03
Compare
Choose a tag to compare

Test release