Blank Documents retrieved after decoding using Java Code/Base64Decode function
We are receiving the document from external system in Base64 format. I am trying to use Java code to decode base64 to binary and then AttachToWork activity to attach the document to work Object, Documents are getting attached without content. PFB for the Java code:
String s = tools.getParamValue("Markup").toString(); //markup is the base64 encoded string
byte byteArray = new com.pega.pegarules.pub.util.Base64Util().decodeToByteArray(s);
Also I have tried base64Decode, but still documents without content are being attached to WorkObject. Do I need to use pyAttachmentContent property? as of now I am storing the base64Stream from external system in property of type Text.
Requirement is : External system sends the base64 stream, We need to share the document to user after decoding using Connect-SOAP.
Please note: There is no issue at external system. they are sending extpected base64 stream.
Keep up to date on this post and subscribe to comments
- How to parse a word document? Do we have a OOB option without involving much Java code? Am using 7.1.8 now. Need help please!!!
- Writing Java code snippet in JS Function directly
- How to call a function parameter in a java code
- how to convert java code into function?
- How to access in built Utilities functions from Java code