Access of PageList-Element in XMLStream not occur if optional
When user has an element of an XML Stream rule that is mapped to Page List value using an index, then this will cause an error when you attempt to run the XML Stream rule.
The reference .XXXXXXX(1 is not valid. Reason: unexpected end of reference string”
Steps to Reproduce
1. Create new Case Type (say, 'Test').
2. Add Page List property ('SomeList' and add 'Name' property to it).
3. Create new XML Stream rule and add two elements:
- 'Contact' with Standard mapping and .SomeList(1) as Context Page
- 'Name' under 'Contact' with Source Property set to '.Name'
4. Save and perform RUN – observe the results.
5. Make 'Contact' node optional.
6. Save and RUN – observe error “The reference .SomeList(1 is not valid. Reason: unexpected end of reference string”
The error will be visible in the Designer Studio UI and Tracer.
A defect in Pegasystems’ code or rules due to wrong When Expression.