Passing a string through IEC and generating a .csv that has to be sent via email. The above exception was generated.
<Description>Workflow 'XYZ_WF' failed to start (ProcessWorkflow was 'Rejected'). Reason: The length of String is greater than max. allowed: 4000</Description>
getting this exception
import xml.etree.ElementTree as ET
import base64
def toBase64(inputString):
inputBytes = inputString.encode('UTF-8')
inputBase64 = base64.b64encode(inputBytes)
inputString = str(inputBase64)
inputString = inputString[2:len(inputString)-1]
return inputString
inputData = input_Data.replace('xmlns="http://schema.infor.com/InforOAGIS/2"','')
myInputStr = str(inputData)
root = ET.fromstring(myInputStr)
Records = ""
i = 0
DisplayID = root.find("DataArea/ReportXYZ/SenderInfo/DisplayID").text
FileName = root.find("DataArea/ReportXYZ/SenderInfo/FileName").text
Subject = root.find("DataArea/ReportXYZ/SenderInfo/Subject").text
EmailIds = root.find("DataArea/ReportXYZ/SenderInfo/EmailID").text
for element in root.findall("DataArea/ReportXYZ/EmailBody"):
ach = element.find("Data").text
Records = Records + ach +'\n'
Records1 = toBase64(Records)
output_Data = "lid://infor.m3.m3M3BEOnError2022-04-10T04:39:45.972Zc3ca9a7d-4f61-4f18-b0da-d9fe7517f450"+DisplayID+""+EmailIds+""+FileName+""+Subject+""+Records1+""
This is the python code which has the issue