How do we get a size of the recordList during runtime. We have already used pub.record:length & pub.list:sizeOfList services. They work fine if our source RecordList contains more than one record but gives an error if the RecordList received contains only one record. We are using documentToRecord to create our record. We tried also to set recordName parameter in recordtoDocument service so that it could force the input to be an array so that pub.list:sizeOfList does not fail, but still it does not work.
Alternatively,is there any other way to achieve the same result if there is a single input record during runtime so that the solution will work for a LOOP statement.
Any help would be appreciated.