|Oracle® Fusion Middleware User's Guide for Oracle B2B
11g Release 1 (18.104.22.168)
Part Number E10229-13
|PDF · Mobi · ePub|
This chapter describes how to use the Oracle B2B interface to batch, schedule, and send outbound EDI X12 and EDI EDIFACT messages for outbound messages (Inbound messages to Oracle B2B are automatically debatched.)
The chapter contains the following topics:
See the following for more information about EDI:
Batching is often used to group messages by document type; for example, you may want to send out a batch of purchase orders or a batch of invoices, to one or more trading partners. You can also batch multiple document types, sent to one or more trading partners.
When batching more than 1000 documents, where the payload size is greater than 30 KB, specific settings are required. See "Settings for Batching a Large Number of Documents" in Oracle Fusion Middleware Performance Guide.
Figure 11-1 shows where you set up a batch transmission of EDI messages.
Figure 11-1 Scheduling a Batch
To set up a batch, do the following:
Click the Administration link.
Click the Schedule Batch tab under the Batch tab.
Use the search parameters described in Table 11-1 to identify which agreements you want to batch.
Use the document search parameters as follows: Select a document protocol name first to populate the list of document protocol versions; next select a document protocol version to populate the list of document types; and then select a document type to populate the list of document definitions.
Table 11-1 Search Parameters for Creating a Batch
Match All or Any
If you select All, then fields with values are matched using an and condition. If you select Any, then fields with values are matched using an or condition.
Select Starts With, Contains, Equals, or Ends With, and type the appropriate portion of the name of the responding trading partner.
Select Starts With, Contains, Equals, or Ends With, and type the appropriate portion of the name of the agreement.
Document Protocol Name
Select EDI_EDIFACT or EDI_X12.
Document Protocol Version
Select a document protocol version that you previously created.
Select a document type that you previously created.
Select a document definition that you previously created.
Active, deployed agreements (outbound) that meet your search criteria are displayed.
Go to Task 2, "Create the Batch".
Enter a unique name for the batch.
Select the agreements you want to batch.
Click Create Batch.
Go to Task 3, "Schedule the Batch".
Click Launch Scheduler.
Select the Non-Repeating Event tab or the Repeating Event tab.
For a nonrepeating event, do one of the following:
Enter the date in the format shown in the Scheduler dialog and click OK.
Or, click the Calendar button, specify a date and time, and click OK.
For a repeating event (see Figure 11-2), enter details on the interval to trigger the event by specifying the minutes, hour, month, year, and date details. Then click OK.
Figure 11-2 Scheduling the Batch
You can see the batches you create on the Manage Batch tab.
If any one of the documents in a batch has the validation flag set to "on", the whole batch is validated.
This feature allows you to batch outbound EDI messages based on "Allowed Number Of Transactions" (Max Count) in batched messages or the "Allowed Size" (Max Size) of batched messages.
To batch messages based on Max Count and Max Size, do the following:
Create the batch:
Enter a unique name for the batch in the Batch Name field.
Select the agreements you want to batch based on "Search for Agreements to Batch".
In the case of creating Batch based on "Number Of Transactions" or "Maximum Size", Schedule Range is optional. However, you can click Launch Scheduler to schedule an event (Non-Repeating or Repeating) as specified in Task 3, "Schedule the Batch".
Enter a value for the size of outbound payload in KBs in the Max Size (KB) field if you want batching to occur based on size of the outbound EDI messages.
Enter a value in the Max Count field if you want batching to occur based on the number of transaction of outbound EDI messages.
Click Create Batch.
The following are the different cases of batching based on batch setup:
Case 1: When creating the batch, only Max Count is specified: Batching occurs in based on the specified number of transactions.
For example, if you specify Max Count as
4, when you enqueue four outbound EDI messages, a batched message is created having four transactions. In case you enqueue less than four messages, the messages will not get batched.
Case 2: When creating the batch, only Max Size (KB) is specified: Batching occurs based on the size of the messages to be batched including the size of last message.
For example, if you specify Max Size as 4 KB, when you enqueue four outbound EDI messages of 1 KB each, a batched message of 4KB size is created. In case you enqueue messages such that the size criteria is not met, then messages will not get batched.
Case 3: When creating the batch, both Max Count and Max Size are specified: Batching occurs based on whichever criteria is met first.
Case 4: When creating the batch, you also schedule an event for the batch (using Launch Scheduler) along with Max Count and Max Size, messages are batched in the sequence of Case1, Case 2, and Case 3. However when the Timer Event occurs, it batches all the messages available for batching at that point in time (irrespective of the values provided for Max Count and Max Size.)
Batching messages based on Max Count and Max Size works following the assumptions:
Enqueued Outbound EDI Payload (XML) has only one transaction.
The size of enqueued Outbound EDI Payload (XML) is considered for the batching criteria.
Figure 11-3 shows where you can search for batches that you previously created, view details of a batch, and disable, update, or delete a batch.
Figure 11-3 Managing Batched EDI Messages
For the Update batch action, only the documents definitions selected can be updated. Ensure that you reselect all the documents that are to be part of the batch and not just the new ones.
In some cases, B2B may not pick up the batched messages when you update the batching schedule. If you see that batched messages are not being picked up, delete the batch and create a new batch schedule with the same name as the previous batch. The same name must be used so that B2B picks up the previous messages in
Oracle B2B provides support for sequencing of inbound batched messages.
When Oracle B2B receives a batched message:
Oracle B2B makes only one entry in the Sequence Manager table, and the state of the message in the Sequence Manager table is set to
While de-batching, the messages are inserted into the Business Message table as well as the
B2B_PENDING_MESSAGE table with the Sequence Number of the messages stored in an attribute column (
Attribute4) of the
after the last message of a batch is processed by Oracle B2B, it changes the state of the Sequenced Message to
PROCESSED, and indicates the message as a batch message by marking the messageID as
After dispatching a message from a batch, Oracle B2B changes the state of the Business Message to
MSG_COMPLETE and deletes the corresponding entry in the
B2B_PENDING_MESSAGE table. If the Oracle B2B stops working in the middle of batch processing, on recovery, Oracle B2B sends only the messages that are present in the
The limitation of this approach is that the batch delivery does not resume until the complete batch is processed by Oracle B2B.
Batching with sequencing is supported at the inbound side only.