Skip to end of banner
Go to start of banner

Execution flow of Pipeloop Snap

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

The execution workflow of the PipeLoop Snap enables the parent pipeline to control and manage iterative processes using the child pipeline, for scenarios where repeated processing is needed until a specific condition is satisfied. Here are the key steps in the execution of the PipeLoop Snap:

  1. The parent pipeline passes input document to the child pipeline.

  2. The child pipeline executes.

  3. The PipeLoop Snap collects the output document from the child pipeline. It iteratively invokes the child pipeline.

    • The output of each child pipeline execution is passed back to the parent pipeline, where the stop condition is evaluated.

  4. The PipeLoop Snap evaluates the stop condition based on the child pipeline’s output document.

  5. If the stop condition is false, the Snap checks if the iteration limit is reached.

  6. If the iteration limit is not reached, the Snap passes the output document to input (back to Step 1).

    • The iteration stops if the stop condition is evaluated to true or the iteration limit is reached.

    • The iteration continues until the stop condition is met or the iteration limit is reached.

Example

The following example pipeline demonstrates the flow of PipeLoop Snap.

  • Parent pipeline: The parent pipeline generates the initial input using the JSON Generator Snap. The PipeLoop Snap iteratively calls the child pipeline until the condition specified in the Stop condition is met.

  • Child pipeline: The Mapper Snap in the child pipeline processes the mapping and transformation of data as needed during each iteration.

Pipeline Flow

pipeloop-execution-workflow.png

Parent Pipeline:

  1. Configure the JSON Generator Snap with the input prarameters to pass to the PipeLoop Snap. This Snap generates the initial input data for the PipeLoop Snap and the JSON data produced here will be passed as input to the child pipeline.

    ex-json-generator-config.png
  2. Configure the PipeLoop Snap with the following settings:

    • Select the child pipeline to call within the PipeLoop Snap.

    • Define the necessary input and output parameters for communication between the parent and child pipelines.

    • Specify the Stop condition. This condition determines when the iteration should terminate. The stop condition is evaluated after each execution of the child pipeline. If the stop condition is not met after a certain number of iterations, the loop will terminate automatically based on the iteration limit.Configure the Iteration limit:

    • Set up the timeout and error handling parameters as needed.

      ex-pipeloop-config.png

Child Pipeline:

  1. Configure the Mapper Snap with the following settings:

    • Define the mappings between the input fields and the desired output fields.

    • Ensure that the output document produced by the Mapper Snap contains the necessary information for the parent pipeline to evaluate.

      ex-mapper-config.png

Final Output: Once the stop condition is satisfied or the iteration limit is reached, the pipeline's final output will be collected and passed to the next step or processed further based on the overall workflow.

Download the pipelines:

Next steps (if applicable):

  1. If additional Snaps are required for processing, transformation, or routing in the child pipeline, configure those accordingly.

  2. Examples might include:

    • Filter Snap to filter out unnecessary data.

    • Data Transformation Snaps for applying complex transformations.

    • HTTP Client or Database Snaps if external calls or data lookups are needed.

  3. Return Output to Parent Pipeline:

    • Once the child pipeline completes its steps, it should return its output document to the parent pipeline.

    • This output will be used by the PipeLoop Snap in the parent pipeline to evaluate the stop condition or proceed with further iterations.

  4. Execute the PipeLoop Snap. The parent pipeline will pass the generated JSON input to the PipeLoop Snap, which then initiates the iterative process by calling the child pipeline.

  5. Evaluate the Output:

    • After each iteration, the PipeLoop Snap will evaluate the output document from the child pipeline.

    • The stop condition will be assessed to determine if further iterations are necessary or if the loop should end.

  File Modified
No files shared here yet.
  • No labels