create-rules
Determine whether a new entry can be created in the destination as a result of an add operation in the source.
The create rules specify the conditions for creating a new entry in either eDirectory or external application. The create rules are kept in an DirXML-Rule object and associated with your driver through the DirXML-CreateRule attribute of your driver's DirXML-Publisher and DirXML-Subscriber objects. Both the subscriber and publisher can have their own rules, or they can share the same rules.
For the subscriber rules, the source is eDirectory and the destination is the external application. For the publisher rules, the source is the external application and the destination is eDirectory.
The DirXML engine applies create rules only after applying any existing matching rules, and these matching rules fail to find a matching entry in the destination.
Create rules should complement the matching rules. Usually a create rule should require all the attributes used by a matching rule. This defers the creation of an entry until enough is known about an entry to perform a reasonable match in the receiving application.
<!ELEMENT create-rules (create-rule)*> <!ELEMENT create-rule (match-attr*, required-attr*, template?) > <!ATTLIST create-rule class-name CDATA #IMPLIED description CDATA #IMPLIED> <!ELEMENT match-attr (value)+ > <!ATTLIST match-attr attr-name CDATA #REQUIRED> <!ELEMENT required-attr (value)*> <!ATTLIST required-attr attr-name CDATA #REQUIRED> <!ELEMENT template EMPTY> <!ATTLIST template template-dn CDATA #REQUIRED>
The following example illustrates two create rules.
<create-rules> <!-- For all Users in the Defense organization require --> <!-- Given Name, Surname, and Security Clearance. --> <!-- Create using the templates\Secure User template. --> <create-rule class-name="User"> <match-attr attr-name="OU"> <value>Defense</value> </match-attr> <required-attr attr-name="Given Name"/> <required-attr attr-name="Surname"/> <required-attr attr-name="Security Clearance"/> <template template-dn="templates\Secure User"/> </create-rule> <!-- For all other Users require Given Name and Surname. --> <!-- Default the value of Security Clearance to None --> <!-- Don’t use a template for creation --> <create-rule class-name="User"> <match-attr attr-name="OU"> <value>Defense</value> </match-attr> <required-attr attr-name="Given Name"/> <required-attr attr-name="Surname"/> <required-attr attr-name="Security Clearance"> <value>None</value> </required-attr> </create-rule> </create-rules>
For another example, see the sub_create_rule.xml file used by the subscriber in the VRTest driver.