You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement `WorkflowProviderInterface` to expose a workflow definition from a class:
57
+
58
+
```php
59
+
use Chevere\Workflow\Interfaces\WorkflowProviderInterface;
60
+
use Chevere\Workflow\Interfaces\WorkflowInterface;
61
+
62
+
class MyProvider implements WorkflowProviderInterface
63
+
{
64
+
public static function workflow(): WorkflowInterface
65
+
{
66
+
return workflow(/* ... */);
67
+
}
68
+
}
69
+
```
70
+
71
+
This is the recommended pattern for packages and applications. It separates workflow configuration from execution logic and enables discovery by tooling such as the **Chevere Workflow VSCode extension**.
72
+
54
73
## Core Concepts
55
74
56
75
Workflow is built around four main concepts:
@@ -447,8 +466,8 @@ Where:
447
466
448
467
****if* res(ja)**
449
468
Job `jb` runs only if job `ja` response is truthy
450
-
****ifNot* var(var) 1 true**
451
-
Job `jb` runs only if `var` variable is not equal to `1` or `true`
469
+
****ifNot* var(var)**
470
+
Job `jb` runs only if `var` variable is not falsy
452
471
***j1->id @ j2(n:)**
453
472
Job `j1` response key/property `id` is used as argument `n` for job `j2`
454
473
***j1->name @ j2(m:)**
@@ -773,6 +792,32 @@ class OrderProcessor
773
792
774
793
---
775
794
795
+
## Lint Mode
796
+
797
+
Set the `CHEVERE_WORKFLOW_LINT_ENABLE=1` environment variable to enable lint mode. In this mode both `Workflow` and `Job` collect parameter violations instead of throwing on errors, and generate a Mermaid graph on construction.
0 commit comments