[midPoint] - Search filter with scripted expression

Rodrigo Yanis ryanis at identicum.com
Wed Aug 24 18:16:46 CEST 2016


Radovan, Pavol,

First off, thanks for your input. We were unaware that midPoint would offer
such native functionality, therefore it was never considered as an
alternative to this need. We'll be modifying our design so we handle this
through the native validTo and validFrom attributes.

Sorry for the delayed response,

Thanks again,


*Rodrigo Yanis.*
Identicum S.A.
Jorge Newbery 3226
Tel: +54 (11) 4824-9971
ryanis at identicum.com
www.identicum.com

2016-08-23 10:52 GMT-03:00 Radovan Semancik <radovan.semancik at evolveum.com>:

> 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 Architectevolveum.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
> www.identicum.com
>
>
> _______________________________________________
> midPoint mailing listmidPoint at lists.evolveum.comhttp://lists.evolveum.com/mailman/listinfo/midpoint
>
>
>
> _______________________________________________
> 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/20160824/ec07c052/attachment.htm>


More information about the midPoint mailing list