[midPoint] Conditional synchronization errors

Wojciech Staszewski wojciech.staszewski at diagnostyka.pl
Mon Nov 6 09:19:10 CET 2017


Hi all!

I have some problems with condition rule in the synchronization for split accounts into few intents.
I follow the example provided in Evolveum github, eg. here:
https://github.com/Evolveum/midpoint/blob/master/testing/consistency-mechanism/src/test/resources/request/resource-modify-synchronization.xml

<condition>
<script>
<code>
 declare default namespace "http://midpoint.evolveum.com/xml/ns/public/common/common-3";
 basic.getAttributeValue(account, 'employeeNumber') != null
</code>
</script>
</condition>

When I'm using <condition> in the form from this example (the only change is the attribute name) and enter Resource>Accounts>Resource
midPoint is restarting (ie. Tomcat is resetting and midPoint is reloading).

In the log I have error:

Script11.groovy: 2: expecting EOF, found 'default' @ line 2, column 21.
               declare default namespace "http://midpoint.evolveum.com/xml/ns/public/common/common-3";

As you can see, Groovy doesn't like namespace declaration.
When I remove the declaration, the condition doesn't work either. All accounts have no intent at all.

BTW: Where the <condition> section should be placed? Inside <correlation> or directly in <synchronization> section?
I tried to make condition using Wizard and the condition was placed in <synchronization> section, just before <correlation>.
In the example above <condition> is inside <correlation>. In such case Wizard can't see it and condition edit form is empty.

Thanks!
Wojciech Staszewski.



More information about the midPoint mailing list