Exchange mailbox problem

Good afternoon
 We have a problem provisioning Exchange email accounts.
We assing AD and Exchange accounts resources through a level 30 role.


In some cases, Exchange account is assigned a few moments before AD account. Therefore, the event is vetoed.
Aftherthat thanks to the rule: "Check target of add-association for Exchange mailbox entitlements" from policy "NOVLADENTEXT-itp-EntitlementsImpl" an attempt is made to set homeMDB to create the email account.
"set source attribute value (homeMDB)" action succeeds against the "add-association" event, but the corresponding MODIFY <modified-attr attr-name = "homeMDB" does not appear in the output XML . Therefore email account is not created.


My hypothesis is that when the action was executed, Dirxml-association with AD driver had not finished writing to eDir yet.
Action was executed at 19:14:23 hs. and dirxml-association finished writing at 19:14:47 hs.

Here are the log snippets:


Rule "Check target of add-association for Exchange mailbox entitlements":

--------

[11/19/21 19:14:23.355]:Active Directory Driver ST: Action: do-set-src-attr-value("homeMDB",arg-association(token-xpath("./text()")),token-local-variable("homeMDB")).
[11/19/21 19:14:23.355]:Active Directory Driver ST: arg-association(token-xpath("./text()"))
[11/19/21 19:14:23.355]:Active Directory Driver ST: token-xpath("./text()")
[11/19/21 19:14:23.355]:Active Directory Driver ST: Token Value: "1600fb61f1f4af4d93d4da4ba4cb15a2".
[11/19/21 19:14:23.370]:Active Directory Driver ST: Arg Value: "1600fb61f1f4af4d93d4da4ba4cb15a2".
[11/19/21 19:14:23.370]:Active Directory Driver ST: arg-string(token-local-variable("homeMDB"))
[11/19/21 19:14:23.370]:Active Directory Driver ST: token-local-variable("homeMDB")
[11/19/21 19:14:23.370]:Active Directory Driver ST: Token Value: "CN=New Base 60MG,CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=XXXX,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=XXXX,DC=local".
[11/19/21 19:14:23.386]:Active Directory Driver ST: Arg Value: "CN=New Base 60MG,CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=XXXX,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=XXXXX,DC=local".
[11/19/21 19:14:23.386]:Active Directory Driver ST: Action: do-set-src-attr-value("mailNickname",arg-association(token-xpath("./text()")),token-substring(length="20",token-replace-all("[^a-zA-Z0-9\x21\x23-\x29\x2d\x2e\x40\x5e-\x60\x7b\x7d\x7e\xc0-\xf6\xf8-\xff\u0410-\u044f]","",token-src-name()))).
[11/19/21 19:14:23.401]:Active Directory Driver ST: arg-association(token-xpath("./text()"))
[11/19/21 19:14:23.401]:Active Directory Driver ST: token-xpath("./text()")
[11/19/21 19:14:23.401]:Active Directory Driver ST: Token Value: "1600fb61f1f4af4d93d4da4ba4cb15a2".
[11/19/21 19:14:23.401]:Active Directory Driver ST: Arg Value: "1600fb61f1f4af4d93d4da4ba4cb15a2".
[11/19/21 19:14:23.401]:Active Directory Driver ST: arg-string(token-substring(length="20",token-replace-all("[^a-zA-Z0-9\x21\x23-\x29\x2d\x2e\x40\x5e-\x60\x7b\x7d\x7e\xc0-\xf6\xf8-\xff\u0410-\u044f]","",token-src-name())))
[11/19/21 19:14:23.417]:Active Directory Driver ST: token-substring(length="20",token-replace-all("[^a-zA-Z0-9\x21\x23-\x29\x2d\x2e\x40\x5e-\x60\x7b\x7d\x7e\xc0-\xf6\xf8-\xff\u0410-\u044f]","",token-src-name()))
[11/19/21 19:14:23.417]:Active Directory Driver ST: token-substring(length="20",token-replace-all("[^a-zA-Z0-9\x21\x23-\x29\x2d\x2e\x40\x5e-\x60\x7b\x7d\x7e\xc0-\xf6\xf8-\xff\u0410-\u044f]","",token-src-name()))
[11/19/21 19:14:23.433]:Active Directory Driver ST: token-replace-all("[^a-zA-Z0-9\x21\x23-\x29\x2d\x2e\x40\x5e-\x60\x7b\x7d\x7e\xc0-\xf6\xf8-\xff\u0410-\u044f]","",token-src-name())
[11/19/21 19:14:23.433]:Active Directory Driver ST: token-replace-all("[^a-zA-Z0-9\x21\x23-\x29\x2d\x2e\x40\x5e-\x60\x7b\x7d\x7e\xc0-\xf6\xf8-\xff\u0410-\u044f]","",token-src-name())
[11/19/21 19:14:23.433]:Active Directory Driver ST: token-src-name()
[11/19/21 19:14:23.433]:Active Directory Driver ST: Token Value: "".
[11/19/21 19:14:23.433]:Active Directory Driver ST: Arg Value: "".
[11/19/21 19:14:23.433]:Active Directory Driver ST: Token Value: "".
[11/19/21 19:14:23.433]:Active Directory Driver ST: Arg Value: "".
[11/19/21 19:14:23.433]:Active Directory Driver ST: Token Value: "".
[11/19/21 19:14:23.433]:Active Directory Driver ST: Arg Value: "".
[11/19/21 19:14:23.433]:Active Directory Driver ST: Direct command from policy
[11/19/21 19:14:23.433]:Active Directory Driver ST:


