[midPoint] XML Object Query Filters for Recompute tasks

Ivan Noris ivan.noris at evolveum.com
Mon Nov 14 21:24:29 CET 2016


Hi Sergio,

sorry for misleading you, but "lastprocessedname" is not midPoint
variable, it was just a placeholder in that example for the name of the
last processed object that you are aware of.

So if you start recompute and check the logs, you will see log entries
about object being recomputed (or failed). When you suspend recompute
and wish to continue, you can go back in the log and see which object
was the last. e.g. "john.smith" was processed successfully, but
"jonathan.smith" was not - so the additional condition to put to the
task filter "q:and" would be

            <q:greater>
                <q:path>name</q:path>
                <q:value>john.smith</q:value>
            </q:greater>

Of course this works ONLY if the recompute task keeps the same order in
both runs (achieved by:
            <q:paging>
                <q:orderBy>name</q:orderBy>
            </q:paging>
 ).

Hope this helps,
Ivan

On 11/14/2016 08:57 PM, Sergio Ortiz wrote:
> Hi Ivan,
>
> Thanks a lot for the information, but when I try to apply the filter
> with the variable *lastprocessedname *it doesn't works, please, could
> you refer me where I can check this one? or in which version of
> Midpoint could I use it? my version is 3.4.1.
>
> I tried this variable as a simple filter with *lastprocessedname, *and
> Midpoint returns null.
>
> Greetings
>
> Ing. Sergio Ortiz
> *Identicum S.A.*
> Jorge Newbery 3226
> Tel: +54 (11) 4552-3050
> www.identicum.com <http://www.identicum.com>
>
> 2016-11-11 11:01 GMT-03:00 Ivan Noris <ivan.noris at evolveum.com
> <mailto:ivan.noris at evolveum.com>>:
>
>     Hi Sergio,
>
>     recompute does not allow this directly, but if recompute has been
>     executed using query, there is a way:
>
>     <task oid="08e2fbc8-9622-11e6-a917-3c970e44b9e2"
>        
>     xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
>     <http://midpoint.evolveum.com/xml/ns/public/common/common-3>
>        
>     xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
>     <http://midpoint.evolveum.com/xml/ns/public/common/common-3>
>         xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
>     <http://prism.evolveum.com/xml/ns/public/query-3>
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     <http://www.w3.org/2001/XMLSchema-instance>
>         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>     <http://www.w3.org/2001/XMLSchema>>
>                                      
>         <name>User Recompute Task XYZ</name>
>         <description>Recomputes enabled EMP users</description>
>          <extension>
>             <mext:objectQuery
>     xmlns:mext="http://midpoint.evolveum.com/xml/ns/public/model/extension-3"
>     <http://midpoint.evolveum.com/xml/ns/public/model/extension-3>>
>             <q:filter>
>             <q:and>
>                 <q:equal>
>                     <q:path>c:employeeType</q:path>
>                     <q:value>EMP</q:value>
>                 </q:equal>
>                 <q:equal><!-- Only enabled users -->
>                     <q:path>c:activation/administrativeStatus</q:path>
>                     <q:value>enabled</q:value>
>                 </q:equal>
>             </q:and>
>             </q:filter>
>     *            <q:paging>**
>     **                <q:orderBy>name</q:orderBy>**
>     **            </q:paging>**
>     *        </mext:objectQuery>
>         </extension>
>         <ownerRef oid="00000000-0000-0000-0000-000000000002"/>
>         <executionStatus>runnable</executionStatus>
>        
>     <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/synchronization/task/recompute/handler-3
>     <http://midpoint.evolveum.com/xml/ns/public/model/synchronization/task/recompute/handler-3></handlerUri>
>         <recurrence>single</recurrence>
>         <binding>tight</binding>
>     </task>
>
>     If such task is executed, it's processing users sequentially. If
>     it stops, you "continue" by adding another condition to the <q:and>:
>     *            <q:greater>**
>     **                <q:path>name</q:path>**
>     **                <q:value>lastprocessedname</q:value>**
>     **            </q:greater>**
>     *
>     Then if you start that task, it should "continue" by processing of
>     the next user (sorted alphabetically).
>     Of course if the set of your users has changed meanwhile this will
>     not guarantee that it will process all of them.
>
>     Regards,
>     Ivan
>
>
>
>     On 11/11/2016 02:34 PM, Sergio Ortiz wrote:
>>     Hi all,
>>
>>     I would like to know if there is a query or a way that permit to
>>     resume
>>     recompute tasks and not re-evaluate all the scope of users, only
>>     the users that
>>     have not been processed.
>>
>>     Thanks for your opinions.
>>
>>     Greetings
>>
>>     Ing. Sergio Ortiz
>>     *Identicum S.A.*
>>     Jorge Newbery 3226
>>     Tel: +54 (11) 4552-3050
>>     www.identicum.com <http://www.identicum.com>
>>
>>     2016-11-03 16:55 GMT-03:00 Sergio Ortiz <sortiz at identicum.com
>>     <mailto:sortiz at identicum.com>>:
>>
>>         Hi all,
>>
>>         I would like to know if there is a query or a way that permit
>>         to resume recompute tasks and not re-evaluate all the scope
>>         of users, only the users that have not been processed.
>>
>>         Thanks for your opinions.
>>
>>         Greetings
>>
>>         Ing. Sergio Ortiz
>>         *Identicum S.A.*
>>         Jorge Newbery 3226
>>         Tel: +54 (11) 4552-3050
>>         www.identicum.com <http://www.identicum.com>
>>
>>
>>
>>
>>     _______________________________________________
>>     midPoint mailing list
>>     midPoint at lists.evolveum.com <mailto:midPoint at lists.evolveum.com>
>>     http://lists.evolveum.com/mailman/listinfo/midpoint
>>     <http://lists.evolveum.com/mailman/listinfo/midpoint>
>
>     -- 
>     Ivan Noris
>     Senior Identity Engineer
>     evolveum.com <http://evolveum.com>
>
>     _______________________________________________ midPoint mailing
>     list midPoint at lists.evolveum.com
>     <mailto:midPoint at lists.evolveum.com>
>     http://lists.evolveum.com/mailman/listinfo/midpoint
>     <http://lists.evolveum.com/mailman/listinfo/midpoint> 
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
-- 
Ivan Noris
Senior Identity Engineer
evolveum.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20161114/2cb65a1d/attachment.htm>


More information about the midPoint mailing list