Hello Gents,

I'm adding a matching policy in the SAP HR driver, the purpose of the
driver is to build an association between the account in SAP HR and
Vault if a match was found, after associated, the driver will merge
their relevant attributes, below is partial of the policy:

<actions>
<do-find-matching-object scope="subtree">
<arg-dn>
<token-text xml:space="preserve">Mars\People</token-text>
</arg-dn>
<arg-match-attr name="Surname">
<arg-value type="string">
<token-op-attr name="marsSurname"/>
</arg-value>
</arg-match-attr>
<arg-match-attr name="Given Name"/>
<arg-match-attr name="siteLocation"/>
</do-find-matching-object>
<do-if>
<arg-conditions>
<and>
*<if-association op="available"/>* </and>
</arg-conditions>
<arg-actions>
<do-remove-dest-attr-value direct="true" name="Object Class">
<arg-value type="string">
<token-text xml:space="preserve">marsContractor</token-text>
</arg-value>
</do-remove-dest-attr-value>
<do-clear-dest-attr-value direct="true" name="Login Expiration
Time"/>


The problem is that when SAP HR people send out an Idoc from SAPHR, the
idoc for new commer already has the assocication in it even the idoc is
totally new, as a result, the condition in bold above was selected
unexpectly and process.

below the IDOC from SAP HR:
[05/10/11 03:17:17.310]:SAPHR :Remote Interface Driver: Received.
[05/10/11 03:17:17.310]:SAPHR :
<nds dtdversion="1.0" ndsversion="8.5">
<source>
<product build="20050513_1019 " instance="MarsSAP-HR"
version="1.0.7">DirXML Driver for SAP/HR</product>
<contact>Novell, Inc.</contact>
</source>
<input xmlns:sapshim="http://www.novell.com/dirxml/drivers/SAPShim">
<modify class-name="P"
event-id="MarsSAP-HR:O_002_0000000016749005:P+40141987"
src-dn="40141987" timestamp="20110510">
* <association>40141987</association>* <modify-attr
attr-name="P0001:ENAME:none:196:40">
<remove-all-values/>
<add-value>
<value seqnr="000" timestamp="20110504-99991231">Gewuthree
Shi</value>
</add-value>
</modify-attr>
<modify-attr attr-name="P0001:PERSG:none:82:1">
<remove-all-values/>
<add-value>
<value seqnr="000" timestamp="20110504-99991231">1</value>
</add-value>
</modify-attr>
<modify-attr attr-name="P9101:POS:none:370:40">
<remove-all-values/>
<add-value>
<value seqnr="000" timestamp="20110504-20110531">IT
Manager</value>
</add-value>
</modify-attr>
<modify-attr attr-name="P9101:SDEPT:none:226:40">
<remove-all-values/>
.......................
[05/10/11 03:17:17.354]:SAPHR :Remote Interface Driver: Received
document for publisher channel
[05/10/11 03:17:17.354]:SAPHR PT:Receiving DOM document from
application.


_Below_is_the_result:_</nds>
[05/09/11 04:22:31.587]:SAPHR PT: No matches found.
[05/09/11 04:22:31.588]:SAPHR PT: Action: do-if().
[05/09/11 04:22:31.588]:SAPHR PT: Evaluating conditions.
*[05/09/11 04:22:31.589]:SAPHR PT: (if-association available)
= TRUE.*[05/09/11 04:22:31.589]:SAPHR PT: Performing if actions.
[05/09/11 04:22:31.589]:SAPHR PT: Action:
do-remove-dest-attr-value("Object
Class",direct="true","marsContractor").
[05/09/11 04:22:31.590]:SAPHR PT:
arg-string("marsContractor")
[05/09/11 04:22:31.590]:SAPHR PT:
token-text("marsContractor")
[05/09/11 04:22:31.590]:SAPHR PT: Arg Value:
"marsContractor".
[05/09/11 04:22:31.590]:SAPHR PT: Action:
do-clear-dest-attr-value("Login Expiration Time",direct="true").
[05/09/11 04:22:31.591]:SAPHR PT: Action:
do-set-dest-attr-value("employeeType",direct="true","A").
[05/09/11 04:22:31.591]:SAPHR PT: arg-string("A")
[05/09/11 04:22:31.591]:SAPHR PT: token-text("A")
[05/09/11 04:22:31.592]:SAPHR PT: Arg Value: "A".
[05/09/11 04:22:31.592]:SAPHR PT: Action:
do-rename-dest-object(direct="true",token-op-attr("workforceID")).
[05/09/11 04:22:31.592]:SAPHR PT:
arg-string(token-op-attr("workforceID"))
[05/09/11 04:22:31.593]:SAPHR PT:
token-op-attr("workforceID")
[05/09/11 04:22:31.593]:SAPHR PT: Token Value:
"40142247".
[05/09/11 04:22:31.593]:SAPHR PT: Arg Value: "40142247".
[05/09/11 04:22:31.594]:SAPHR PT: Action: do-trace-message("On
a match removed objectClass=marsContractor, set employeeType=A and
renamed the corresp
onding user object in eDirectory MARSVAULT according to new
workforceid.").
[05/09/11 04:22:31.595]:SAPHR PT: arg-string("On a match
removed objectClass=marsContractor, set employeeType=A and renamed the
corresponding user
object in eDirectory MARSVAULT according to new workforceid.")
[05/09/11 04:22:31.595]:SAPHR PT: token-text("On a match
removed objectClass=marsContractor, set employeeType=A and renamed the
corresponding use
r object in eDirectory MARSVAULT according to new workforceid.")
[05/09/11 04:22:31.596]:SAPHR PT: Arg Value: "On a match
removed objectClass=marsContractor, set employeeType=A and renamed the
corresponding use
r object in eDirectory MARSVAULT according to new workforceid.".
[05/09/11 04:22:31.596]:SAPHR PT:On a match removed
objectClass=marsContractor, set employeeType=A and renamed the
corresponding user object in eDirectory MAR
SVAULT according to new workforceid.
[05/09/11 04:22:31.598]:SAPHR PT: Action: do-if().
[05/09/11 04:22:31.597]:SAPHR PT: Evaluating conditions.
[05/09/11 04:22:31.598]:SAPHR PT: Query from policy
[05/09/11 04:22:31.598]:SAPHR PT:
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.5.11.20080307 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<query class-name="User" scope="entry">
<association>40142247</association>
<read-attr attr-name="Internet EMail Address"/>
<read-attr attr-name="marsNotesSMTPFlag"/>
<read-attr attr-name="marsWebID"/>
<read-attr attr-name="workforceID"/>
</query>
</input>
</nds>

Anybody could tell me why the association exist already before the
match is found? If I want to run the commands after match is found and
association is built between SAPHR and Vault, what should I do?

Many thanks in advance.


--
shisam
------------------------------------------------------------------------
shisam's Profile: http://forums.novell.com/member.php?userid=110115
View this thread: http://forums.novell.com/showthread.php?t=438590