Tuesday, August 14, 2012

BPM 11g - aggregating orders example

Scenario: Customer places an order, it is processed within 2 hours.
If in the meantime the customer orders more goods these will be added to the original order.

So I considered the following approach -

2 processes - OrderEntry and OrderShipping.

In this post I look at the OrderEntry process

I decided to use a simple DB table TEMP_ORDERS to flag orders in process. So the first step in my OrderEntry process is to check if there is already an open order for this customer.

I use the DB adapter (OrderListSelect) here.

Now the first challenge is how to process the output from the DB adapter.
The first time we call this for, let us say, Order123, the order does not exist.

So the DataOutput mapping I chose was -

I created a process Data Object v_orderExists (type boolean)

The From above:

v_orderExists is then used in the Exclusive Gateway condition.

More soon...

No comments: