How we can validate using a Groovy Script for validating Empty CSV File in SAP CPI with non zero byte size of the file , the file is only coming with the Header Filed rows but rest other data is not coming , how to set a flag for this kind of empty file for SAP CPI Router condition?
here the expression - ${in.body.length} = '0' is not working since the file size is more than 0 byte since the Header field row is coming in the file.
Sample CSV File scenarios :
1. With Valid File content with valid data :
Employee ID,Request Type,Request Subtype,Created Date,Current request Status,Start Date,End Date,
003075631,GLOBAL_TIME_OFF,3100,2023-07-18,APPROVED,2023-02-10,2023-07-10,
003075631,GLOBAL_TIME_OFF,3100,2023-07-18,CANCEL APPROVED,2023-02-10,2023-08-08,
2. Invalid File content /Empty File scenario with only Header Field row items coming :
Employee ID,Request Type,Request Subtype,Created Date,Current request Status,Start Date,End Date,
How to validate the 2nd scenarios considering it as empty file case for processing in SAP CPI and setting the Router Flag value for condition check?