My PeopleSoft driver is creating and deleting WorkOrder objects for the
WO driver to process to handle scheduled deletes for terminated
employees. If the employee is re-hired before the delete WO happens, I
need to remove the WO.

Normally, just deleting the object(s) would be fine, but when I try to
delete a non-existant object (Re-Scheduled Delete), the engine gets a
(-601). That's ok, I could ignore it, but that status gets returned back
up to the PeopleSoft system as an error. The event status should be
success, but it ends up being error instead.


<rule>
<description>Clear Schedule Account Delete for Active
Employees</description>
<conditions>
<and>
<if-operation mode="case" op="equal">modify</if-operation>
<if-op-attr name="Login Disabled"
op="changing-to">False</if-op-attr>
<if-op-attr mode="regex" name="employeeStatus"
op="changing-to">A|L|P|W</if-op-attr>
</and>
</conditions>
<actions>
<do-set-local-variable name="order-dest-dn">
<arg-string>
<token-dest-dn/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="wo-dest-dn" scope="policy">
<arg-string>
<token-text xml:space="preserve">NIU\DirXML\WorkToDo</token-text>
<token-text xml:space="preserve">\Scheduled Delete - </token-text>
<token-dest-attr name="CN"/>
</arg-string>
</do-set-local-variable>
<do-delete-dest-object class-name="DirXML-WorkOrder" when="after">
<arg-dn>
<token-local-variable name="wo-dest-dn"/>
</arg-dn>
</do-delete-dest-object>
<do-set-local-variable name="wo-dest-dn" scope="policy">
<arg-string>
<token-text xml:space="preserve">NIU\DirXML\WorkToDo</token-text>
<token-text xml:space="preserve">\Re-Scheduled Delete -
</token-text>
<token-dest-attr name="CN"/>
</arg-string>
</do-set-local-variable>
<do-delete-dest-object class-name="DirXML-WorkOrder" when="after">
<arg-dn>
<token-local-variable name="wo-dest-dn"/>
</arg-dn>
</do-delete-dest-object>
</actions>
</rule>

That's where I'm at so far. What I really want is an if-object-exists to
apply to that <do-delete-dest-object>. But I'm not seeing a way to test
for object-exists.

The reason the Re-Scheduled Delete WO object could exist is that when
the WO driver processes the Scheduled Delete, if there is an error, I
bail out of the delete, send email to the accounts admin team, and
create a new WO object to re-schedule the delete for the future. I'd
rather just change the schedule date on the original WO object, but that
doesn't work (trace posted in thread "IDM35 Work Order question - self
modifying work orders?" a while ago).


---------------------------------------------------------------------------
David Gersic dgersic_@_niu.edu

I'm tired of receiving rubbish in my mailbox, so the E-mail address is
munged to foil the junkmail bots. Humans will figure it out on their own.