Custom Message Data Encryption of Payload in SOA 11g

Introduction This article explains how to encrypt sensitive data (such as ssn, credit card number, etc ) in the incoming payload and decrypt the data back to clear text (or original form) in the outgoing message. The purpose is to hide the sensitive data in the payload, in the audit trail, console and logs. Main […]

How to Recover Initial Messages (Payload) from SOA Audit for Mediator and BPEL components

Introduction In Fusion Applications, the status of SOA composite instances are either running, completed, faulted or staled. The composite instances become staled immediately (irrespective of current status) when the respective composite is redeployed with the same version. The messages (payload) are stored in SOA audit tables until they are purged. The users can go through Enterprise […]

How to emulate 10g Adapter start/stop behaviour by manipulating the InboundThreadCount parameter

Introduction In 10g, there was a mechanism for suppressing consumption of messages at the Adapter level. That mechanism can not be used in 11g. But there is a way… Main Article The way to do this is to set the InboundThreadCount in the appropriate MBean to zero. This will effectively suppress consumption of messages – […]

Mediator Instance Tracking


Mediator supports three modes for instance tracking by changing the audit level in EM->SOA->SOA-INFRA->SOA Administration->Mediator Properties:


  1. Off – No instance tracking for successfully completed instance, however, instances and faulted instances are created even in this mode.  Audit trail will not be created with this flag.
  2. Production – Instance tracking is enabled for all.  All audit details are logged, except the details of assign activities, but the instances and payloads are not captured.
  3. Development – Instance tracking is enabled for all.  All audit details are logged, and the instances and payloads are also captured.


The following tables are used by Mediator to store the instance and audit trail data:


  1. MEDIATOR_INSTANCE – This table contains one row for each mediator instance. Each instance has a unique id. It stores ecid, composite instance id and parent component id from normalized message and overall state of an instance in the component_state column.  The component state depends on the combination of the mediator case instance states, the states are listed here.
  2. MEDIATOR_CASE_INSTANCE – This table contains one row for each mediator routing rule and fault information for a routing rule is also stored.  Each case instance has one unique id.  It stores mediator instance id and case name, related fault information and information pertaining to retries.  This is the base table for executing automatic retries using fault policies.
  3. MEDIATOR_CASE_DETAIL – This table contains multiple rows for each routing rule and stores mediator audit trail xml as a blob for each routing rule. Each case detail rows are bound together by case id.  It stores case detail state, audit trail for each case detail.  The state of the latest case detail is the current state of the case.
  4. MEDIATOR_AUDIT_DOCUMENT- This table stores payload at each stage of mediator message flow and payloads are stored only when instance tracking audit level is set to “Development”. Each row in this table stores the payload at a point in the message flow. e,g, transformed payload, payload being sent to the target service.

Below is a screenshot of a basic mediator project with 2 routing rules which polls an xml file from an input folder, transforms the content and writes the xml file to a folder. 

When the mediator receives a massage, it creates a mediator instance, and then depending on the number of routing rule, one or more case instance will be created in the MEDIATOR CASE INSTANCE table. The engine will then initializes the audit trail xml and stores it as an XML document. After each processing point (e.g. transformation, filter evaluation etc), it stores the trail messages to audit trail xml and persists to audit trail table (MEDIATOR_CASE_DETAIL.AUDIT_TRAIL  and/or MEDIATOR_AUDIT_DOCUMENT), then the mediator instance state will be updated.

1. When the mediator instance kicks off, a composite instance will be created in the COMPOSITE_INSTANCE table, and unique ECID will be assigned to the instance.


select * from composite_instance where ecid=’1b7e5955c26b51de:-56440391:13d41f410c6:-8000-000000000000144b’

2. Using ECID, you can retrieve the mediator instance data and the component state from the mediator instance table.  From this point onward, MEDIATOR_INSTANCE.ID will be used to retrieve the mediator case data.

select * from mediator_instance where ecid=’1b7e5955c26b51de:-56440391:13d41f410c6:-8000-000000000000144b’

 3. Depending on the number of routing rules, the mediator will store each routing rule separately in the MEDIATOR_CASE_INSTANCE table and the MEDIATOR_CASE_INSTANCE .ID will be used to retrieve the case detail for each routing rule.  In the above example, there are 2 routing rules.

select * from mediator_case_instance where instance_id = ‘C64B82E086BB11E2BFBE1B53FB1929E1’;

4. The audit trail of each routing rule is stored in the MEDIATOR_CASE_DETAIL table in compressed format.

select * from mediator_case_detail where instance_id = ‘C64B82E086BB11E2BFBE1B53FB1929E1’;


Below are the xml data that are stored in the MEDIATOR_CASE_DETAIL.AUDIT_TRAIL column.  In the example below, two routing rules were being executed. The first event routing rule’s result was equal to “false”, then the second routing rule was executed. The second event routing rule’s result was successful, subsequently the message was transformed and published to the destination. If you have the audit trail level set to “Development”, you can use the audit id in the case trail to retrieve the payload from the MEDIATOR_AUDIT_DOCUMENT table for further investigation.



  <event type=”inputPayloadReceived” status=”Completed”

         parentId=”C64B82E086BB11E2BFBE1B53FB1929E1″ date=”1362615182063″





CASE_ID= C66EE96086BB11E2BFBE1B53FB1929E1


  <event type=”case” id=”C66EE96086BB11E2BFBE1B53FB1929E1

         parentId=”C64B82E086BB11E2BFBE1B53FB1929E1″ caseName=”USCustomer.Write”

         date=”1362615182073″ auditId=”C64BA9F086BB11E2BFBE1B53FB1929E1″>



  <event type=”condition” status=”Completed”

         parentId=”C66EE96086BB11E2BFBE1B53FB1929E1″ date=”1362615182074″






CASE _ID= C670700086BB11E2BFBE1B53FB1929E1


  <event type=”case” id=”C670700086BB11E2BFBE1B53FB1929E1


         caseName=”CanadaCustomer.Write” date=”1362615182083″




  <event type=”condition” status=”Completed”

         parentId=”C670700086BB11E2BFBE1B53FB1929E1″ date=”1362615182083″




  <event type=”transform” status=”Completed”

         parentId=”C670700086BB11E2BFBE1B53FB1929E1″ date=”1362615182102″




  <event type=”publish” status=”Completed”

         parentId=”C670700086BB11E2BFBE1B53FB1929E1″ date=”1362615182124″

         auditId=”C67292E086BB11E2BFBE1B53FB1929E1″ parentRefId=”mediator:C64B82E086BB11E2BFBE1B53FB1929E1:C670700086BB11E2BFBE1B53FB1929E1:oneway”>





Deploying to WebLogic Server on Amazon EC2 from JDeveloper

Sometimes, when running WebLogic Server on the Amazon Elastic Compute Cloud, you may find that you are unable to deploy from your local JDeveloper to your WebLogic Server instance. Andrew Rosson has written a helpful post (here) that provides a simple … Continue reading