locked
Issues with MA Extension Attribute Flow

    Question

  • Dear all,

    I Am attempting to link multiple CS attributes to build a MV attribute using the MapAttributesForImport sub in an MAExtension

    Attributes mail, homeDirectory, sn, givenname, are all selected CS attributes.

    My code sample is as follows:

    Case "mail"
      If csentry("mail").IsPresent Then
        mventry("mail").Value = csentry("mail").Value 
      ElseIf csentry("homeDirectory").IsPresent Then
        If InStr(csentry("homeDirectory").Value, "servername") <> 0 Then
          mventry("mail").Value = csentry("givenName").Value + "." + csentry("sn").Value + Chr(60) + "domain1.com"
        Else
           mventry("mail").Value = csentry("givenName").Value + "." + csentry("sn").Value + Chr(60) + "domain2.com"
        End If
      Else
        mventry("mail").Value = csentry("givenName").Value + "." + csentry("sn").Value + Chr(60) + "domain2.com"
      End If
    Case Else...

    If I declare the rule to fire on an "advanced" attribute flow of "mail"->"mail", I find debuging through a "full import" that the rule is skipped when the cs mail entry is null (so it only fires and populates the field in the mv if the cs field is present).

    If I attempt to work around it by leaving "mail" out of the attribute flow (and say attempt to do "homeDirectory"->"mail" "advanced" attirbute flow) I get the following stack trace:

    Microsoft.MetadirectoryServices.AttributeNotDefinedAsSourceException: Attribute "mail" is not declared as a dependency.
       at Microsoft.MetadirectoryServices.Impl.CSEntryImpl.get_Item(String attributeName)
       at Mms_ManagementAgent_DomainExtension.MAExtensionObject.MapAttributesForImport(String FlowRuleName, CSEntry csentry, MVEntry mventry) in C:\DomainExtension\DomainExtension.vb:line 40

    Am I missing something?   Why does the rule not fire if the cs mail field is blank, and is there a way to work around this?

    Hoping someone can help!

    Paul

    Friday, November 10, 2006 11:41 AM

Answers

  • This behavior is by design. When you select attributes to flow into the MV, only the selected attributes are available to the extension code. You must include all attributes that you intend to reference in your rule.

    When MIIS sees that a NULL is flowing, it determines there is nothing to do, and does not fire the flow rule. This is an optimization and is by design. You can circumvent this behavior by including a second attribute in the flow rule that is not NULL.

    Friday, November 10, 2006 3:27 PM

All replies

  • This behavior is by design. When you select attributes to flow into the MV, only the selected attributes are available to the extension code. You must include all attributes that you intend to reference in your rule.

    When MIIS sees that a NULL is flowing, it determines there is nothing to do, and does not fire the flow rule. This is an optimization and is by design. You can circumvent this behavior by including a second attribute in the flow rule that is not NULL.

    Friday, November 10, 2006 3:27 PM
  • Hi Bruce,

    Sorry for not understanding, but I cannot find anywhere in the interface to add more than on CS attribute to allow it to be referenced by my rule extension (I am assuming you mean say add both CS cn and CS mail attributes into the flow rule to map to MV mail, to ensure as CS cn will always present, the rule extension will always fire).     Am I misreading your reply?

    I guess I'm struggling a little and not really explaining myself! - I'll try and summerise - If I can only setup a rule between a single CS and a single MV attribute:

    1.  If the single CS attribute I need to use is NULL then the extension code doesn't fire.
    2.  If the single CS attribute I use is a different attribute, I get a stack trace complaining that the attribute I want to reference is not declared as a dependancy

    How can I therefore work around the issue?

    Thanks in advance.

    Paul

     

    Monday, November 13, 2006 12:57 PM
  • You can select multiple attributes by pressing the shift key during the attribute selection. Just make sure that you have selected advanced flow for the rule you are about to configure, first.

     

     

    Cheers,

    Markus

     

    ///////////////////////////////////////////////////////////////////////
    Markus Vilcinskas

    Technical Writer
    Microsoft Identity Integration Server
    mailto:markvi@microsoft.com.NO_SPAM

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Use of included script samples are subject to the terms specified at
    http://www.microsoft.com/info/copyright.htm
    ///////////////////////////////////////////////////////////////////////

     

    Monday, November 13, 2006 2:04 PM
    Moderator
  • Don't forget the ctrl key if you want to select individual attributes.

    HTH,

     

    Joe

    Monday, November 13, 2006 2:35 PM
  • Doh!

    Feel stupid now.   Thanks all for all the help.

    kind regards,

    Paul

    Tuesday, November 14, 2006 9:49 AM
  • This behavior is by design. When you select attributes to flow into the MV, only the selected attributes are available to the extension code. You must include all attributes that you intend to reference in your rule.

    When MIIS sees that a NULL is flowing, it determines there is nothing to do, and does not fire the flow rule. This is an optimization and is by design. You can circumvent this behavior by including a second attribute in the flow rule that is not NULL.

    Bruce,

    I am running into a similar situation where I am trying to set proxyAddresses on an entry.  The business rules I've been given are such that the code needs to make a decision based on the value of either a field from the Oracle database, or the value of proxyAddresses from AD.  For existing entries, this is fine and the rule is executed.  For new entries, where extensionAttribute14 does not yet exist, the code is not fired.

    Your suggestion to circumvent by adding a second attribute does not work.  The MV proxyAddress is the only value that is null.  The other fields all have non-null values, yet the rule is not executed.
    Wednesday, July 29, 2009 6:24 PM