[midPoint] - Search filter with scripted expression
Radovan Semancik
radovan.semancik at evolveum.com
Tue Aug 23 15:52:11 CEST 2016
Hi Rodrigo,
Just a curious question: What is the reason that you do not user the
activation/validTo property of the user?
I'm not trying to persuade you or push you to use a specific solution. I
just wonder whether the midPoint validity time constraints have some
limitation that prohibits the use in practice or whether there is some
other barrier.
--
Radovan Semancik
Software Architect
evolveum.com
On 08/22/2016 09:00 PM, Rodrigo Yanis wrote:
> 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 <mailto:ryanis at identicum.com>
> www.identicum.com <http://www.identicum.com/>
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20160823/807a75e8/attachment.htm>
More information about the midPoint
mailing list