Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Error handling in Parse Delimited rule

SA-9930

Summary



User tries to use a 'PARSE DELIMITED' rule within Service File to read a csv file and map it to a clipboard page.
In the 'Parsing Details' section of the Parse Delimited rule, user has marked few fields as 'Required' and wants to know the significance of this 'Required' check and how one can debug any error.

Resolution



If the data on the input stream is exhausted but parse details is marked as Required, parsing halts. Data processed so far remains available on the clipboard.

You can use below means to troubleshoot the behavior.

Debugging

To debug a Parse Delimited rule, include a Java step containing the PublicAPI call:

myStepPage.putString("debug3", Long.toString(parseState.getStreamOffset()) );

where debug3 is a Single Value property. This function places the byte offset position of the parseState Java object into a clipboard value that user can review with the Tracer or Clipboard tool.

Using the Tracer

To trace the start and end of Parse Delimited rule execution, select the Parse Rules checkbox in the Rule Types to Trace area of the Trace Options panel.

Refer to below pdn link for complete details about the Parse Delimited rule.


https://pdn.pega.com/sites/default/files/help_v63sp1/Default.htm#rule-/rule-parse-/rule-parse-delimited/main.htm

As ServiceHelper class takes care of mapping of delimited parse rules, it can capture if there is any error. You can enable debug level logging on class com.pega.pegarules.integration.engine.internal.ServiceHelper, execute the use case and check PegaRULES.log file.

Published June 12, 2015 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us