Sunday, December 16, 2012

Correlation Set Terms

The following terms apply to correlation:
  • Property — A property is an arbitrarily named token. It must be a simple type. It is defined in a WSDL file.
  • Property alias — A property alias is a rule that tells the BPEL runtime how to map data from a message into a property value. You can define several property aliases for a property that will be used as a correlation value. You would do this if the same property value needs to be mapped from more than one message, which is typical in correlation. For instance, if two different messages have the same part that you want to extract. Then you need one property and two property aliases - one for each message). Property aliases are defined in a WSDL file.
  • Correlation set — A correlation set is a compound key made up of one or more property values, actually it is a property set. The BPEL runtime uses this key to ensure that messages are routed to the right process instance for a particular conversation. A correlation set is defined in a BPEL file.
  • Correlations — Correlations mark the activities, identify the correlation sets by name and indicate which correlation sets occur in the messages being sent or received.
  • Pattern attribute to indicate whether the correlation applies to the outbound message (request), inbound message (response), or both (request-response).


Tuesday, November 20, 2012

Sending HTML Email With Embedded XML Content

Today I am checking out on how to send an html formatted email from a bpel process. Sharing my findings on this topic here -

This use case has 2 bpel processes -

  1. A reusable email process (hereafter REP) that sends the email using "Email" activity.
  2. A bpel process to prepare html of email and invoke the reusable email service.

I prepared an email format that will have few tables and xml message inside the table. For this I have used XSLT to build html from the bpel xml messages and assigned that html to email body of notification service. But this is not that straightforward as the email received was not properly formatted. The xml tags were all disappeared and only data values separated were shown.

Its because the bpel engine treated those xml tags as bpel variables. To avoid this first prepare the html and assign it to the input of REP.


Now inside the REP expand the email activity, open the assign and use toCDATA xsl function to populate ContentBody variable of email activity as shown in this image.


Now the email was well formatted and xml content rendered perfectly!!.

Saturday, November 10, 2012

XML with Name-Value Pair

To retrieve the value from name-value pair xml as presented below -


<Parameters>
  <Item>
    <Name>Guid</Name>
    <Value>20101130121706</Value>
  </Item>
  <Item>
    <Name>Timestamp</Name>
    <Value>20101130121604</Value>
  </Item>
  <Item>
    <Name>TimeofArrival</Name>
    <Value>20101130161705</Value>
  </Item>
  <Item>
    <Name>Part</Name>
    <Value>20101130161236</Value>
  </Item>
  <Item>
    <Name>SiteID</Name>
    <Value>1520537</Value>
  </Item>
</Parameters>

Use the xpath - /Parameters/Item[Name='Guid']/Value

Sunday, October 14, 2012

Using Gmail To Send Notification

I found this article very useful about how to configure soa UMS driver to use your gmail account to send emails.

http://www.rubiconred.com/blog/email-notification-with-soa-suite-11g/

Make sure you have openssl installed if you have windows machine. The command to fetch the server certificate is -

openssl s_client -connect host:port

I have used the default truststore of SOA 11g which is DemoTrust.jks. The password for this trust store is - DemoTrustKeyStorePassPhrase

Friday, October 12, 2012

BPEL 2.0 Assign Feature

BPEL 2.0 comes with really nice assign features. The detail text available at this Oracle link -

http://docs.oracle.com/cd/E17904_01/integration.1111/e10224/bp_appx_ref.htm#CIAEAEEB

Excerpt of the page is here -



  • In the From and To XPath fields, you can also place your cursor over the icon to the left of the source type to display the operation being performed (for example, copy, append, and so on). Each operation type is represented by a different icon. You can also right-click a copy rule to display a list of actions to perform:
  • Edit 'From' Expression or Edit 'To' Expression: Select this option to edit XPath expression values when the created copy rule contains a query for the source or target node. This selection invokes the Expression Builder dialog. The menu option that displays is based on the current content of your copy rule selection.
  • ignoreMissingFromData: Select this option to toggle the ignoreMissingFromData attribute on the copy rule on and off. When toggled on, this suppresses anybpel:selectionFailure standard faults.
  • insertMissingToData: Select this option to toggle the insertMissingToData attribute on the copy rule on and off.
  • keepSrcElementName (in BPEL 2.0 projects only): Select this option to toggle the keepSrcElementName attribute on the copy rule on and off. This option enables you to replace the element name of the destination (as selected by the to-spec) with the element name of the source.
  • Change Rule Type (in BPEL 2.0 projects only): Select this option to change the type of the selected rule to one of the BPEL extension rules: bpelx:copyList,bpelx:insertAfter, bpelx:insertBefore, or bpelx:append.
  • Delete rule: Select this option to delete the selected rule.

