@@ -62,149 +62,6 @@ Basically, it will greatly ease the configuration of import and exports but can
6262 - [ Generic transformers definition] ( Documentation/reference/03-generic_transformers_definition.md )
6363- Examples
6464 - [ Simple ETL]
65- - [ Roadmap and versions] ( Documentation/100-roadmap.md )
66-
67-
68- -------
69-
70- _ obsolete documentation_
71-
72- ## Configuration reference
73-
74- ### Defining processes
75- ``` yml
76- clever_age_process :
77- configurations :
78- <process_code> :
79- options : ~ # Global options for the whole process, not currently used
80- entry_point : <task_code> # Code of the first task to execute
81- tasks : # See the next chapter
82- <task_code> :
83- # You can use two syntax for service declaration
84- service : ' @<reference of the service>'
85-
86- # Or, alternatively, if you don't want to declare unecessary services if no argument is needed to construct this task
87- service : MyNamespace\FooBarBundle\Task\MyTask
88-
89- # In both cases the service/class must implements the TaskInterface
90-
91- # Options to pass to the task, see each task for more information
92- options : {}
93-
94- # List of the tasks to pass the output to
95- outputs : [<other_task_code>, ...]
96-
97- # Other possible values are: 'stop' and 'continue'
98- error_strategy : skip
99-
100- # Logs any errors encountered
101- log_level : critical
102-
103- # More tasks
104- ```
105- Note that orphan tasks will be reported as errors before the process starts
106-
107- ### Existing tasks
108-
109- #### StatCounterTask
110- Accepts an array or an object as an input and sets values before returning it as the output.
111- At the end of the process, during the finalize(), it will log the number of item processed.
112- ``` yml
113- <task_code> :
114- service : ' @CleverAge\ProcessBundle\Task\Reporting\StatCounterTask'
115- ` ` `
116- No supported options, no output.
117-
118- #### ValidatorTask
119- Validate data from the input and pass it to the output
120- ` ` ` yml
121- <task_code> :
122- service : ' @CleverAge\ProcessBundle\Task\Validation\ValidatorTask'
123- outputs : [<task_code>] # Array of tasks accepting the same data than the input
124- ` ` `
125-
126- ## Creating a custom task
127-
128- ### Creating the class
129-
130- ` ` ` php
131- <?php
132-
133- namespace MyNamespace\FooBarBundle\Task;
134-
135- use CleverAge\ProcessBundle\Model\ProcessState;
136- use CleverAge\ProcessBundle\Model\TaskInterface;
137-
138- class MyTask implements TaskInterface
139- {
140- /**
141- * @param ProcessState $state
142- */
143- public function execute(ProcessState $state)
144- {
145- // Do stuff
146- }
147- }
148- ```
149-
150- ### Configuring the service
151-
152- ``` yml
153- services :
154- my_namespace.task.task_code :
155- class : MyNamespace\FooBarBundle\Task\MyTask
156- shared : false
157- ` ` `
158- Unless you want to share the same service between multiple tasks with the same service reference, we strongly recommend
159- to configure your tasks services as ` ` ` shared: false```.
160-
161- # # Example
162-
163- Basic export to CSV process
164-
165- ` ` ` yml
166- clever_age_process:
167- configurations:
168- data_export:
169- entry_point: read
170- tasks:
171- read:
172- service: '@CleverAge\D octrineProcessBundle\T ask\E ntityManager\D octrineReaderTask'
173- options:
174- class_name: MyNamespace\F ooBarBundle\E ntity\D ata
175- outputs: [normalize]
176-
177- normalize:
178- service: '@CleverAge\P rocessBundle\T ask\S erialization\N ormalizerTask'
179- options:
180- format: csv
181- outputs: [write]
182-
183- write:
184- service: '@CleverAge\P rocessBundle\T ask\F ile\C sv\C svWriterTask'
185- options:
186- file_path: '%kernel.root_dir%/../var/data/export/data.csv'
187- ` ` `
188-
189- # # Known issues
190-
191- For now there are some issue with BlockingTask in multi-branch workflow
192-
193- * An IterableTask cannot have 2 children BlockingTask : only the last BlockingTask will be proceeded
194- * A BlockingTask will not be proceeded if it has not a direct ancestor IterableTask
195- * A BlockingTask will be proceeded as much as there is direct IterableTask ancestors
196-
197- If you want to avoid any problem, use BlockingTask only in a one-branch workflow, with only one preceding IterableTask :
198-
199- * Task -> Iterable -> Task -> Task -> Blocking -> Task
200-
201- # # Release notes
202-
203- # ## v1.1
204-
205- * Fixed issues with blocking tasks
206- * Removed deprecated methods [...]
207- * added input/output in process manager (may allow a start_process_task)
208-
209- New issues :
210- * Error workflow
65+ - Changelog
66+ - [ v3.1] ( Documentation/changelog/CHANGELOG-3.1.md )
67+ - [ Older versions] ( Documentation/changelog/CHANGELOG-2.0-1.1.md )
0 commit comments