Create case by parsing XML and attaching pdf to the created case
We have a requirement as below:
We have two files one XML (e.g ABC.xml) and the other pdf(e.g ABC.pdf). The XML is prepared by some external XML generator by parsing the contents of the PDF and the generator is providing both these files into our Pega application folder. Note that the names of the files are same apart from the file type extension.
Now , the requirement is we need to parse the XML, create the case using the MetaData in the XML and finally attach the related PDF to the case. Using a file listener we have acheived this functionality of parsing the XML and creating the case. But the listener doesn't have the capability to wait and check for the related PDF by polling the network folder again. It can process only one file at a time (in this case its the XML) and the transaction is complete. It doesn't check/wait for the incoming pdf.
Is there a way we can invoke some functionality (java code ,Connect methods etc) to check if the pdf with same name exists in the network folder and if it exists we attach it to the case?
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
We have achieved this functionality by creating a custom java code which ingests the parameters for the Source File Location and the PDF file name and attaches it to the case created using the XML.
The java code is being invoked after the case creation activity has executed.
Keep up to date on this post and subscribe to comments
- FileListener, Parse-Structured, unable to attach PDF to new case
- Generate a Unique number each time a case is created and attach the pdf with the required details and add this pdf in the correspondence
- How to read excel file attached to work objects and parse the rows to create cases
- Attaching pdf file into the created case from a pega server location
- when "Generate PDF and Attach" activity is called all attachments in current case are being attached and sent to email