none
Sync Rule Parameter if reference object exists RRS feed

  • Question

  • Hi!

    I am syncing user object to an SQL MA. In one field, i need the Managers employeenumber. So i achieved this with a sync rule Parameter as follows:

    [//Target/Manager/employeenumber]

    Now there are some user object that have no Manager. It is my understanding that i receive the following eventlog error for that reason:

    System.ArgumentException: Cannot deference on non-instantiated Attribute Manager

    Can someone give me a hint how i can check if a Manager is present and only then select the employeenumber?

    I Vision the following:

    IIF(ispresent(//Target/Manager),//Target/Manager/employeenumber,"")

    Thanks for your time

    Martin



    • Edited by MMuellerM Thursday, May 8, 2014 9:39 AM
    Friday, May 2, 2014 2:53 PM

Answers

  • Hi Søren,

    Thanks for your reply. I can see how your solution would work. However, i have a lot of export flows where i need existing data in a different format. I would rather not add a new attribute for all of those cases.

    I found the following solution which works great for me:

    Instead of referencing the Object/Attribute directly for the Sync Rule Parameter, i use a second activity to get the Managers EmployeeNumber and save that in //WorkflowData. Then i can use //WorkflowData in the SyncRule Activity. That way, the Workflow doesn't seem to care if a Manager exists or not.

    • Marked as answer by MMuellerM Thursday, May 8, 2014 9:38 AM
    Thursday, May 8, 2014 9:24 AM

All replies

  • My approach lately on these has been to do workflows that populate all fields on objects - and then do direct flows where no data manipulation takes place in Sync Rules. Maybe you could have a workflow that populates the managers employeenumber on all objects when the manager changes? For backreferences I sometimes rely on my CopyValue workflow (http://fimactivitylibrary.codeplex.com/)

    I know this is not hitting the spot with the Sync Rules, but a slightly different approach.


    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt

    Wednesday, May 7, 2014 5:06 AM
  • Hi Søren,

    Thanks for your reply. I can see how your solution would work. However, i have a lot of export flows where i need existing data in a different format. I would rather not add a new attribute for all of those cases.

    I found the following solution which works great for me:

    Instead of referencing the Object/Attribute directly for the Sync Rule Parameter, i use a second activity to get the Managers EmployeeNumber and save that in //WorkflowData. Then i can use //WorkflowData in the SyncRule Activity. That way, the Workflow doesn't seem to care if a Manager exists or not.

    • Marked as answer by MMuellerM Thursday, May 8, 2014 9:38 AM
    Thursday, May 8, 2014 9:24 AM