How to write when rule in XML
Hi All,
Could you please help me to customize for a scenario regarding XML.
I have a working XML now. I need to write a when condition to contains/startswith search in <pega:forEach> tag. this <pega:foreach> is referencing pagelist (say AppNames(1),AppNames(2)...) from different class (say Rule-Application) but our main XML is in my application class(say ABC-FW-Work). Now I need to check AppName property from each page in pagelist in a when condition. I created the when rule(say MyWhenRule) in Rule-Application class but getting error because system is searcing it in ABC-FW-Work class.
how to make it work? I have tried below things so far but could not make it work.
1. This is a snap shot of my code:
<pega:forEach name="$THIS.ApplicationNames">
<pega:when name = "MyWhenRule" >
<Other Coding>
</pega:forEach>
I have also tried below things in place of when::
2. <pega:when java="<%= tools.getProperty(".AppName").getStringValue().toLowerCase().contains("pega")%>">
2.<pega:when java="<%=pega_rules_string.contains(".AppName", "Pega") %>">
Please help me here!
Regards,
Kousik