Error handling for ExportData workflow failures in AEM Forms

Adobe Experience Manager (AEM) Forms workflows may fail at the FormDataIntegration (ExportData) step without displaying the underlying exception when explicit error handling isn’t configured. To resolve the issue, add an Event Catch boundary event for ExportFormDataException, route it to a SetValue step, and capture the exception text in a process variable.

Description description

Environment

Adobe Experience Manager (AEM) Forms (all versions)

Issue/Symptoms

  • The workflow fails at the FormDataIntegration (ExportData) step.
  • Workflow logs display Set Failure Resultvalues.
  • No additional exception information appears in the logs.
  • The issue may be reproducible when multiple PDFs are uploaded simultaneously.
  • No explicit error message or stack trace is available beyond the failure indicator.

Root cause

The workflow fails at the ExportData step, but without explicit error handling, the underlying system exception isn’t surfaced. Adding boundary-event handling allows the exception to be captured and inspected for troubleshooting.

Resolution resolution

Follow the steps below to resolve the issue:

  1. In AEM Forms Workbench, drag the Event Catch (lightning bolt) icon from the toolbar or palette.
  2. Drop the Event Catch icon onto the bottom border of the exportData component so that it appears as an attached boundary badge.
  3. Draw a route from the attached Event Catch badge to the SetValue component.
  4. In the popup, select the following exception class mapping: com.adobe.livecycle.formdataintegration.client.ExportFormDataException
  5. Create a process variable named errorMsg with the type string.
  6. In the SetValue block, open Mappings and map errorMsg to the exception text using the following XPath expression: /process_data/pathevent/faultMessage
  7. Test the exception path by providing an invalid or non-PDF file, such as a text file or empty document, as input.
  8. Verify that the process follows the exception route and that the errorMsg variable contains the error string.
recommendation-more-help
experience-cloud-kcs-help-kbarticles