<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>the following groovy script in the condition statement crash:<br>
</p>
<p><i><attribute id="20"></i><i><br>
</i><i> <c:ref
xmlns:ri=<a class="moz-txt-link-rfc2396E" href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">"http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"</a>>ri:supannEntiteAffectation</c:ref></i><i><br>
</i><i> <displayName>Affectation
Fonctionnelle</displayName></i><i><br>
</i><i> <limitations></i><i><br>
</i><i> <minOccurs>0</minOccurs></i><i><br>
</i><i> <maxOccurs>-1</maxOccurs></i><i><br>
</i><i> </limitations></i><i><br>
</i><i> <outbound></i><i><br>
</i><i> <strength>strong</strength></i><i><br>
</i><i> <source></i><i><br>
</i><i>
<c:path>$focus/extension/listeAffectations</c:path></i><i><br>
</i><i> <set></i><i><br>
</i><i> <condition></i><i><br>
</i><i> <script
xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
xmlns:c=<a class="moz-txt-link-rfc2396E" href="http://midpoint.evolveum.com/xml/ns/public/common/common-3">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a>
xsi:type="c:ScriptExpressionEvaluatorType"></i><i><br>
</i><i> <code></i><i><br>
</i><i><i>
listeAffectations?.startsWith("HIE") </i><i><br>
</i><i>
||
listeAffectations?.startsWith("FUN")</i><i><br>
</i><i>
||
listeAffectations?.startsWith("HOP")</i><i><br>
</i><i>
||
listeAffectations?.startsWith("ETU")</i><i><br>
</i><i>
</i> </code></i><i><br>
</i><i> </script></i><i><br>
</i><i> </condition></i><i><br>
</i><i> </set></i><i><br>
</i><i> </source></i></p>
<p><i> ...</i><i><br>
</i></p>
<p><i> </outbound></i></p>
<i></attribute></i><br>
<p><br>
</p>
<p>with the follwing error:</p>
<p><i>2020-04-17 11:45:09,219 [MODEL] [pool-3-thread-16] ERROR
(com.evolveum.midpoint.model.common.expression.script.ScriptExpression):
Expression error: Compilation error in (old) domain of
listeAffectations in mapping in outbound mapping for
{.../resource/instance-3}supannEntiteAffectation in
<a class="moz-txt-link-freetext" href="resource:u75-connecteur-LDAP-UP(LDAP">resource:u75-connecteur-LDAP-UP(LDAP</a> UP): startup failed:</i><i><br>
</i><i>(old) domain of listeAffectations in mapping in outbound
mapping for {.../resource/instance-3}supannEntiteAffectation in
<a class="moz-txt-link-freetext" href="resource:u75-connecteur-LDAP-UP(LDAP">resource:u75-connecteur-LDAP-UP(LDAP</a> UP): 3: unexpected token:
|| @ line 3, column 45.</i><i><br>
</i><i> || listeAf</i><i><br>
</i><i> ^</i><i><br>
</i><i><br>
</i><i>1 error</i><i><br>
</i></p>
<p><br>
</p>
<p>and this one works without problem (the same except that the '||'
are at the end of lines):<br>
</p>
<p><i><attribute id="20"></i><i><br>
</i><i>
<c:ref
xmlns:ri=<a class="moz-txt-link-rfc2396E" href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">"http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"</a>>ri:supannEntiteAffectation</c:ref></i><i><br>
</i><i>
<displayName>Affectation
Fonctionnelle</displayName></i><i><br>
</i><i>
<limitations></i><i><br>
</i><i>
<minOccurs>0</minOccurs></i><i><br>
</i><i>
<maxOccurs>-1</maxOccurs></i><i><br>
</i><i>
</limitations></i><i><br>
</i><i>
<outbound></i><i><br>
</i><i>
<strength>strong</strength></i><i><br>
</i><i>
<source></i><i><br>
</i><i>
<c:path>$focus/extension/listeAffectations</c:path></i><i><br>
</i><i>
<set></i><i><br>
</i><i>
<condition></i><i><br>
</i><i>
<script
xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
xmlns:c=<a class="moz-txt-link-rfc2396E" href="http://midpoint.evolveum.com/xml/ns/public/common/common-3">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a>
xsi:type="c:ScriptExpressionEvaluatorType"></i><i><br>
</i><i>
<code></i><i><br>
</i><i>
</i><i><i>
listeAffectations?.startsWith("HIE") ||</i><i><br>
</i><i>
listeAffectations?.startsWith("FUN") ||</i><i><br>
</i><i>
listeAffectations?.startsWith("HOP") ||</i><i><br>
</i><i>
listeAffectations?.startsWith("ETU")</i><i><br>
</i></i><i> </code></i><i><br>
</i><i>
</script></i><i><br>
</i><i>
</condition></i><i><br>
</i><i>
</set></i><i><br>
</i><i>
</source></i></p>
<i>
</i>
<p><i> ...</i><i><br>
</i>
</p>
<i>
</i>
<p><i> </outbound></i></p>
<i>
</attribute></i><br>
<p><br>
</p>
<p>
</p>
<p>Did I missed something ?</p>
<p>thanks<br>
</p>
</body>
</html>