I have chosen Business Events as first feature to explore in recent release of SOA Suite12c. Also, I want to cross verify my earlier observations in 11g.
The initial observation is, now the new SOA project will have the folders for different artifacts and the folder Events is for edl files.

Secondly, 12c supports One and Only one and Guaranteed consistency only and no longer supports immediate. Also new property Durable is added to event subscriptions.

Even migration of 11g composites to 12c is resulting into error, if composite uses immediate consistency level. We have to manually make this change by choosing either of the 2 supported consistency levels.

But in EM Console, we are still able to see immediate consistency level in the search region. You can navigate to this UI by selecting soa-infra –> Business Events.

Thirdly, in 11g EDN uses DB AQ 11g by default for publish and subscribe model of business events. This can be confirmed by verifying value of MBean property EdnJmsMode. False value denotes EDN using DB and True value denotes EDN using Weblogic JMS. You can verify by navigating to oracle.as.soainfra. config –> SoaInfraConfig –> soa-infra in Application Defined MBeans.

But in 12c, EDN uses Weblogic JMS by default. This can be confirmed by verifying value of MBean property JmsType . WLJMS value denotes EDN using Weblogic JMS and AQJMS value denotes EDN using AQ DB . You can verify by navigating to oracle.as.soainfra.config –> EDNConfig –> edn in Application Defined MBeans.

Another quick observation is, in 12c there is no Faults tab shown in Business Events page. You can select soa-infra –> Business Events to bring up this page. In 12c, we can do manual Retry and Abort of Business Events in Flow Instances screen itself which we will observe later in this post.

Now let us start exploring functionality of Business Events from perspective of consistency levels like we did it earlier. As per 12c documentation, one of the major differences is auto retry is supported by Guaranteed consistency level too.
Use case:
We use mediator to raise 2 business events CreateOrder and UpdateOrder. We have following subscribers for CreateOrder event:
- Mediator routing request to Async BPEL (EDNSubscribeToBPEL process in composite EDNSubscribe).
- Mediator routing request to Sync BPEL (EDN2BPEL process in composite EDNSubscribe2 ).
- Asynchronous BPEL process (SubscribeToEventBPELProcess process in composite EDNConsistencyCheck).
And we have following subscribers for UpdateOrder event:
- A mediator routing the request to ASync BPEL (in different composite)
Test EDNConsistencyCheck from EM console to raise these business events. The sample composites are available here.
Earlier to simulate Fault condition, we used <onReply/> tag in mediator while routing to Asynchronous BPEL as shown below.
<switch>
<case executionType=”direct”
name=”Order2BPELProcess1.order2bpelprocess1_client.process”>
<action>
<transform>
<part name=”$out.payload”
function=”xslt(xsl/CreateOrder_To_process.xsl, $in.payload)”/>
</transform>
<invoke reference=”Order2BPELProcess1.order2bpelprocess1_client”
operation=”process”>
<onReply/>
</invoke>
</action>
</case>
</switch>
The behavior is quite different in 12c when same approach has been used to simulate Fault condition. This is resulting into non-recoverable fault in all the times. Though the same behavior is expected in 11g, in actual this fault was considered as recoverable and also auto-retry is made. So here we will simulate Fault condition by throwing Remote Fault manually.

Configuration:
Navigate to soa-infra-> Administration –> System MBean Browser -> Application Defined MBeans -> oracle.as.soainfra.config -> EDN Config –> edn in EM Console. Here, we can set EDN configuration including properties NumberOfRetrys and QueueWaitTime.
Though 11g has QueueWaitTime property, it was not considered as the retry interval. But in 12c, this property is being honored and we will observe the same later in this post.

Demonstration:
Verify Events and Subscriptions in Business Events. You can observe that there are 2 business events and 4 subscriptions The subscriptions page also shows you consistency level for each subscription.


Consistency Level – Guaranteed:
Make sure that all event subscriptions consistency level is set to Guaranteed and raise CreateOrder business event.
We can observe a lot of visual improvements in this Flow Trace screen. The composite instances are clearly marked as ‘Recovery Required’ and ‘Auto-retrying’ as applicable. As expected, the Asynchronous BPELs went into Auto Recovery and Event auto retry is happening for Synchronous BPEL process. Also note that all subscribers have received the business event raised though some faulted subscribers exist.

By clicking on the ‘Recovery Required’ link in Faults tab, we can observe that BPEL fault is pending for Invoke message recovery as shown below.

You can also observe that Synchronous BPEL is marked as Recovery Required after retry is done for configurable number of times. Also the property value of QueueWaitTime is honored as the event Retry Interval.

The Faults tab is shown as below along with number of retry attempts.

By clicking on the ‘Recovery Required’ link in Faults tab for this flow instance, we can observe that fault is pending for EDN recovery as shown below. From this popup, we can again do Retry manually or abort the flow using Retry and Abort buttons respectively.

Selecting a fault from Faults tab will highlight the corresponding flow instances along with retry attempts (if any).

We can also do manual Retry or Abort from Flow Instances page. Selecting a Flow ID row will enable Abort Selected icon as shown below (if applicable).

And same Faults tab shown earlier is also available in Flow Instances page as shown below.

Now set bpel.config.oneWayDeliveryPolicy to sync for all the Asynchronous BPELs. Raise CreateOrder event and observe that all the instances are auto-retrying as the BPELs would be invoked in Synchronous manner.

Now set bpel.config.oneWayDeliveryPolicy to async.cache for all the Asynchronous BPELs. Raise CreateOrder event and observe that auto-retrying is only happening for Synchronous BPEL.

Now reset bpel.config.oneWayDeliveryPolicy to async.persist and bpel. config.transaction to requiresNew for Asynchronous and Synchronous BPEL respectively. Raise CreateOrder event and observe auto-retry is happening for Synchronous BPEL only.
Now set bpel.config.transaction to notSupported for the Synchronous BPEL. Raise CreateOrder event and again observe auto-retry is happening only for Synchronous BPEL.
Consistency Level – One and Only One:
When above scenarios are tried using One and Only One consistency level, I observed the same behavior as Guaranteed. As per 12c documentation, the difference lies in type of transaction used (Local vs Global). Guaranteed uses Local where as One and Only one uses Global Transaction for De-queue and Delivery of Business Events.
Summary:
- When Mediator routes request to Sync BPEL that throws fault and not caught, then event auto retry is happening irrespective of consistency level and value of bpel.config.transaction.
- When Mediator routes request to ASync BPEL that throws fault and not caught, then event auto retry is not happening irrespective of consistency level with async.persist as value for bpel.config. oneWayDeliveryPolicy. This makes sense as the transaction can’t be propagated and value of bpel.config.transaction is irrelevant.
- When Mediator routes request to ASync BPEL that throws fault and not caught, then event auto retry is happening irrespective of consistency level with sync as value for bpel.config.oneWayDeliveryPolicy. This makes sense as BPEL is invoked in Synchronous manner. Also the same behavior is observed, when an Async BPEL is directly subscribed to business event.
- When Mediator routes request to ASync BPEL that throws fault and not caught, then event auto retry is not happening irrespective of consistency level with async.cache as value for bpel.config. oneWayDeliveryPolicy.
We will explore the Durable property of Event Subscriptions in next blog.
Like this:
Like Loading...