errorArray and errors from envelopeProcess and validate respectively are by nature recordList. But if only one error is returned then they become records in the pipeliine and not recordList. My error routine then fails because there is not recordList to loop through.
Has anyone encountered this and how did you get around it.
I’ve already tried listSize and appendToRecordList but they return exception errors.
My last resort is to use recordToRecordList but that means coding two paths in my error routine. Is there another alternative?
Still looking for help on this.
Second situation now. I’m mapping the N3 segment in EDI document. The N3 is defined in the EDI Template as a RecordList as it should be but I only have one iteration of the N3. Therefore wm converts my N3 to a record. The problem is this fails validation because its validating a record against a recordlist. I can’t use appendToRecordList here because there is nothing else to add to the N3 segment.
Chris, I am not sure what your business logic looks like but something seems strange here.
When invoking a Flow which calls pub.list:sizeOfList or pub.list:appendToRecordList and where the input list is empty, no exception is thrown. Predicatably, the results show “size = 0” and a list with one record – the appended one.
Similarly, looping over a RecordList with only one record should not throw an error. It should just execute one time.
Even looping over a list that does not exist in the pipeline should not cause errors.
And, because I do not see anything in the IS service packs to specifically address these types of errors, I am going to have to punt. All I can say is that your Developer seems to not behave as expected.
I think in an earlier post you said you were running IS 4.6. Is that correct?
So, recordListName with the array as shown should work.
If you do not have the double named structure above, then wm will throw an error. You stated that when wm creates the record item for N3, that this is throwing the error at this time. I wonder if it is creating the record correctly.
Also, one other thing: I know you are running IS4.6. If you have recently upgraded from 4.01/4.02, then you need to download new schemas and templates because there were some changes. Also, check out Fix_10 for IS4.6. It fixed some schema issues.
Thanks for the input. The tip about the recordListName got me thinking. Based on how the data is coming down from the app I choose to manually clone the N1 recordList twice as two individual reocrds and use the appendToRecordList to repopulate the N1 recordList. In doing so I created the N3 as a record and not a recordList. Hence my problem.
Sometimes a 2nd pair of eyes do help even if they’re from cyberspace.
We did the same as u: errorArray and errors from envelopeProcess and validate respectively. I did run into cases that only one error returned, but no error encountered.
What we did was:
check on hasError or isValidContent, respectively for above two services,
if invalid (true, false, respectively)
loop on errorArray or errors, respectively
error message handling.