Issue
Error occurs when you generate and attach Microsoft Word documents using the pzGenerateDocument function rule.
Symptoms and Impact
The following error occurs when you generate a Microsoft Word document using the pzGenerateDocument function rule:
“Illegal characters detected in the path “<file path in StaticContent directory>”
Additionally, you will observe the following symptoms:
- The generated word document is not attached to a case.
- The case is paused.
Steps to reproduce
- Create a case type.
- Create a flow rule which includes a utility shape.
- Create an activity to use in this utility shape which performs the following actions:
- Calls the pzGenerateDocument Rule-Utility-Function to create a Word document.
- Attaches the generated document to the case using the AttachFile (or similar) activity.
- Add a flow rule to the case type.
- Create a case for the case type and process it until the step to generate and attach a Microsoft Word document.
Root Cause
Pega has deprecated the pzGenerateDocument rule function.
Solution
Perform the following actions to remediate the error:
- Create a case type.
- Add an automation step to Generate Document.
- Create a case for this case type and process it until the Generate Document step.
OR
- Create a case type.
- Create a flow rule which includes a utility shape.
- Create an activity to use in this utility shape which performs the following actions:
- Calls the pxGenerateAndAttachDocument activity to create a Word document.
- Attaches the generated document to the case using the AttachFile (or similar) activity.
- Add the flow rule to the case type.
- Create a case for the case type and process it until the step to generate and attach a Microsoft Word document.
Environment
Version found in
The problem occurs in the following Pega Platform versions:
- Pega 8.8.2
- Pega 23.1.0
- Pega 23.1.1
- Pega 23.1.2