none
NULL value in metaverse RRS feed

  • Question

  • Hi!

    We have a Oracle DB with users profiles information.

    I have noticed that if we have null value in DB our metaverse values are don't cleared, so I have found some threads and decided to implement extesion rule to handle this.

    I want to have such logics:

    if attribute value in DB is null I need to delete it in metaverse, in another cases I need to have "simple" flow without modifications.

    My code looks like:

    case "ATTR3":
                        if (csentry[ATTR3"].IsPresent)
                        {
                            string attr3 = csentry["ATTR3"].Value;
                            if (attr3 != null)
                            {
                                mventry["ATTR3"].Value = attr3;
                            }

                            else
                            {
                                mventry["ATTR3"].Value = null;
                            }

                        }
                        break;

    But this code is not working (I get "Not Applyed" error and nothig changed in metaverse.

    Any ideas?

    Thanks!


    1

    Monday, March 20, 2017 12:57 PM

Answers

  • Try adding an additional attribute from your oracle data source to the attribute flow (something like account name that would always be present).

    That may help get around the "not applied" error.

    • Marked as answer by alexiszp Thursday, March 23, 2017 1:56 PM
    Tuesday, March 21, 2017 3:55 PM
  • Sorry I did not read carefully the whole block, but you need to change as follows.

    IsPresent takes care of NULL already, it is the equivalent.

    case "ATTR3":
                        if (csentry[ATTR3"].IsPresent)
                             {
                            mventry["ATTR3"].Value= csentry["ATTR3"].Value;

                             }

                             else
                            {
                                mventry["ATTR3"].Delete();
                            }

                       
                        break;


    Nosh Mernacaj, Identity Management Specialist




    • Edited by Nosh Mernacaj Wednesday, March 22, 2017 11:42 AM
    • Marked as answer by alexiszp Thursday, March 23, 2017 1:56 PM
    Wednesday, March 22, 2017 11:37 AM

All replies

  • Try adding an additional attribute from your oracle data source to the attribute flow (something like account name that would always be present).

    That may help get around the "not applied" error.

    • Marked as answer by alexiszp Thursday, March 23, 2017 1:56 PM
    Tuesday, March 21, 2017 3:55 PM
  • Check this thread, seems the exact issue.

    I believe you can simply do this

    case "ATTR3":
                        if (csentry[ATTR3"].IsPresent)
                        {
                            string attr3 = csentry["ATTR3"].Value;
                            if (attr3 != null)
                            {
                                mventry["ATTR3"].Value = attr3;
                            }

                            else
                            {
                                mventry["ATTR3"].Delete();
                            }

                        }
                        break;

    https://social.technet.microsoft.com/Forums/en-US/62d09c04-f505-460f-9be5-bb46540a050b/how-to-null-out-previously-imported-attributes?forum=identitylifecyclemanager


    Nosh Mernacaj, Identity Management Specialist

    Wednesday, March 22, 2017 12:51 AM
  • Thanks, SamiVV!


    One part is working - rule is applyed now.

    But still having problem with deleting null values from metaverse. I have tryed to use .Delete() and assign a null value to attribute, change commands in if and else positions but without success.

    Also, I have made a such test. Instead of using .Delete() and .Value=attr3 in code above I tyred to set Values to something like .Value="string1" and "string2". And results are:

    1. .Value="string1" instead of .Value=attr3 is working fine

    2. .Value="string2" instead of .Delete() or .Value=null is not working.


    It can be attribute precedence issue, but DB values have a first precedence.

    Any new ideas?

    Thanks!


    1


    • Edited by alexiszp Wednesday, March 22, 2017 11:00 AM
    Wednesday, March 22, 2017 10:53 AM
  • Sorry I did not read carefully the whole block, but you need to change as follows.

    IsPresent takes care of NULL already, it is the equivalent.

    case "ATTR3":
                        if (csentry[ATTR3"].IsPresent)
                             {
                            mventry["ATTR3"].Value= csentry["ATTR3"].Value;

                             }

                             else
                            {
                                mventry["ATTR3"].Delete();
                            }

                       
                        break;


    Nosh Mernacaj, Identity Management Specialist




    • Edited by Nosh Mernacaj Wednesday, March 22, 2017 11:42 AM
    • Marked as answer by alexiszp Thursday, March 23, 2017 1:56 PM
    Wednesday, March 22, 2017 11:37 AM
  • Thanks, Nosh!

    Now I see that in import stage from DB this parameter is marked as "Applied Delete" with Final Value=Deleted.

    If I correctly understand values from AD can overwrite 'NULL' values in metaverse even if DB value have more precedence, right?

    Thanks to all!


    1

    Thursday, March 23, 2017 1:56 PM