No more StackOverflowException

Document created by denis.bredelet@dell.com Employee on Oct 2, 2018Last modified by denis.bredelet@dell.com Employee on Oct 3, 2018
Version 2Show Document
  • View in full screen mode

When a Boomi process is looping back onto itself it can easily use all stack space after a few hundreds iterations.

An example of a looping process is shown here:

Design Pattern: Handling API Pagination 

 

To handle more iterations use a non-looping design pattern as described below.

 

  1. Add a message shape with as many lines as there are iterations to run. In the example below each line of the message contains an iteration number:
    Initial message shape
  2. Follow the Message shape with a Data Process shape to split a flat file by line into separate documents, as shown below:
    Splitting by line
  3. Add a Flow Control shape to run each document individually this is the shape that controls the execution, ensuring only one iteration runs at a time.
  4. Finally add your own logic. You can add a Condition shape to interrupt the loop if there is nothing more to process as shown below:
    Completed process

This pattern uses Boomi ability to run each document individually in order to repeat particular operations a set number of times.

With this pattern, the stack does not get exhausted even if there are hundreds of iterations in the loop.

Attachments

    Outcomes