Using PGP module in advantco receiver SFTP adapter and need FCC? – Do not use ‘XML-To-Plain Content Conversion’
When it comes to FCC errors during runtime, it always become tricky in identifying the point of failure if the file content is the problem or if some parameters are missing in channel for special case of FCC and we try what not ! but I was surprised to discover one of the issue highlighted in this blog which started popping up when i just added PGP module to already tested scenario of FCC in advantco receiver SFTP adapter. BTW this is where i got to know one more use case of “MessageTranformBean”
To understand the problem which i want to highlight about advantco content conversion option, if you are new to use of PGP module in PI i would suggest you to make yourself comfortable with basics about PGP module and its use in PI from these nice blogs of Vijay and Li which explains about PGP protocol as well with illustration.
Here is my initial set up of receiver SFTP adapter with message protocol as ‘XML-To-Plain Content Conversion’ and the scenario is working properly and i see that the file was converted properly as can be seen from the audit log
Here is the file after content conversion
Now, since i also wanted a message to be converted to PGP format I just added and configured PGP module as suggested in standard guide of advantco as well as in blogs i mentioned above and thats where i started getting this strange error in audit log
Here is audit log of the error which relates to FCC in the initial look
Strange this was !!! as FCC is something which i had already tested before adding PGP module and I was like this cannot be FCC error something is wrong with PGP parameters or something and i thought of checking the logs if PGP was success or not and more surprise came when i saw that PGP was indeed success as shown below
Then a little observation and I came to know that what could be the possible issue
If you observe in the above screenshot, then we can identify that the root cause of the FCC issue is not the parameters of FCC maintained in channel but the sequence of the module processing !!! Here PGP module was processed before the standard MP Exit module of Advantco SFTP adapter, since content (XML DATA) of the message was already encrypted by PGP module so it was no longer XML which usually gets converted in to text format when we use message protocol ‘XML-To-Plain Content Conversion’ in the MP Exit module of advantco and this is why the error of FCC was present in audit log since it was trying to convert PGP output of module ‘AdvantcoOpenPGPSender’ which was called before the MP Exit module.
This led me to think how can i do PGP after FCC and then I thought of using ‘MessageTransformBean’ but even that I did not have to explicitly add because advantco itself provides the below two options in Message protocol
1. XML-To-CSV Conversion Simple
2. XML-To-CSV Conversion Structural
My purpose was solved as selecting option 1 above added MessageTransfomBean in the Module tab and removed tab Content conversion, In the module tab i just had to update the parameters like fieldSeparator, endSeparator etc. Further, I added PGP module after this module since now input which PGP module receives is already converted to text format by its predecesor module MessageTransformBeam. Below is my final configuration of the SFTP channel
Below is the audit log of execution after this configuration