Pipeline Initializer & Pipeline Builder

Pipeline Builder

The pipeline builder is responsible for the code-specific generation of pipelines:
  • Pipeline creation is performed manually with the Magento backend or the CLI commands

  • A pipeline can be created (spawned) with the heartbeat

  • The Builder generates the pipeline based on the identifier and the configuration in the pipeline XML

    • This pipeline is then visible in the Magento backend and also on the CLI

Pipeline Initializer

Dynamic pipelines can get created and processed with the Pipeline Initializer:
  • The Pipeline Initializer functionality gets located in a separate module

  • Instead of defining the pipelines with the pipeline XML, pipelines can get programmed directly

  • The data are determined with implemented data fetcher and written with a plugin when spawning pipelines

  • The functionality is activated/deactivated with the configuration

Init Pipeline

  • The Init-Pipeline for pipeline generation functionality enabled all pipelines using InitializationDataFetcherChain to be generated with an init pipeline and no longer with the heartbeat itself. This optimizes the heartbeat execution time

  • The functionality is activated/deactivated by configuration

  • See the example of extending/implementing custom logic to use the init-pipeline

Data Fetcher

A Data-Fetcher is implemented with TechDivision\PacemakerPipelineInitializer\Api\InitializationDataFetcherInterface and can get registered with di.xml in the Chain provided for it.

  • With the execute function, pipelines can get created based on XML settings

Working examples can get found in the Pacemaker Order Export component \TechDivision\PacemakerOrderExport\Model\PipelineInitializer

Example

Registration Pacemaker Order Export in the InitializationDataFetcherChain
<type name="TechDivision\PacemakerPipelineInitializer\Model\InitializationDataFetcherChain">
    <arguments>
        <argument name="dataFetcher" xsi:type="array">
            <item name="pacemaker.order.export" xsi:type="object">TechDivision\PacemakerOrderExport\Model\PipelineInitializer</item>
        </argument>
    </arguments>
</type>