<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.8.3.1">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<modify class-name="group" event-id="HOSGMSSGIEDIR-NDS#20211119221310#1#6:16e08778-08ff-4ad5-92ea-580a4f3ea128">
<association>19d7d87749815c4bb6182a3293db8d63</association>
<modify-attr attr-name="member">
<add-value>
<value association-ref="1600fb61f1f4af4d93d4da4ba4cb15a2" type="dn">\XXXXX\data\users\actives\XXXXXX</value>
</add-value>
</modify-attr>
<operation-data AccountTracking-AccountStatusChanged="true" AccountTracking-AppAccountStatus="-" AccountTracking-IdvAccountStatus="A" AccountTracking-LDAPDN="CN=XXXXXX,OU=Usuarios XXXXc,DC=XXXX,DC=local" AccountTracking-ObjectDN="\SMU\data\users\actives\XXXXX" AccountTracking-Operation="add" AccountTracking-association="1600fb61f1f4af4d93d4da4ba4cb15a2" AccountTracking-sAMAccountName="XXXXX" AccountTracking-userPrincipalName="XXXX@XXXXX.local" attempt-to-match="true" check-exch-mailbox-entitlements="true" check-group-entitlements="true" unmatched-src-dn="CN=XXXX,OU=actives">
<password-subscribe-status>
<association/>
</password-subscribe-status>
<entitlement-impl id="" name="Group" qualified-src-dn="O=data\OU=users\OU=actives\CN=XXXXXX" src="UA" src-dn="\XXXX\data\users\actives\XXXX" src-entry-id="256190" state="1">{"ID":"19d7d87749815c4bb6182a3293db8d63","ID2":"CN=All SO,OU=Grupos,DC=XXXX,DC=local"}</entitlement-impl>
</operation-data>
</modify>
</input>
</nds>


[11/19/21 19:14:23.448]:Active Directory Driver ST: Submitting document to subscriber shim:
[11/19/21 19:14:23.448]:Active Directory Driver ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.8.3.1">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<modify class-name="group" event-id="HOSGMSSGIEDIR-NDS#20211119221310#1#6:16e08778-08ff-4ad5-92ea-580a4f3ea128">
<association>19d7d87749815c4bb6182a3293db8d63</association>
<modify-attr attr-name="member">
<add-value>
<value association-ref="1600fb61f1f4af4d93d4da4ba4cb15a2" type="dn">\SMU\data\users\actives\bXXX</value>
</add-value>
</modify-attr>
<operation-data AccountTracking-AccountStatusChanged="true" AccountTracking-AppAccountStatus="-" AccountTracking-IdvAccountStatus="A" AccountTracking-LDAPDN="CN=XXXX,OU=Usuarios XXX,DC=XXX,DC=local" AccountTracking-ObjectDN="\SMU\data\users\actives\XXX" AccountTracking-Operation="add" AccountTracking-association="1600fb61f1f4af4d93d4da4ba4cb15a2" AccountTracking-sAMAccountName="bXXX" AccountTracking-userPrincipalName="XXX@XXXX.local" attempt-to-match="true" check-exch-mailbox-entitlements="true" check-group-entitlements="true" unmatched-src-dn="CN=XXX,OU=actives">
<password-subscribe-status>
<association/>
</password-subscribe-status>
<entitlement-impl id="" name="Group" qualified-src-dn="O=data\OU=users\OU=actives\CN=XXX" src="UA" src-dn="\SMU\data\users\actives\XXXX" src-entry-id="256190" state="1">{"ID":"19d7d87749815c4bb6182a3293db8d63","ID2":"CN=All SO,OU=Grupos,DC=XXXX,DC=local"}</entitlement-impl>
</operation-data>
</modify>
</input>
</nds>

--------

Could you help me to understand what is happening?
Thanks