CEUInterop_DemoPOAdd

Using the CEUInterop_DemoPOAdd business process, a batch is added to the bporders mailbox on Sterling Connect:Enterprise®. A predefined schedule in Sterling Connect:Enterprise named samp_bp.acd is configured to look for data in this mailbox based on specific criteria. When an XML file is detected, the notification schedule invokes the CEUInterop_DemoPOAdd business process to add the purchase order batch to the Sterling Connect:Enterprise bporders mailbox. This notification is the result of the schedule defined in Sterling Connect:Enterprise.

The CEUInterop_DemoPOAdd business process simulates the external trading partner using the HTTP option, as shown on the left side in the preceding figure. By using the CEUInterop_DemoPOAdd business process to add an XML file to the bporders mailbox, the following is accomplished:

  • The demo is started by adding a batch to bporders.
  • It serves as an example of how to use the CEU Server Add Service.
  • The CEUInterop_DemoPOAdd business process notifies the registered Server Adapter to invoke the CEUInterop_DemoPOProcess business process.
  • The CEUInterop_DemoPOProcess business process performs the extract and validate on the batch summary data.
  • The schedule notification also passes important batch summary data to the business process.

The following ProcessData is an example of what information is sent to the business process:

<?xml version="1.0" encoding="UTF-8"?>
 <ProcessData>
  <SessionId>3907</SessionId>
  <ACD_INFO>
  <AcdName>brads.acd</AcdName>
  <SessionId>3907</SessionId>
  <AdapterName>kup22800</AdapterName>
  <MailboxList>bporders</MailboxList>
  <BatchIdPattern>*.xml</BatchIdPattern>
  <PutOptions>$$CODE=A MULTXMIT=YES</PutOptions>
 	 	<BusinessProcessParameters format="xml">
 	 	<TP_INFO>
 	 	<Mailboxes>
 	 	<Rejected>bpreject</Rejected
> 	 	<InProcess>bpinproc</InProcess>
 	 	<Invoice>bpinvoic</Invoice>
 	 	<Messages>bpmsg</Messages>
 	 	</Mailboxes
> 	 	<EmailAddress>user_one@ibm.us.com</EmailAddress>
 	 	</TP_INFO>
 	 	</BusinessProcessParameters>
 <Batches>
  	 	<Batch>
  		 	<CEUBatchNumber>5262</CEUBatchNumber>
  		 	<CEUMailbox>bporders</CEUMailbox>
  		 	<CEUBatchId>CarOrder.po</CEUBatchId>
 		 	<CEUBatchSize>208</CEUBatchSize>
  		 	<CEUBatchDateTime>12/17/03 3:38 PM</CEUBatchDateTime>
 	</Batch> <Batch>
  		 	<CEUBatchNumber>5263</CEUBatchNumber>
  		 	<CEUMailbox>bporders</CEUMailbox>
 		 	<CEUBatchId>CarOrder.po</CEUBatchId>
 	 		<CEUBatchSize>208</CEUBatchSize>
  	 		<CEUBatchDateTime>12/17/03 3:40 PM</CEUBatchDateTime>
  	</Batch>
  </Batches>
  </ACD_INFO>
 </ProcessData>

The information within the Batches tag shows the batch summary data for two batches with an .xml file name extension found in the bporders mailbox. This information is batch summary data only and does not include the business document payload at this point of the business process.

The CEUServerAdapterInstanceName and SessionId indicate which Server Adapter instance and session invoked the business process. Because you can have multiple instances of the Server Adapter, each CEU Service used in the business process must know which Server Adapter instance to communicate with.

The Business Process Parameters tag in the preceding example includes mailbox information, and additional user-defined XML content such as an email address and other information that is pertinent to the business process. The parameters were entered in Sterling Connect:Enterprise as optional business process parameters when the schedule was defined. This information is available in ProcessData and is accessed using Xpath by the BPML writer.

The CEUBatchNumber and CEUBatchDateTime are used when a batch is extracted.