Hello,
I'm trying to build a loopback connector, which writes the "AttributeA"
of a source object with the class "ClassA" to a target object with the
Class "User" as soon as a new object with the Class "ClassA" is added.

AttributeA example: "cn=user1,ou=users,o=system" (its always a LDAP DN)

Order:
- Process rule when a new object with class "ClassA" was added
- Set variable "SetAttributeA" to the value of the "AttributeA"

- Set variable "SetTargetObject" to the value of "AttributeA" in
dot-format

- If variable "SetAttribute" is more then nothing, then
- Set the attribute "AttributeA" to "SetAttribute" on user
"user1.users.system"

I hope it makes sense...

This is my rule:


Code:
--------------------
<?xml version="1.0" encoding="UTF-8"?><policy>
<rule>
<description>Automatically copy attribute value</description>
<conditions>
<and>
<if-class-name mode="case" op="equal">ClassA</if-class-name>
<if-operation mode="case" op="equal">add</if-operation>
</and>
</conditions>
<actions>
<do-set-local-variable name="SetAttributeA" scope="policy">
<arg-string>
<token-src-attr name="AttributeA"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="SetTargetObject">
<arg-string>
<token-parse-dn dest-dn-format="dot" src-dn-format="ldap">
<token-src-attr name="AttributeA"/>
</token-parse-dn>
</arg-string>
</do-set-local-variable>
<do-if>
<arg-conditions>
<and>
<if-local-variable mode="regex" name="SetAttributeA" op="equal">.+</if-local-variable>
</and>
</arg-conditions>
<arg-actions>
<do-set-src-attr-value name="AttributeA">
<arg-dn>
<token-local-variable name="SetTargetObject"/>
</arg-dn>
<arg-value type="string">
<token-local-variable name="SetAttributeA"/>
</arg-value>
</do-set-src-attr-value>
</arg-actions>
</do-if>
</actions>
</rule>
</policy>


--------------------


However, i get the following trace output (Warning / Error
highlighted):

I would appreciate any help to figure out why i get both messages!



Code:
--------------------

