AnsweredAssumed Answered

How do you continue a process after a DB connector returns no records?

Question asked by cbeaudette606890 on Aug 12, 2016
Latest reply on Aug 15, 2016 by cbeaudette606890

I've got a process with a Database connector and if the Select query returns no records, the process ends immediately.  This process sits behind a REST endpoint and we'd like to format a response with an empty JSON array if the query returns nothing, and of course with an array of records if the query finds records.  This is the JSON response we're returning:

{

   "interfaceResponse":{

      "interface": "'{3}'",

      "data": '{1}'     <--  This element contains an array of records, or '[ ]' if no                            records are returned from the DB query

      },

   "responseID":"'{2}'",

   "errors":['{4}']

}

 

This is a capture of a test session of the Process when it returns no records:

 

boomi1.png

 

What steps do I need to take to get the Process to continue if not records are returned?

Outcomes