Wikipedia's BPEL Definition:
WS-BPEL (or BPEL for short) is a language for specifying business process behavior based on Web Services. Processes in WS-BPEL export and import functionality by using Web Service interfaces exclusively.

Oracle BPEL



In the 10g release the BPEL product is part of the SOA suite which includes other components like ESB, OWSM, OSR etc.


Some of the useful things that you can use the BPEL Java API to do are:

  • Fetching the Instance Handle from an instance id
WhereCondition wc = new WhereCondition( "cikey = ?" );
    wc.setLong(1, Long.parseLong(instanceId)); 
    IInstanceHandle [] instances = this.getLocator().listInstances(wc);
  • Fetch Payload

BPEL payloads are generally stored in the xml_document table in the orabpel schema. Since these are stored as blobs, the easiest mechanism to fetch them is using the following API:


I have not been able to find a mechanism to retrieve the docKey used in the call above from the BPEL API alone. This document key can however be obtained from the underlying tables in the orabpel schema as explained in the next section.

BPEL Instance Payload

I have so far found a couple of ways to get the initiating payload of a BPEL instance:

  • Approach 1: Extract from Audit Trail using DOM API:
// Extract the Audit trail string
       String auditTrail = instanceHandle.getAuditTrail();
    // Create DOM from above string
    // Look for the first "details" element
    NodeList nl = xmlDoc.getDocumentElement().getElementsByTagName("details"); 

    // if details node has an attribute called "id" then the audit trail contains the a pointer to the payload
    payload = instanceHandle.getAuditDetails(<Value of details id attribute>);
    // if no id attribute then payload is part of audit trail itself and is embedded within the details tag
  • Fetch document key and use API to get payload
Join document_dlv_msg_ref ,invoke_message , cube_instance tables in orabpel schema to get the document key. 
    Use the API above to fetch the payload using the document key.

BPEL messages in Delivery Queue

  • If messages are stuck in the delivery queue then you might need to view the payload of messages before recovering them from the "Perform Manual Recovery" page in the BPEL console. In this case, the messages are stored in the invoke_message table of the orabpel schema. Remember, no instances have been created for the messages with state = 0 (Unresolved). This table stores the conversationId and a message guid per message. The message guid can be used to fetch the document key.
select dockey from document_dlv_msg_ref  where message_guid =<guid>

This of course can then be used to extract the payload associated with this message.


Add a New Comment
or Sign in as Wikidot user
(will not be published)
- +
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License