How to configure a pipeline
Following pages could also be interesting for you: |
To define a new pipeline, you need to add a pipeline.xml
file into the etc
directory of your module.
Here is some sample content for a pipeline.xml
file:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:TechDivision/ProcessPipelines/etc/pipeline.xsd">
<pipeline name="my_custom_pipeline" description="Some description" use-working-directory="true">
<conditions>
<pipeline_condition type="MyCompany\MyModule\Helper\Condition\Pipeline\CheckSomeThing" description="Some description"/>
</conditions>
<step name="my_first_step" executorType="MyCompany\MyModule\Model\Executor\DoSomeThing" sortOrder="10" description="" >
<conditions>
<step_condition type="TechDivision\ProcessPipelines\Helper\Condition\Step\AttemptsLimit\Limit5" description="Try step up to 5 times"/>
</conditions>
</step>
<step name="my_second_step" executorType="MyCompany\MyModule\Model\Executor\DoSomeMoreStuff" sortOrder="20" description="" >
<arguments>
<argument key="some_key" value="some_value" />
</arguments>
<conditions>
<step_condition type="TechDivision\ProcessPipelines\Helper\Condition\Step\PreviousStepsCompleted" description="Run after the first step"/>
<step_condition type="MyCompany\MyModule\Helper\Condition\Step\CheckSomeThing" description="Check something..."/>
</conditions>
</step>
<step name="my_third_step" executorType="MyCompany\MyModule\Model\Executor\DoClearingStuff" sortOrder="30" description="" runAlwaysStep="true">
<conditions>
<step_condition type="TechDivision\ProcessPipelines\Helper\Condition\Step\AttemptsLimit\Limit1" description="Try step up to 1 times"/>
<step_condition type="TechDivision\ProcessPipelines\Helper\Condition\Step\PreviousStepsFinished" description="Run always when one step started"/>
</conditions>
</step>
</pipeline>
</config>
Description for XML nodes and attributes
Node | Description |
---|---|
|
Definition of a new pipeline configuration. You can overwrite or extend existing pipelines by using the same name |
|
Required, |
|
Optional, |
|
Optional, |
|
Optional; One or multiple conditions which should be |
|
Configuration of a pipeline condition |
|
Required, |
|
Optional, |
|
Each pipeline has at least one step. The step describes which executor should be run once the step
conditions are |
|
Required, |
|
Required, |
|
Required, |
|
Optional, |
|
Optional, |
|
Optional; Holds one or many executor arguments |
|
Step executor argument |
|
Required, |
|
One or multiple conditions which should be |
|
Configuration of a step condition |
|
Required, |
|
Optional, |
There are already some default condition and executors available. |