How the Sterling Connect:Enterprise UNIX Server Batch Status Service Works

Sterling Connect:Enterprise® UNIX Server Batch Status service sends a query to Sterling Connect:Enterprise for UNIX and, optionally, can be used to update process flags, the CEUBatchId or the CEUMailboxId.

About this task

The following example describes what happens when a business process is initiated by a Sterling Connect:Enterprise for UNIX schedule notification, but then, as a result of a downstream activity's error, the Batch Status service is used to alter the Sterling Connect:Enterprise for UNIX transmitted (T) flag so that the batch can be extracted again.

Procedure

  1. The Sterling Connect:Enterprise UNIX Server Adapter initiates a business process in response to a schedule notification from Sterling Connect:Enterprise for UNIX.
  2. The business process runs the extract service which copies the batch from the mailbox and sets the transmitted flag on the batch indicating that Application extracted the batch. In this case the batch is allowed to be transmitted only once.
  3. The business process runs a translation of the batch from EDI to XML. However, a map error occurs during translation and the batch is not translated properly.
  4. The error triggers the start of the Batch Status service.
  5. The Batch Status service passes a message to Sterling Connect:Enterprise for UNIX to remove the transmitted flag from the batch. The STATUS_INFO returned by Sterling Connect:Enterprise for UNIX is placed in process data.

    Here is an example of output from a Batch Status service that was used to update all batches in the bporders mailbox by turning the T flag off. Notice that one batch was returned.

    <STATUS_INFO>

    <QueryParms>

    <CEUMailboxId>bporders</CEUBatchNumber>

    </QueryParms>

    <UpdateParms>

    <CEUProcessFlagUpdate>!T</CEUProcessFlagUpdate>

    </UpdateParms>

    <Batches>

    <Batch>

    <CEUBatchNumber>189</CEUBatchNumer>

    <CEUBatchDateTime>2/21/04 8:24PM</CEUBatchDateTime>

    <CEUBatchSize>123456967</CEUBatchSize>

    <CEUMailboxId>bporders</CEUMailboxId>

    <CEUBatchId>PriDoc.128M</CEUBatchId>

    <CEUProcessFlagStatus>A,R,Z</CEUProcessFlagStatus>

    </Batch>

    </Batches>

    </STATUS_INFO>

  6. Now the batch can be extracted again.

    The following example illustrates the XPath statements in the subsequent Extract service. These statements derive the needed information from the STATUS_INFO content in the process data.

    <!-- Extract batch by xpath to the provided batch number and datetime in ProcessData. -->
    <operation name="CEU Extract Service">
    <participant name="CEUServerExtract"/>
      <output message="ExtractRequest">
        <assign to="CEUBatchNumber"
                from="STATUS_INFO/Batches/Batch/CEUBatchNumber/text()">
        </assign>
        <assign to="CEUBatchDateTime" from="STATUS_INFO/Batches/Batch/CEUBatchDateTime/text()">
        </assign>
        <assign to="." from="*"/>
      </output>
      <input message="inmsg">
        <assign to="." from="*"/>
      </input>
    </operation>