Some clarification from WRC: "The "RuleActionUserData" is a value set in the rule when or otherwise clause and can be overwritten at each iteration of the <foreach>. The <Send> action is not executed immediately at each iteration, but a list of <Send> action is generated while evaluating the <When> condition and will be execuated all at once after the evaluation. That's why the last value set in the RuleActionUserData was sent to the same DTL twice in this case."

In the end, we were able to get this work by instead passing a list of the segment IDs, and then modifying the list within the transform.

Here, each iteration of the RGS segment appends the IDRGS to the comma delimited list, and then in the transform, we grab the first piece, and then if it is not the last item on the list, we modify the list (so the next Send action will get the next item):

This resulted in the previously expected behavior of one message with each RGS segment.

Thanks, this is helpful...  I am fairly new to objectscript, so I'm having some difficulty retrieving the filesize from FileInfo from within the customized adapter.  I think I need to call it after a session has been established, and so I'm trying:

Set tFileInfoList=$LISTBUILD("test","test")

do ..%sftpSession.FileInfo(pFilename,.tFileInfoList)

Set tFinalSize= $LIST(tFileInfoList,2)

But this results in an error, ERROR <Ens>ErrException: <UNDEFINED>zPutStream+10^ACH.OutboundAdapterSFTPConfirm.1 *tFileInfoList -- logged as '-' number - @' Set tFinalSize= $LIST(tFileInfoList,2)'

Looking for any info on this error is unproductive.  I must be misunderstanding something about how ByRef arguments work-- likely I am misunderstanding how to invoke FileInfo and handling %List objects for this particular session instance, as well.