XML Parser Step in Flow Designer - Action

Minso2
Kilo Expert

Hi ,

 

I am using the XML Parser step in one of my action to parse  XML response body. 

I have to use the action inside a for each condition in flow. The loop will go up to 5000 times.

I got an error for my flow after running for some 2500 records:

error : Transaction cancelled: Available memory is almost depleted.

Since - XML Parser step map incoming XML elements to a complex object output that you can use in other steps or actions. At runtime, values from an XML payload populate the complex object output.

Can using the XML Parser step cause any issue related to this error ?

 

1 ACCEPTED SOLUTION

Yes. OOTB step has a benefit of non-programming but it seem to have more overhead compared to doing the same in Script steps. I'm creating custom Actions on steps that non-programmer won't change.

XML step probably is loading everything into memory so that'll require more memory too. I haven't tried it but there's a Data Stream action that may help when pulling data in. In cases when message size is large, I've switched to pushing data into ServiceNow instead of pulling.

https://docs.servicenow.com/bundle/paris-servicenow-platform/page/administer/integrationhub/tasks/us...

Finally, I prefer using JSON rather than XML when I am able to choose.

 

View solution in original post

3 REPLIES 3

Hitoshi Ozawa
Giga Sage
Giga Sage

There's a size limitation on XML Parser step. Recommendation is to use Data Stream action and pagination

Payload size limit

At runtime, XML parser step supports payloads up to 10 MB. For larger payloads, create a Data Stream action. For more information, see Data Stream actions and pagination.

At design time, XML parser step supports sample payloads up to 64,000 characters.

https://docs.servicenow.com/bundle/paris-servicenow-platform/page/administer/flow-designer/reference...

Minso2
Kilo Expert

 

I have observed, when using XML Parser step it takes more significant time than the normal script parsing. Especially with larger payloads.

Yes. OOTB step has a benefit of non-programming but it seem to have more overhead compared to doing the same in Script steps. I'm creating custom Actions on steps that non-programmer won't change.

XML step probably is loading everything into memory so that'll require more memory too. I haven't tried it but there's a Data Stream action that may help when pulling data in. In cases when message size is large, I've switched to pushing data into ServiceNow instead of pulling.

https://docs.servicenow.com/bundle/paris-servicenow-platform/page/administer/integrationhub/tasks/us...

Finally, I prefer using JSON rather than XML when I am able to choose.