Problem
A microflow retrieve can use multiple XPath predicates, for example:
retrieve $Items from Sample.Item
where [CreatedAt > $Token/CreatedAt or (CreatedAt = $Token/CreatedAt and ItemId > $Token/ItemId)]
[CreatedAt < '[%CurrentDateTime%]']
[ExternalId != empty];
During describe -> exec -> describe, mxcli parsed those predicates into one chained and expression and wrote a single XPath constraint. That can turn [A or B][C][D] into [A or B and C and D], which changes XPath operator precedence.
Expected behavior
The roundtrip should preserve the predicate boundaries and write the same [predicate][predicate] XPathConstraint shape back to the model.
Actual behavior
The parser discarded the original predicate boundaries when building the retrieve AST, and the writer wrapped the combined expression as one predicate.
Proposed fix
Preserve bracketed predicate source for retrieve where clauses that contain multiple XPath predicates, and write already-bracketed XPath source without adding another pair of brackets.
Problem
A microflow retrieve can use multiple XPath predicates, for example:
During
describe -> exec -> describe, mxcli parsed those predicates into one chainedandexpression and wrote a single XPath constraint. That can turn[A or B][C][D]into[A or B and C and D], which changes XPath operator precedence.Expected behavior
The roundtrip should preserve the predicate boundaries and write the same
[predicate][predicate]XPathConstraint shape back to the model.Actual behavior
The parser discarded the original predicate boundaries when building the retrieve AST, and the writer wrapped the combined expression as one predicate.
Proposed fix
Preserve bracketed predicate source for retrieve
whereclauses that contain multiple XPath predicates, and write already-bracketed XPath source without adding another pair of brackets.