Drvrs: KONNEKTOR ST: Token Value: "cn=User1,ou=Users,O=system".
Drvrs: KONNEKTOR ST: Arg Value: "cn=User1,ou=Users,O=system".
Drvrs: KONNEKTOR ST: Action: do-set-local-variable("SetTargetObject",token-parse-dn(dest-dn-format="dot",src-dn-format="ldap",token-src-attr("AttributeA"))).
Drvrs: KONNEKTOR ST: arg-string(token-parse-dn(dest-dn-format="dot",src-dn-format="ldap",token-src-attr("AttributeA")))
Drvrs: KONNEKTOR ST: token-parse-dn(dest-dn-format="dot",src-dn-format="ldap",token-src-attr("AttributeA"))
Drvrs: KONNEKTOR ST: token-parse-dn(dest-dn-format="dot",src-dn-format="ldap",token-src-attr("AttributeA"))
Drvrs: KONNEKTOR ST: token-src-attr("AttributeA")
Drvrs: KONNEKTOR ST: Token Value: "cn=User1,ou=Users,O=system".
Drvrs: KONNEKTOR ST: Arg Value: "cn=User1,ou=Users,O=system".
Drvrs: KONNEKTOR ST: Token Value: "User1.Users.system".
Drvrs: KONNEKTOR ST: Arg Value: "User1.Users.system".
Drvrs: KONNEKTOR ST: Action: do-if().
Drvrs: KONNEKTOR ST: Evaluating conditions.
Drvrs: KONNEKTOR ST: (if-local-variable 'SetAttributeA' match ".+") = TRUE.
Drvrs: KONNEKTOR ST: Performing if actions.
Drvrs: KONNEKTOR ST: Action: do-set-src-attr-value("AttributeA",arg-dn(token-local-variable("SetTargetObject")),token-local-variable("SetAttributeA")).
Drvrs: KONNEKTOR ST: arg-dn(token-local-variable("SetTargetObject"))
Drvrs: KONNEKTOR ST: token-local-variable("SetTargetObject")
Drvrs: KONNEKTOR ST: Token Value: "User1.Users.system".
Drvrs: KONNEKTOR ST: Arg Value: "User1.Users.system".
Drvrs: KONNEKTOR ST: arg-string(token-local-variable("SetAttributeA"))
Drvrs: KONNEKTOR ST: token-local-variable("SetAttributeA")
Drvrs: KONNEKTOR ST: Token Value: "cn=User1,ou=Users,O=system".
Drvrs: KONNEKTOR ST: Arg Value: "cn=User1,ou=Users,O=system".
Drvrs: KONNEKTOR ST: Direct command from policy
Drvrs: KONNEKTOR ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.0.2.0">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<modify dest-dn="User1.Users.system" event-id="myserver#20150123123509#1#1:c748ec53-8d0b-48b2-65bf-53ec48c70b8d">
<modify-attr attr-name="AttributeA">
<remove-all-values/>
<add-value>
<value type="string">cn=User1,ou=Users,O=system</value>
</add-value>
</modify-attr>
</modify>
</input>
</nds>
Drvrs: KONNEKTOR ST: Pumping XDS to eDirectory.
Drvrs: KONNEKTOR ST: Performing operation modify for User1.Users.system.
Drvrs: KONNEKTOR ST: --JCLNT-- \MYTREE\system\DriverSet\My Konnektor : Duplicating : context = 2140864666, tempContext = 2140864647
Drvrs: KONNEKTOR ST: --JCLNT-- \MYTREE\system\DriverSet\My Konnektor : Calling free on tempContext = 2140864647
Drvrs: KONNEKTOR ST: Processing returned document.
Drvrs: KONNEKTOR ST: Processing operation <status> for .
Drvrs: KONNEKTOR ST:
DirXML Log Event -------------------
DRIVER: \MYTREE\SYSTEM\DRIVERSET\MY KONNEKTOR
CHANNEL: SUBSCRIBER
STATUS: ERROR
MESSAGE: CODE(-9010) AN EXCEPTION OCCURRED: NOVELL.JCLIENT.JCEXCEPTION: NAMETOID -601 ERR_NO_SUCH_ENTRY
Drvrs: KONNEKTOR ST: Direct command from policy result
Drvrs: KONNEKTOR ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.0.2.0">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status event-id="myserver#20150123123509#1#1:c748ec53-8d0b-48b2-65bf-53ec48c70b8d" level="error">Code(-9010) An exception occurred: novell.jclient.JCException: nameToID -601 ERR_NO_SUCH_ENTRY<application>DirXML</application>
<module>My Konnektor</module>
<object-dn></object-dn>
<component>Subscriber</component>
</status>
</output>
</nds>
Drvrs: KONNEKTOR ST:Policy returned:
Drvrs: KONNEKTOR ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.0.2.0">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<add cached-time="20150123123509.125Z" class-name="ClassA" event-id="myserver#20150123123509#1#1:c748ec53-8d0b-48b2-65bf-53ec48c70b8d" qualified-src-dn="O=system\OU=Subfolder\OU=SourceObjects\ClassAI D=671718D7B41928A421D44E6F738DBFED48CDC1AA" src-dn="\MYTREE\system\Subfolder\SourceObjects\671718D 7B41928A421D44E6F738DBFED48CDC1AA" src-entry-id="34723" timestamp="1422016509#3">
<add-attr attr-name="AttributeA">
<value timestamp="1422016509#3" type="string">cn=User1,ou=Users,O=system</value>
</add-attr>
</add>
</input>
</nds>
Drvrs: KONNEKTOR ST:Subscriber processing add for \MYTREE\system\Subfolder\SourceObjects\671718D7B41 928A421D44E6F738DBFED48CDC1AA.
Drvrs: KONNEKTOR ST:No object matching policies.
Drvrs: KONNEKTOR ST:No object creation policies.
Drvrs: KONNEKTOR ST:No object placement policies.
Drvrs: KONNEKTOR ST:Submitting add to subscriber shim.
Drvrs: KONNEKTOR ST:No command transformation policies.
Drvrs: KONNEKTOR ST:Filtering out notification-only attributes.
Drvrs: KONNEKTOR ST: Filtered out <add-attr attr-name='AttributeA'>.
Drvrs: KONNEKTOR ST:Fixing up association references.
Drvrs: KONNEKTOR ST:Applying schema mapping policies to output.
Drvrs: KONNEKTOR ST:Applying policy: MappingRule-1.
Drvrs: KONNEKTOR ST: No mapping for class-name 'ClassA'.
Drvrs: KONNEKTOR ST:No output transformation policies.
Drvrs: KONNEKTOR ST:Submitting document to subscriber shim:
Drvrs: KONNEKTOR ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.0.2.0">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<add cached-time="20150123123509.125Z" class-name="ClassA" event-id="myserver#20150123123509#1#1:c748ec53-8d0b-48b2-65bf-53ec48c70b8d" qualified-src-dn="O=system\OU=Subfolder\OU=SourceObjects\ClassAI D=671718D7B41928A421D44E6F738DBFED48CDC1AA" src-dn="\MYTREE\system\Subfolder\SourceObjects\671718D 7B41928A421D44E6F738DBFED48CDC1AA" src-entry-id="34723" timestamp="1422016509#3"/>
</input>
</nds>
Drvrs: KONNEKTOR ST:SubscriptionShim.execute() returned:
Drvrs: KONNEKTOR ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.0.2.0">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status event-id="myserver#20150123123509#1#1:c748ec53-8d0b-48b2-65bf-53ec48c70b8d" level="warning">Code(-8015) Operation vetoed by filter.</status>
</output>
</nds>
Drvrs: KONNEKTOR ST:No input transformation policies.
Drvrs: KONNEKTOR ST:Applying schema mapping policies to input.
Drvrs: KONNEKTOR ST:Applying policy: MappingRule-1.
Drvrs: KONNEKTOR ST:Resolving association references.
Drvrs: KONNEKTOR ST:Processing returned document.
Drvrs: KONNEKTOR ST:Processing operation <status> for .
Drvrs: KONNEKTOR ST:
*DIRXML LOG EVENT -------------------
DRIVER: \MYTREE\SYSTEM\DRIVERSET\MY KONNEKTOR
CHANNEL: SUBSCRIBER
OBJECT: \MYTREE\SYSTEM\SUBFOLDER\SOURCEOBJECTS\671718D7B41 928A421D44E6F738DBFED48CDC1AA
STATUS: WARNING
MESSAGE: CODE(-8015) OPERATION VETOED BY FILTER.*
Drvrs: KONNEKTOR ST:End transaction.
DirXML: KONNEKTOR EV: Physically purged 290 bytes from cache 34635.TAO
DirXML: KONNEKTOR EV: Elapsed time: 3.281 milliseconds

--------------------


--
Cardinal62
------------------------------------------------------------------------
Cardinal62's Profile: https://forums.netiq.com/member.php?userid=4902
View this thread: https://forums.netiq.com/showthread.php?t=52654