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.