Documente Academic
Documente Profesional
Documente Cultură
How to Recover Initial Messages (Payload) from SOA Audit for Mediator and BPEL components
Fusion Middleware
Fusion Applications
About
Log in
Leave a Comment
Introduction
In Fusion Applications, the status of SOA composite instances are either running, completed, faulted or staled. The
instances become staled immediately (irrespective of current status) when the respective composite is redeployed
same version. The messages (payload) are stored in SOA audit tables until they are purged. The users can go thr
Enterprise Manager and view audit trails and respective messages of each composite. This is good for debugging
instances. However there are situations where you want to re-submit initiation of SOA composite instances in bulk f
following reasons:
The composite was redeployed with the same version number that resulted in all respective instances (complete
successfully, faulted or in-flight) becoming stale (Staled status)
Instances failed because down-stream applications failed and the respective composite did not have an ability to
initial message in persistence storage to retry later
In these cases, it may be necessary to capture the initial message (payload) of many instances in bulk to resubmit
can be managed programmatically through SOA Facade API. The Facade API is part of Oracle SOA Suites Infrastr
Management Java API that exposes operations and attributes of composites, components, services, references an
long as instances are not purged, the developer can leverage SOA Facade API to retrieve initial messages of eithe
or BPEL components programmatically. The captured messages can be either resubmitted immediately or stored in
persistence storage, such as file, jms or database, for later submission. There are several samples, but this post ta
approach of creating a SOA composite that provides the ability to retrieve initial message of Mediator or BPEL com
The sample provides the frame work and you can tailor it to your requirements.
Main Article
SOA Facade API
Please refer to this for complete SOA Facade API documentation. The SOA audit trails and messages work interna
follows:
http://www.ateam-oracle.com/how-to-recover-initial-messages-payload-from-soa-audit-for-mediator-and-bpel-components/
1/6
7/6/2015
How to Recover Initial Messages (Payload) from SOA Audit for Mediator and BPEL components
The Audit Level should be either Production or Development to capture the initial payload
The Audit Trail Threshold determines the location of the initial payload. If the threshold is exceeded, the View X
shown in the audit trail instead of the payload. The default value is 50,000 bytes. These large payloads are store
separate database table: audit_details.
Please refer to the following document for more details on these properties.
Since the SOA composite we are developing will be deployed in the same respective SOA Server, you do not requi
credentials to create the locator object. This is all you need:
Once the Locator object is created, you can lookup composites and apply various filters to narrow down the search
respective components. This is all explained in detail with examples in the SOA Facade document. Here, we focus o
retrieve the initial messages of the Mediator and BPEL components to resubmit them.
In BPEL, the initial payload is either embedded in the audit trail or has a link to it. This is controlled by the audit trai
value. If the payload size exceeds the audit threshold value then the audit trail has a link. This is the main method t
trail:
If the payload size exceeds the audit threshold value, then the actual payload is an XML link that is stored in the au
table. The following is the API facade to get it:
The initial payload in Mediator is never embedded in the Audit Trail. It is always linked and the syntax is similar to B
payload size exceeds the audit threshold value). However, the auditID is in the Mediator audit trail and it must be
get that value for the initial payload. This is the code snippet to get the auditId from Mediator audit trail:
http://www.ateam-oracle.com/how-to-recover-initial-messages-payload-from-soa-audit-for-mediator-and-bpel-components/
2/6
7/6/2015
1
2
3
4
5
6
7
8
9
10
11
How to Recover Initial Messages (Payload) from SOA Audit for Mediator and BPEL components
if (componentType.equals("mediator")) {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document document = db.parse(new InputSource(new StringReader(auditTrailXml)));
NodeList nodeList = document.getElementsByTagName("event");
String attribute = nodeList.item(0).getAttributes().getNamedItem("auditId").getNodeValue();
addAuditTrailEntry("The Audit is: " + attribute);
auditId = attribute;auditMethod="getAuditMessage";}
/* Once you have the "auditID" from above code, the syntax to get the initial payload is the same
auditDetailXml = (String)locator.executeComponentInstanceMethod(componentType +":"+ componentId,
try {
String componentInstanceID = new Long(getInstanceId()).toString();
addAuditTrailEntry("This Run time Component Instance ID is "+componentInstanceID);
http://www.ateam-oracle.com/how-to-recover-initial-messages-payload-from-soa-audit-for-mediator-and-bpel-components/
3/6
7/6/2015
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
How to Recover Initial Messages (Payload) from SOA Audit for Mediator and BPEL components
if (componentType.equals("mediator")) {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document document = db.parse(new InputSource(new StringReader(auditTrailXml)));
NodeList nodeList = document.getElementsByTagName("event");
String attribute = nodeList.item(0).getAttributes().getNamedItem("auditId").getNodeVa
addAuditTrailEntry("The Audit is: " + attribute);
auditId = attribute;
auditMethod="getAuditMessage";
}
addAuditTrailEntry("Received Audit Trail");
addAuditTrailEntry("Get Audit Details of: "+ componentType +":"+ componentId + "for audit
try {
auditDetailXml = (String)locator.executeComponentInstanceMethod(componentType +
} catch (Exception e) {
addAuditTrailEntry("Exception in getting audit details:" + e);
}
addAuditTrailEntry("Received Audit Details");
} catch (Exception e) {
addAuditTrailEntry("Exception in getting Audit Trails and Details");
}
The sample payload to run above composite is:
<element name="process">
<complexType>
<sequence>
<element name="compositeName" type="string"/>
<element name="compositeId" type="string"/>
<element name="componentType" type="string"/>
<element name="componentName" type="string"/>
<element name="componentId" type="string"/>
</sequence>
</complexType>
</element>
Sample Code
Please get the complete Jdeveloper Project as follows:
1. DummySOAApplication to retrieve initial payload of Mediator and BPEL components
2. The SOA Audit Trail Composite SOAAuditTrails that contains the logic to get initial payload of Dummy Compo
http://www.ateam-oracle.com/how-to-recover-initial-messages-payload-from-soa-audit-for-mediator-and-bpel-components/
4/6
7/6/2015
How to Recover Initial Messages (Payload) from SOA Audit for Mediator and BPEL components
All site content is the property of Oracle Corp. Redistribution not allowed without written permission
Like
Tw eet
filed under: architecture , bpel, diagnose and troubleshoot, extend and customize , lifecycle management
tagged with: api, audit trail, bpel, component, component instance , composite , composite instances, compo
fusion , fusion applications, instance , payload , soa, soa composite , soa composites, soa suite , stale
Search
Share
0
Categories
Architecture (21)
http://www.ateam-oracle.com/how-to-recover-initial-messages-payload-from-soa-audit-for-mediator-and-bpel-components/
5/6
7/6/2015
How to Recover Initial Messages (Payload) from SOA Audit for Mediator and BPEL components
Recent Posts
Invoke Fusion Cloud Secured RESTFul
Web Services
Oracle VM Storage Repository
Replication for On-Premise Fusion
Applications Disaster Recovery
Node.js Invoking Secured REST
Services in Fusion Cloud Part 1
Fusion HCM Cloud Bulk Integration
Automation
Harvesting Information from IT Systems
Part 1
Important log files and their location in
Fusion Applications
Fusion Applications WebCenter Content
Integration Automating File
Import/Export
Archives
Select Month
Social
Copyright Information
Arch Beat
Privacy at Oracle
OTN Group
Terms of use
FMW Group
All content and s/w code on this site are offered without any warranty, or promise of operational quality or functionality.
http://www.ateam-oracle.com/how-to-recover-initial-messages-payload-from-soa-audit-for-mediator-and-bpel-components/
6/6