Failed to iterate on data stream: Cannot invoke "com.snc.process_flow.val.ValMap.entrySet()"

psomasekhar
Tera Contributor

Hi All,

I am getting error : Failed to iterate on data stream: Cannot invoke "com.snc.process_flow.val.ValMap.entrySet()" because "inputs" is null

step 1: We are getting some payload from REST integration (integration with 3rd party) using datastream object
step2: Validating the data received and passing one of the data we got in response (user number) to next step (i.e step 3)

step 3: Triggering the REST API (integration with 3rd party) and with user number as input and collecting the email id of user in response.

 

The Datastream is running 26 iterations without the step:3, but when I created step 3, Data stream running one iteration and throwing the below error.

 

Any suggestions on how to fix below error ?

 

 

psomasekhar_0-1748339196648.png

 

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@psomasekhar 

so in the 1st iteration itself it's throwing error?

If yes then it means some config issue is there.

If my response helped please mark it correct and close the thread so that it benefits future readers.

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

first iteration is successful, and all the below steps ran successfully for 1st iteration and then it is throwing error, which means unable to iterate 2nd time.

Kaileb
Tera Contributor

I've started getting this consistently after updating to Yokohoma on the Workday Integration flows that come OOB. Any solutions?

Ian Catley
Tera Contributor

I have struggled with the same problem and it seems to be due to nesting some other actions inside of the foreach of the datasteam (simple stuff like log statements is fine but as soon as I'm e.g. doing other REST calls then it seems to break). The only workaround I could find was to 

  1. Iterate over the data stream to add all the payload objects in a JSON flow variable,
  2. Convert the JSON flow variable into an array of objects.
  3. Iterate over the array of objects and call the original steps that didn't work when nested inside of the DS foreach.