Using Query Operations with IFS Hierarchical Entity Sets when No Filter is Specified


Introduction

As discussed in Working with Related Entities in IFS Application 10 and IFS Cloud with Boomi Operations, passing a non-blank document to a Query step where no Filter is specified within that Query step is not directly supported by Boomi and may throw an error.

The error created will refer to "Content is not allowed in prolog.".  For example, such an error might be

User-added image

This condition is not normally seen since, when passing a document to a Query object, the intent is almost always to use elements from that document to specify a filter.  However, as discussed in the article linked above, IFS supports hierarchical entity sets, where the underlying action might specify a "filter" on a parent entity, for example through the use of Dynamic Operation Properties, but no actual filter within the Query operation itself.  This design is not directly supported in Boomi.

Work Around

One way to address this issue is by initially storing any elements you intend to use from an inbound document, such as OrderNo, into a Dynamic Process Property (DPP), then ensuring that you only pass a blank document to the Query operation, whilst then using the Dynamic Process Property to specify the Dynamic Operation Properties as mentioned above.

We might design our process as follows

User-added image

Our inbound message in this example is a simple JSON message

User-added image

In the first leg of our Branch, we store this value to a Dynamic Process Property

User-added image

In the second branch, we overwrite the incoming document with a blank document

User-added image
Then, we can use the previously saved Dynamic Process Property to set the Dynamic Operation Property as discussed in the article linked above

User-added image

Through this simple mechanism of storing any required inbound values in DPPs, then passing a blank document to the Query operation and using the stored DPPs to set any required values, we can easily work around this limitation and make use of the special hierarchy navigation within the IFS REST - Partner connector for this type of query operation.