I`m having a problem using getLastError in a “try-catch-like” sequence.
Im using, as many other probably do, the pub:flow:getLastError service to catch the exception thrown in the try sequence and also recover the pipeline (note there is a document in my pipeline when the exception is thrown.. a document that, BTW, is an element of an array I
m iterating through when the exception is thrown).
When recovering the pipeline, WM Developer insists on telling me there is a document list in the pipeline, not the single document. I`ve noticed, however, that, inside the lastError object returned by the pub:flow:getLastError service, there is, indeed, a single document, not a document list.
Two questions:
- Is that the expected behavior? and
- If so, how do I refer to an element of a document list in a variable substitution expression? I mean…
when it is not an array, I can access the member “name” of a “person” document by using "%person/name%. How would the syntax be if “person” was a document list/array?
Thanks,
felipem