A newer version of this documentation is available: View the Latest Version

Pipeline XML

The structure of a pipeline is defined by a pipeline.xml file.

The implementation and processing of dynamic pipelines is realized using the pipeline initializer logic.

The pipelines follow the existing XSD schema

vendor/techdivision/process-pipelines/etc/pipeline.xsd

Extract from a pipeline.xml (vendor/techdivision/process-pipelines/etc/pipeline.xml)
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:module:TechDivision_ProcessPipelines:etc/pipeline.xsd"> (1)
    <pipeline name="clean_up_pipelines" description="Pack the pipelines and make cleanup by configuration"> (2)
        <conditions> (3)
            <pipeline_condition type="TechDivision\ProcessPipelines\Helper\Condition\Pipeline\CleanUp" description="Cron expression check for message import"/> (4)
        </conditions>
        <step name="compress_pipeline_data" executorType="TechDivision\ProcessPipelines\Model\Executor\CompressExecutor" sortOrder="10" description="" > (5)
            <conditions>
                <step_condition type="TechDivision\ProcessPipelines\Helper\Condition\Step\AttemptsLimit\Limit5" description="Try step up to 5 times"/> (6)
            </conditions>
        </step>
        … (7)
    </pipeline>
    … (8)
</config>
1 A Pipeline.XML must always be validated against the applicable pipeline schema.
2 A pipeline must be created with the <pipeline> XML tag and contain the name XML attribute.
3 A pipeline can have multiple conditions attached to it.
4 A pipeline operation must always contain a type that implements the \TechDivision\ProcessPipelines\Api\PipelineConditionInterface
5 A pipeline must consist of at least one step and must meet the following criteria:
  • The step name must be set and must also be unique within a pipeline.

  • To process steps within a pipeline in the correct order, it is recommended to define the sort order correctly.

  • The executorType must be set. Here the executor of the step is defined, which must implement the \TechDivision\ProcessPipelines\Api\ExecutorInterface.

6 Like pipelines, steps can also have execution conditions. If conditions are defined, they must be declared using the type and implement the necessary \TechDivision\ProcessPipelines\Api\StepConditionInterface.
7 A pipeline can consist of multiple steps.
8 Multiple pipelines can be defined and structured in Pipeline.XML

The pipeline XML follows the Magento logic and can be extended based on it.

As an example, additional steps can be defined in another pipeline.xml for an existing pipeline.

A replacement or exchange (e.g. Steps or Conditions) is currently not implemented.

As an option for a replacement or an exchange, there is the possibility to create a new pipeline.

All pipelines defined via Pipeline.XML are available for manual creation in the backend.

They can also be listed with the CLI command bin/magento pipelines:list.

bin/magento pipeline:list