[midPoint] ScriptedSQL and Account Intent

Pálos Gustáv gustav.palos at gmail.com
Wed Feb 19 08:30:56 CET 2020


Hi,

you can use attribute objectClass instead of intent like this:

switch (objectClass) {
    case ObjectClass.ACCOUNT_NAME:
        //TODO
        break;
    case "AccountApplication2":
          //TODO
        break;
    case "AccountApplication3":
          //TODO
        break;
    default:
        throw new ConnectorException("Unknown object class $objectClass");
}

Best regards,

Gustav

ut 18. 2. 2020 o 15:58 Loïc Schamber <lschamber at serial.ch> napísal(a):

> Hi everyone,
>
>
>
> I am currently deploying midpoint and I am using the ”ConnId
> com.evolveum.polygon.connector.scripted.sql.ScriptedSQLConnector v2.1“
>
>
>
> I have to manage account for multiple custom application, but all those
> applications use on the same database to manage accounts.
>
> So I have a table called USER_ACCOUNTS where the key composed of two
> fields : the name of the user and the name of the application. This table
> also have multiple other fields to store user data (Phone number, mail, ..)
>
> If an user have multiple account, he will be inserted multiple time in
> this table with different applications names.
>
> What I was planning to do is to use multiple account intents to allow an
> user having multiple account on the ScriptedSQL resource.
>
> As the APP name is a field the database  table I also managed it as a
> schema attribute (app_name) and the outbound mapping of this attribute was
> the AppName. (Which is the same as the intent name)
>
>
>
> It is working for the CreateScript.groovy as I get all the required
> attributes  to create the user but I have a problem with the Update and
> Delete scripts:
>
> In the delete script, no user attributes are given except the user uid and
> in the update script, only the attributes that need to be updated are
> passed to the script. So I cannot retrieve the application name from the
> attribute (Which I did in the create script).
>
> In the same way, I don’t seems to be able to retrieve the intent on the
> scripts, so I can not use it either.
>
>
>
> Is there a way to retrieve intent on the ScriptedSQL scripts, so I can use
> it to manage different account type in groovy scripts?
>
>
>
> I also cannot use the DatabaseTable connector because I need to update
> multiple tables on the database when inserting an user.
>
> I will add that I am not the one in charge of the database architecture
> and I am not able to change it.
>
>
>
> Thanks for your help,
>
>
>
> *Loïc Schamber*  | Junior IT Consultant
>
>
> [image: logo] <https://www.serial.ch/>
>
>
>
> lschamber at serial.ch |  +41 22 555 27 69 <+41%2022%20555%2027%2069>
> Chemin du Pré-Fleuri 5 – CH 1228 Plan-les-Ouates
>
> [image: LinkedIn]
> <https://www.linkedin.com/company/redcactus-by-positivethinkingcompany>  [image:
> Instagram] <https://www.instagram.com/positivethinkingcompany>
>
> *Redcactus by SERIAL *www.serial.ch <http://www.serial.ch>
> www.positivethinking.co
>
> ------------------------------
>
> *Help save paper, do you really need to print this email?*
> *The content of this email and any attachments are confidential and are
> intended solely for the person and/or company to whom they are addressed.
> The information may also be legally privileged. No employee or agent is
> authorized to conclude any binding agreement on behalf of SERIAL with
> another party by email without express written confirmation. If you have
> received this email in error, any use, reproduction or dissemination of
> this transmission is strictly prohibited. If you are not the intended
> recipient, please immediately notify the sender by return E-mail and delete
> this message, its attachments and all copies from your system. Internet
> communications cannot be guaranteed to be timely, secure, error or
> virus-free. The sender does not accept liability for any errors or
> omissions. *
> *Thank you for your cooperation.  *
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>


-- 
s pozdravom

Gustáv Pálos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20200219/9eccb6c7/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 6827 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20200219/9eccb6c7/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 451 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20200219/9eccb6c7/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 1129 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20200219/9eccb6c7/attachment-0002.png>


More information about the midPoint mailing list