-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
/
workflows.php
126 lines (124 loc) · 4.1 KB
/
workflows.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
use Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTestCase;
$container->loadFromExtension('framework', [
'annotations' => false,
'http_method_override' => false,
'handle_all_throwables' => true,
'php_errors' => ['log' => true],
'workflows' => [
'article' => [
'type' => 'workflow',
'supports' => [
FrameworkExtensionTestCase::class,
],
'definition_validators' => [
Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Fixtures\Workflow\Validator\DefinitionValidator::class,
],
'initial_marking' => ['draft'],
'metadata' => [
'title' => 'article workflow',
'description' => 'workflow for articles',
],
'places' => [
'draft',
'wait_for_journalist',
'approved_by_journalist',
'wait_for_spellchecker',
'approved_by_spellchecker',
'published',
],
'transitions' => [
'request_review' => [
'from' => 'draft',
'to' => ['wait_for_journalist', 'wait_for_spellchecker'],
],
'journalist_approval' => [
'from' => 'wait_for_journalist',
'to' => 'approved_by_journalist',
],
'spellchecker_approval' => [
'from' => 'wait_for_spellchecker',
'to' => 'approved_by_spellchecker',
],
'publish' => [
'from' => ['approved_by_journalist', 'approved_by_spellchecker'],
'to' => 'published',
],
],
],
'pull_request' => [
'supports' => [
FrameworkExtensionTestCase::class,
],
'initial_marking' => 'start',
'metadata' => [
'title' => 'workflow title',
],
'places' => [
'start_name_not_used' => [
'name' => 'start',
'metadata' => [
'title' => 'place start title',
],
],
'coding' => null,
'travis' => null,
'review' => null,
'merged' => null,
'closed' => null,
],
'transitions' => [
'submit' => [
'from' => 'start',
'to' => 'travis',
'metadata' => [
'title' => 'transition submit title',
],
],
'update' => [
'from' => ['coding', 'travis', 'review'],
'to' => 'travis',
],
'wait_for_review' => [
'from' => 'travis',
'to' => 'review',
],
'request_change' => [
'from' => 'review',
'to' => 'coding',
],
'accept' => [
'from' => 'review',
'to' => 'merged',
],
'reject' => [
'from' => 'review',
'to' => 'closed',
],
'reopen' => [
'from' => 'closed',
'to' => 'review',
],
],
],
'service_marking_store_workflow' => [
'type' => 'workflow',
'marking_store' => [
'service' => 'workflow_service',
],
'supports' => [
FrameworkExtensionTestCase::class,
],
'places' => [
['name' => 'first'],
['name' => 'last'],
],
'transitions' => [
'go' => [
'from' => 'first',
'to' => 'last',
],
],
],
],
]);