[midPoint] Exit correlation rule instead of return empty

Laza, Javier Javier.Laza at ingrammicro.com
Thu Oct 22 11:17:26 CEST 2020


Hello folks

I have a OR correlation rule against an AD system that performs two verifications and works fine. I want to also add a new one that checks if the email of the account matches with any user email address

The problem I am facing is that some accounts doesn't have an email account, so I am getting a DISPUTED status, I think this is because it is returning an empty string or something like that and there are some users without an email as well, so Midpoint thinks several users matches the rule

I am checking if the account's email is empty and if so, then I return the email address (see the code below). Otherwise I don't want to return anything. I was thinking about setting a condition, but Midpoint complains when I try to use a <condition> tag inside the <q:equal> tag

<correlation>

                <q:or>
                    <q:equal>
                             --- Verification 1
                    </q:equal>

                    <q:equal>
                           --- Verification 2
                    </q:equal>


                    <q:equal>
                        <q:path xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3">c:emailAddress</q:path>
                        <expression>
                            <script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xsi:type="c:ScriptExpressionEvaluatorType">
                                <code>
                                   def mail = basic.getAttributeValue(shadow, 'mail')
                                   if(mail != null){
                                        log.info("The email is {}",mail)
                                        mail
                                   }else{
                                        log.info("The email attribute is empty")
                                   }
                                 </code>
                            </script>
                        </expression>
                    </q:equal>

                </q:or>
            </correlation>


Regards

La informaci?n contenida en este mensaje es confidencial. En caso de que reciba este mensaje por error le rogamos lo comunique a la mayor brevedad al emisor y proceda a su eliminaci?n definitiva, absteni?ndose de copiar, almacenar o difundir su contenido. De acuerdo con lo establecido en la Ley Org?nica 15/1999, de Protecci?n de Datos de Car?cter Personal y en el Reglamento de Desarrollo 1720/2007, los datos personales que facilite a trav?s de la direcci?n de correo indicada ser?n incorporados a un fichero titularidad de INGRAM MICRO, S.L.U., con domicilio en C/ Antonio Machado, 78-80 1? y 2? pl. Business Park ( 08840-Viladecans). Mediante el env?o de sus datos, Ud. otorga su consentimiento expreso a INGRAM MICRO, S.L.U, para el tratamiento de sus datos, con la finalidad de atender a su consulta y/o mantener la relaci?n profesional, comercial, y/o contractual que en su caso establezca con INGRAM MICRO, S.L.U. Puede ejercitar sus derechos de acceso, rectificaci?n, cancelaci?n y oposici?n notific?ndolo por escrito a la direcci?n del remitente, o a la siguiente direcci?n de correo nuevascuentas at ingrammicro.es. De acuerdo con la Ley 34/2002, de Servicios de la Sociedad de la Informaci?n y de Comercio Electr?nico, Vd. podr? oponerse en cualquier momento al tratamiento de sus datos con fines promocionales notific?ndonoslo por escrito a la direcci?n de correo mencionada.
.................................................................................................................................................................................................................................................
The information contained in this message is confidential. If you receive this message by error please notify it as soon as possible to the sender and proceed to their final elimination by not copy, store or distribute its content. In accordance of what is stated in the Law 15/1999, of Data Personal Protection and Regulation Rule 1720/2007, the personal data provided through the email address you entered will be included in a file owned by INGRAM MICRO, SLU, located at C/ Antonio Machado, 78-80 1? y 2? pl. Business Park ( 08840-Viladecans). By submitting your data, you expressly give your consent to INGRAM MICRO, SLU, to the treatment of your data, in order to answer to your questions and / or keep the professional, commercial relationship  and / or contractual set with INGRAM MICRO, SLU You can exercise your rights of access, rectification, cancellation and opposition by giving written notification to the sender address or to  the following email:  nuevascuentas at ingrammicro.es. According to Law 34/2002, of the Information Society and Electronic Commerce, you may object at any time to your data treatment for promotional purposes by notifying us in writing to the email address above.
[Ingram_2818e5de]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20201022/181e39cc/attachment.htm>


More information about the midPoint mailing list