19-Nov-16 (Created: 19-Nov-16) | More in 'Dell Boomi iPAAS'

How to deal with no rows in a boomi process?

In boomi if there are no rows coming out of a connector, processing on that branch will abruptly stop. For beginers and intermediate Boomi developers this most of the time is the main process. That means the whole process will stop with no room for processing the case of no rows.

This is a problem for any connector, including where a select statement has no rows. However as said one has to deal with that case of no rows and do alternate processing in response to no rows.

This can happen for any connector. Another exmaple is ftp. if you are reading files from a disk or an ftp connector and you need to do alternate processing when there are no files, you run into the same case.

One way programmers dealt with this is to issue the same select statement with a count() variation and have a decision shape to process rows and no rows. Such luxury may not be there for picking up files easily.

Following is a better algorithm I got from Boomi architects where such a case can be handled without a duplicate select. Further this can be applied for other connectors that produce no results as well.

Code follows:

main line

set process variable no_rows = false

           do select, expect rows
           (will not proceed if no rows)
           n_rows = true;
           Rest of the work with rows

            if (no_rows=true) stop; //rows available
            //no rows
           do no rows processing