Print Page

Tuesday, February 3, 2009

Advanced EDI Batching in Oracle B2B

Batching is a way of grouping the transaction set of a specific type, or destination

a. Batching a specific message type of a Trading partner
b. Batching multiple messages of a specific trading partner.
c. Batching multiple messages of more than one trading partner.

Oracle B2B offers a time bound Batching feature which addressed most of the complex use cases. However to handle following cases such as

a. Count based batching
b. Batching based on Order Number or invoice number
c. Complex criterion based on the payload.
d. Criterion which is defined in Back end application.

it is required to define the criterion in the back end application and set the following in the ACTION attribute of the message in B2B.

ACTION_NAME = BatchMode:BatchID:Count:TimeOut

where BatchMode = I or D (I for immediate and D for delayed)

BatchID is a unique identifier for this group of batching
Count is the number of messages needed before batching
TimeOut is in minutes.

By default : is assumed to be the seperator.

This batch feature also allows timeouts. If the number of messages is not reached and the timeout arrives first, then the messages are sent. Also, customer can also batch and send the existing messages using BatchMode = I


1. I refers to Immediate batching, does it mean it is with a batch size of 1?

No, it means that B2B sends whatever that is currently pending but it has not reached the count or timeout value.

2. Can we first send count and timeout and eventually send the same id with I. This should override both timeout and count and batch the existing messages?

Yes, it overides both the timout and count.

3. Is There a need to configure the batchID as a pre configured configuration?

No, there should not be any extra configuration needed. The batch id is stored in CRITERIA2 in pending message table. Therefore, we can perform counts or timeout based on this value.

4. How it works?

First message defines the batching criterion and the subsequent messages update the same. The execution of batching follows this order

a. Immediate
b. timeout
c. count

For a deferred mode it batches all the messages of the same batchID till either the timeout occur or achieves the batch size equivalent to count. It is also possible to terminate the batching by sending a message with Immediate mode.

5. What happens after the time out?

After the time out, if there is (count-batchsize) message arrives, it is considered as a different batch.


AntB said...

I have a question. Do we have to do any thing in the database to make this configuration work. I tried it with out any entry in b2b_batch_event table, which didn't work. but when i put an entry for time batching the configuration worked. My configuration was "D:1200:3:3".

Dheeraj Kumar M said...

To enable batching, it is required to add make an entry to b2b_batch_event table.

In the case of advanced options, it is also possible to process the message by specifying the batch mode as I (immediate) or D (delayed by timeout / count of msgs)