[midPoint] Java script in Correlation Filter clause

Oleksandr Nekriach o.nekriach at dynatech.lv
Thu Oct 19 09:30:40 CEST 2017


Hi,

What is the best place to filter out incoming  data during reconciliation
that for some reason does not suite us, is it also Correlation Filter
clause or another place?
For example:
I have CSV resource and want to filter out all records with:
- empty value in login field
- wrong character in login field
... etc.


2017-10-18 13:51 GMT+03:00 Oleksandr Nekriach <o.nekriach at dynatech.lv>:

> Hello Arnošt,
>
> Thank you, you are right now it works.
> Regards, Oleksandr
>
> 2017-10-18 12:53 GMT+03:00 Arnošt Starosta - AMI Praha a.s. <
> arnost.starosta at ami.cz>:
>
>> Hi Oleksandr,
>>
>> the variable bindings should work the same for all expression languages,
>> so i guess you missed the variable declaration. you can try
>>
>> <q:equal xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common
>> /org-3">
>>    <q:path>c:employeeNumber</q:path>
>>    <expression>
>>                         <variable>
>>                             <name>pid</name>
>>                             <c:path>$shadow/attributes/ri:PID</c:path>
>>                         </variable>
>>       <script>
>>       <code>
>>       'HRM'+ pid
>>        </code>
>>       </script>
>>    </expression>
>> </q:equal>
>>
>> arnost
>>
>>
>>
>> 2017-10-18 11:28 GMT+02:00 Oleksandr Nekriach <o.nekriach at dynatech.lv>:
>> >
>> > Hi all,
>> > A little question. I did not  find of any examples of using java script
>> in Correlation Filter clause.
>> > I have try this one (please find below) and another syntax but
>> everything is wrong.
>> > I know workaround to store concatenated value data into some focus
>> attribute then just compare both in  Correlation Filter clause but I want
>> to find another way. Is it possible to do the same on the fly with script
>> expression in filter clause?
>> >
>> >
>> > Wrong java script in Correlation Filter clause
>> >
>> > <q:equal xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common
>> /org-3">
>> >    <q:path>c:employeeNumber</q:path>
>> >    <expression>
>> >       <script>
>> >       <code>
>> >       'HRM'+$account/attributes/PID
>> >        </code>
>> >       </script>
>> >    </expression>
>> > </q:equal>
>> >
>> > Error
>> > Caused by: com.evolveum.midpoint.util.exception.ExpressionEvaluationException:
>> Couldn't evaluate expressioncom.evolveum.midpoint.xml.ns._public.common.
>> common_3.ExpressionType at 7f6fe5c2[description=<null>,
>> extension=<null>,trace=<null>,stringFilter=<null>,variable=[
>> ],returnMultiplicity=<null>,allowEmptyValues=<null>,queryInt
>> erpretationOfNoValue=<null>,runAsRef=<null>,expressionEval
>> uator=[javax.xml.bind.JAXBElement at 5c1f8636]]:
>> groovy.lang.MissingPropertyException: No such property: $account for
>> class: Script16 in (new) Correlation expression
>> >
>> > Thank you, in advance.
>> >
>> > --
>> > Best regards,
>> >
>> > Oleksandr Nekriach | Identity and access management engineer
>> >
>> > Dynatech, Mednieku str. 4a, Riga, LV-1010, Latvia
>> >
>> > +37125314685 <+371%2025%20314%20685>
>> > ,
>> > o.nekriach at dynatech.lv
>> > |
>> > www.dynatech.lv
>> >
>> >
>> >
>> >
>> > Stay connected:
>> >
>> >
>> > Confidentiality Notice: This message contains confidential information
>> and is intended only for the named recipient(s). If you are not the
>> addressee you may not copy, distribute or perform any other activities with
>> this information. If you have received this transmission in error, please
>> notify us by e-mail immediately. E-mail transmission cannot be guaranteed
>> to be secure or error-free as information could be intercepted, corrupted,
>> lost, destroyed, arrive late or incomplete, or contain viruses.
>> >
>> > _______________________________________________
>> > midPoint mailing list
>> > midPoint at lists.evolveum.com
>> > http://lists.evolveum.com/mailman/listinfo/midpoint
>> >
>>
>>
>>
>> --
>>
>> Arnošt Starosta
>> solution architect
>>
>> gsm: [+420] 603 794 932 <+420%20603%20794%20932>
>> e-mail: arnost.starosta at ami.cz
>>
>>
>>
>> AMI Praha a.s.
>> Pláničkova 11
>> 162 00 Praha 6
>> tel.: [+420] 274 783 239 <+420%20274%20783%20239>
>> web: www.ami.cz
>>
>>
>>
>>
>>
>> Textem tohoto e-mailu podepisující neslibuje uzavřít ani neuzavírá za
>> společnost AMI Praha a.s.
>> jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít výhradně
>> písemnou formu.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> midPoint mailing list
>> midPoint at lists.evolveum.com
>> http://lists.evolveum.com/mailman/listinfo/midpoint
>>
>>
>
>
> --
> Best regards,
>
> Oleksandr Nekriach | Identity and access management engineer
>
> Dynatech, Mednieku str. 4a, Riga, LV-1010, Latvia
>
> +37125314685 <+371%2025%20314%20685>
> ,
> o.nekriach at dynatech.lv
> |
> www.dynatech.lv
>
>
>
>
> Stay connected:
> <https://www.facebook.com/DynatechLatvia/?ref=br_rs>
> <https://www.linkedin.com/company-beta/17893047/>
>
>
> Confidentiality Notice: This message contains confidential information and
> is intended only for the named recipient(s). If you are not the addressee
> you may not copy, distribute or perform any other activities with this
> information. If you have received this transmission in error, please notify
> us by e-mail immediately. E-mail transmission cannot be guaranteed to be
> secure or error-free as information could be intercepted, corrupted, lost,
> destroyed, arrive late or incomplete, or contain viruses.
>



-- 
Best regards,

Oleksandr Nekriach | Identity and access management engineer

Dynatech, Mednieku str. 4a, Riga, LV-1010, Latvia

+37125314685 <+371%2025%20314%20685>
,
o.nekriach at dynatech.lv
|
www.dynatech.lv




Stay connected:
<https://www.facebook.com/DynatechLatvia/?ref=br_rs>
<https://www.linkedin.com/company-beta/17893047/>


Confidentiality Notice: This message contains confidential information and
is intended only for the named recipient(s). If you are not the addressee
you may not copy, distribute or perform any other activities with this
information. If you have received this transmission in error, please notify
us by e-mail immediately. E-mail transmission cannot be guaranteed to be
secure or error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20171019/642eea40/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: o.nekriach at dynatech.lv1502777022855-7771
Type: image/png
Size: 790 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20171019/642eea40/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: o.nekriach at dynatech.lv1502777022855-7772
Type: image/png
Size: 786 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20171019/642eea40/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: o.nekriach at dynatech.lv1502777022855-7770
Type: image/png
Size: 2602 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20171019/642eea40/attachment-0002.png>


More information about the midPoint mailing list