On my PeopleSoft driver, events from the HR system always come in to the
Publisher as a <modify>. Depending on what happens, though, by the time
the document reaches the command transform, it could take one of several
forms.

A simple modify, of an existing, associated object:

<input>
<modify ...>
</modify>
</input>


A synthetic add of a new object, with both an add and one or more modify
commands in the document:

<input>
<add ...>
</add>
<modify ...>
</modify>
<modify ...>
</modify>
</input>


Multiple modify commands to an existing, associated object:

<input>
<modify ...>
</modify>
<modify ...>
</modify>
</input>


Multiple modify commands to an existing, associated object, plus an add
of another object class:

<input>
<modify ...>
</modify>
<modify ...>
</modify>
<add class="DirXML-WorkOrder" ...>
</add>
</input>


In all cases, I need to send an email message with the person's
personal/account/job details. But I'm having trouble figuring out how to
send only one message here, given that there could be more than one
command in the document. The one I want is either what the engine refers
to as "Add #1" or "Modify #1", but I'm not seeing a way to get to that
information.

If I tack on operation data to the initial <modify> document on the
publisher input transform, will that survive in to the synthetic add
document? Or is there a way to detect a synthetic add so that I can tack
on operation data there? I think I can assume that an <add> is always
synthetic, but only because I know that the PeopleSoft CI here is set up
to always send <modify> transactions.

My other thought was to set a driver-scoped local variable on the input
transform when a <modify> is received, then change it's value after
sending the email message. That might work.



---------------------------------------------------------------------------
David Gersic dgersic_@_niu.edu
Novell Support Forums Volunteer SysOp http://forums.novell.com

Please post questions in the newsgroups. No support provided via email.