I tried to build up an Xpathconstraint (in a retrieve object, FYI) in which I would like to constrain on certain characteristics only conditionally. In my specific case, I would like to retrieve a list of Object A with matching attributes for object B. Here comes in the conditionality of the constraint; certain constraints only apply when these attributes are not empty in object B. I know that, in the microflow itself, I can model these conditions with splits followed by different retrieve actions with the right Xpath for every condition . But I was curious if I can do so already in the xpathconstraint itself. I tried to do so with if-then-else statements in the Xpathconstraint but this doesn't seem to be possible. So my question is: Is it possible to specify condition xpath constraints and if so; how to do this
I would like to retrieve a list of Object A with matching attributes for object B. Here comes in the conditionality of the constraint; certain constraints only apply when these attributes are not empty in object B.
Solution (single attribute):
[ObjectA_B/ObjectB/Attribute = Attribute and ObjectA_B/ObjectB/Attribute != empty]]
Solution (multiple attributes):
[(ObjectA_B/ObjectB/Attribute1 = empty or (ObjectA_B/ObjectB/Attribute1 = Attribute1 and ObjectA_B/ObjectB/Attribute1 != empty))
(ObjectA_B/ObjectB/Attribute2 = empty or (ObjectA_B/ObjectB/Attribute2 = Attribute2 and ObjectA_B/ObjectB/Attribute2 != empty)
Currently it's not possible to specify conditional xpath constraints. For now, you should use a microflow to open different forms with different xpath constraints.
[Attribute1 = empty or (Attribute1 != empty and ObjectA_B/ObjectB/Attribute1 = Attribute1)]