Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Note

The ForEach Snap is being phased out in favor of the Pipeline Execute Snap.


Snap type:

Flow

Description:

This Snap can be used to invoke a new pipeline for each of the incoming documents. The incoming document can hold the pipeline parameters that are required to run the pipeline. 

Note

This Snap is being phased out in favour of the Pipeline Execute Snap. Pipeline Execute will execute the child Pipeline in preview mode.


Prerequisites:

None

Support and limitations:Works in Ultra Pipelines.
Account: 

Accounts are not used with this Snap.

Views:


InputThis Snap has at most one document input view that could carry pipeline parameters
OutputThis Snap has exactly one document output view that will hold the pipeline run information. The input document is passed through to the output view under the key "data".
ErrorThis Snap has at most one document error view and produces zero or more documents in the view.

 
Note: If the pipeline invoked by the ForEach Snap exits with either STOPPED or FAILED state, these messages will flow to the error view if it is exposed. If the error view on the Snap is not exposed, the ForEach Snap will fail.


Note

The ForEach Snap is being phased out in favor of the Pipeline Execute Snap.


Settings

Label

Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

Pipeline


Required. The pipeline that should be executed for each incoming document.

Default value: Null 

Snaplex


Snaplex where the pipeline will be run. If this field is left empty, the pipeline will be run on the runtime path where the ForEach Snap is executing.

Default value: [None]

Execution mode


Required. Execution mode for running the pipeline. The options available include:

  • SYNCHRONOUS
  • FIRE_AND_FORGET

If execution mode is set to SYNCHRONOUS mode, the ForEach Snap will wait for each pipeline execution to complete before reading the next document from the input view. In case of FIRE_AND_FORGET mode, pipeline execution is scheduled and the pipeline run id is written to the output view and ForEach Snap will proceed with next input.

Default value: SYNCHRONOUS

Batch size for synchronous mode


When Synchronous mode is selected, pipeline execution will be carried out in batch. When the batch size is reached, this Snap will wait for all the executions in the batch to complete before proceeding.
Default value: 1 

Pipeline parameters


Pipeline parameters that should be used for executing the pipeline can be configured in this property. The Parameter name is the name of the parameter that should be used while executing the pipeline. You can select the pipeline parameters defined for the pipeline selected in the Pipeline field. The Parameter value is the expression property that can be configured as an expression based on incoming document or can be a constant. If it is configured as an expression based on the incoming document, each incoming document will be evaluated for the given expression and the value is set as the parameter value for the parameter name while invoking the pipeline.

Default value: [None]

Maximum instances

Required. In the SYNCHRONOUS mode, this property is the maximum number of times the ForEach Snap can call its own pipeline recursively. In this mode, you should have a logic built within the pipeline so that the pipeline execution completes gracefully before the number of instances reaches to the value of this property. Otherwise, the Snap will throw an error. The last instance in the nested pipelines will show an error "The maximum number of recurring pipeline instances has reached in the synchronous mode, Maximum instances: ...", and the rest will show "Error occurred while waiting for the pipeline to complete the execution".

In the FIRE_AND_FORGET mode, this property is the maximum number of the instances of which the recurring pipelines can run at any given time. Therefore, in the mode, the pipeline runs forever recursively while the number of the pipeline instances in progress is limited to the value of this property. 


Note

The value for Maximum instances is limited to a maximum of 100. A value higher than 100 will automatically be limited down to 100 during pipeline execution.

Default value: 50

Multiexcerpt include macro
nameSnap Execution
pageSOAP Execute

Multiexcerpt include macro
nameSnap_Execution_Introduced
pageAnaplan Read


Note

When using a ForEach Snap, the state of the child pipeline configured in the pipeline parameter of the Snap is represented in the $state value, which is the default element in the output document. This can be very useful for flow Snaps such as Filter (expression example: $state == "COMPLETED").


Insert excerpt
Flow Snap Pack
Flow Snap Pack
nopaneltrue