Sunday, September 23, 2012

Encapsulation, Inheritance, Polymorphism In XML Schema

I found this fantastic article on this topic. The url is here -

http://www.ibm.com/developerworks/library/x-flexschema/

BPEL does not support elements defined as xsi:type="someAbstractElement" where someAbstractElement is defined as -

<xsd:complexType name="someAbstractElement" abstract="true">

This type of xml elements also cannot be validated using validate activity of BPEL. The workaround for this is mentioned in this forum post -

https://forums.oracle.com/forums/thread.jspa?threadID=463434

As per this post -

<MessageBusinessPayload xsi:type="MessagePayload.BusinessAcknowledgementType">

Needs to be:
<MessageBusinessPayload xsi:type="ns1:MessagePayload.BusinessAcknowledgementType">

Where ns1 has been defined in the xml to the correct schema!

Sunday, September 2, 2012

OSB 11.1.1.5 Installer

I was searching for Oracle Service Bus 11.1.1.5 to install on my local machine. I scrabbled OTN as well as Oracle edelivery but could not found any installer for OSB 11.1.1.5. Surprisingly OSB 11.1.1.5 installer is missing from the Oracle website!!

Then from one of the forum I found this procedure to download the osb setup named -
ofm_osb_generic_11.1.1.5.0_disk1_1of1.zip .


  1. Go to - http://www.oracle.com/technetwork/middleware/service-bus/downloads/index.html
  2. Accept the OTN License Agreement.
  3. Then go to - http://download.oracle.com/otn/nt/middleware/11g/111150/ofm_osb_generic_11.1.1.5.0_disk1_1of1.zip

After downloading perform the installation in following order -

First install weblogic + coherence + oepe
Next install SOA suite (bpel, bam etc.)
Then install OSB.

Refer Quick start guide for the installation - http://www.oracle.com/technetwork/middleware/soasuite/overview/quickstartguidesoasuite11gr1ps4-459545.pdf

Saturday, August 25, 2012

Keystore Location of SOA

Here is the quick way to find out the keystore location from EM console -

  • Go to soa-infra and click on "SOA Infrastructure".
  • In the menu go to "SOA Administration" and click "common properties" as shown in image below.



  • A Properties page will appear. Scroll down at end & find the link for advanced configuration properties as shown in image below.



  • You will land at System MBean browser with property "Keystore Location" among other useful properties.

 

Thursday, July 19, 2012

Failed to execute the assertion "WSSecurity UserName Token" in the conditional policy

If an exception comes related to WSSecurity username token while invoking some SCA composite then check out the web service policy in em console. Make sure it is disabled. See the screen capture below –






Friday, July 13, 2012

Automatic Notification From AQ

Notifications can be set from AQ to notify when a message arrives. Following channels are available for notification -

  • Email notification
  • Stored procedure invocation
  • Http URL

Use procedure  DBMS_AQ.REGISTER to register for a message notification. More details can be found at this url -


For email notifications, hostname, port and 'from' email address required to be configured at database level. To set hostname, port etc refer below link -

http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_aqelm.htm#CACFDHHH 

To find the existing settings run this block -

DECLARE
  host        varchar2(100);
  port        number;
  fromAddress varchar2(100);
BEGIN
  DBMS_AQELM.GET_MAILHOST(host);
  DBMS_AQELM.GET_MAILPORT(port);
  DBMS_AQELM.GET_SENDFROM(fromAddress);
 
  dbms_output.put_line('Mail Host: '||host);
  dbms_output.put_line('Mail Port: '||port);
  dbms_output.put_line('Mail From Address: '||fromAddress);
END;
 

Sunday, July 8, 2012

Command To Find SOA Server Version

My first post.

There might have instances when you want to know which version of Oracle SOA suite you are using especially when you are not the one who installed it. Here is the command to find out the version of SOA Suite installed -

Run command  ./soaversion.sh from location $SOA_ORACLE_HOME/bin 

This will output like below -


Demystifying OIC, OCI and Oracle SOA CS

What is OIC (Oracle integration cloud), OCI (Oracle cloud infrastructure), and SOA cloud service and how they are different? - This has bee...