[midPoint] - Search filter with scripted expression
Rodrigo Yanis
ryanis at identicum.com
Mon Aug 22 21:00:03 CEST 2016
Hello everyone,
I'm currently trying to build a task to disable users when they reach their
termination date in midPoint (expressed on a custom attribute as
dd/MM/yyyy).
I'm having difficulties defining a search filter that would evaluate
equality to a value returned by a Groovy script, the code is the following:
<scext:executeScript xmlns:scext="
http://midpoint.evolveum.com/xml/ns/public/model/scripting/extension-3">
<s:search xmlns:s="
http://midpoint.evolveum.com/xml/ns/public/model/scripting-3">
<s:type>c:UserType</s:type>
<s:searchFilter>
<q:equal>
<q:path>extension/metaEndDate</q:path>
<c:expression>
<c:script>
<c:code>
def dateTime = new Date().format(
'dd/MM/yyyy' );
return dateTime.toString();
</c:code>
</c:script>
</c:expression>
</q:equal>
</s:searchFilter>
<s:action>
<s:type>disable</s:type>
</s:action>
</s:search>
</scext:executeScript>
Error (execution time) I recieve is the following: Couldn't execute script:
Couldn't parse object filter due to schema exception
I understand this must be related to namespaces definitions. I couldn't
find any example of what i'm trying to do either.
Do you know if this is possible?
Thanks.
*Rodrigo Yanis.*
Identicum S.A.
Jorge Newbery 3226
Tel: +54 (11) 4824-9971
ryanis at identicum.com
www.identicum.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20160822/ffd53871/attachment.htm>
More information about the midPoint
mailing list