Oracle Fusion Agent AI 26C: Decoding BI Publisher reportBytes (Base64) in a Code Node
Hello Experts,
I am currently building an Oracle Fusion Agent AI application in Oracle Fusion 26C that invokes an Oracle BI Publisher (BIP) report through an External REST action.
The BI Publisher response returns the report output in the reportBytes element as a Base64-encoded string. I have successfully extracted the encoded content within a Code node using the following logic:
"""
const xmlString = $context.$nodes.FETCH_BIP_REPORT.$output || '';
const startTag = '<ns2:reportBytes>';
const endTag = '</ns2:reportBytes>';
const startIndex = xmlString.indexOf(startTag);
const endIndex = xmlString.indexOf(endTag);
if (startIndex === -1 || endIndex === -1 || endIndex <= startIndex) {
return { result: null, timeout: false, error: "No encoded report data found." };