@@ -6,11 +6,26 @@ CHANGELOG
6
6
7
7
* Trigger ` entered ` event for subject entering in the Workflow for the first time
8
8
* Added a context to ` Workflow::apply() ` . The ` MethodMarkingStore ` could be used to leverage this feature.
9
- * Added dump styling of states and transitions through ` metadata ` ,
10
- configuration of places is:
11
- ` label ` and ` description ` (only for PUML) (text), ` bg_color ` (` #RRGGBB ` or CSS color name)
12
- and configuration of transitions is:
13
- ` label ` (text), ` color ` and ` arrow_color ` (` #RRGGBB ` or CSS color name)
9
+ * Add style to transitions by declaring metadata:
10
+ 1 . Create places: ` $places = range('a', 'b'); `
11
+ 2 . Create a transition: ` $transition = new Transition('t1', 'a', 'b'); `
12
+ 3 . Attach this transition to the transitions: ` $transitions[] = $transition; `
13
+ 4 . Declare style for this transition:
14
+
15
+ ```
16
+ $transitionsMetadata = new \SplObjectStorage();
17
+ $transitionsMetadata[$transition] = [
18
+ 'color' => 'Red',
19
+ 'arrow_color' => '#00ff00',
20
+ ];
21
+ $inMemoryMetadataStore = new InMemoryMetadataStore([], [], $transitionsMetadata);
22
+ ```
23
+
24
+ 5. Pass metadata store as the fourth argument of `Definition`:
25
+
26
+ ```
27
+ return new Definition($places, $transitions, null, $inMemoryMetadataStore);
28
+ ```
14
29
15
30
4.1.0
16
31
-----
0 commit comments