Tuesday, January 25, 2011

BPEL States in CUBE_INSTANCE

Very recently, I had a requirement as part of Performance Testing to look up all instances of all BPEL Process which are in a particular state. I was reading the Admin Guide and found the below information. Thought it is worthwhile documenting this information for quick reference:

0 --> initiated
1 --> open and running
2 --> open and suspended
3 --> open and faulted
4 --> closed and pending
5 --> closed and completed
6 --> closed and faulted
7 --> closed and canceled
8 --> closed and aborted
9 --> closed and stale 


Cheers,
-AR

Thursday, January 13, 2011

XSLT for indentifying line feed character

A line feed character is nothing but a new line character. I had a requirement to break a text in one of fields in input xml received by a bpel process. I tried using substring-before function with checking if the value contains '&xa'. However, the soa server does not seem to recognize this.

I understood Substring wouldn't work for line feed characters. The xslt chunk in this post will remove the line feed character and extract the text. Consider the input xml:
<Emp_No>100</Emp_No>
<Emp_Name>SS</Emp_Name>
<Details>First Employee
Second Employee
Third Employee</Details>

This xml has to be transformed to:
<Details1>First Employee</Details1>
<Details2>Second Employee</Details2>
<Details3>Third Employee</Details3>

Use the XSLT below to do the transformation:
<xsl:variable name="Temp">
<xsl:value-of select="translate(/InputXml/Details, '&#xA;', '|')"/>
</xsl:variable>
<Details1>
<xsl:value-of select="substring-before($Temp,'|')"/>
</Details1>
<Details2>
<xsl:value-of select="substring-before(substring-after($Temp,'|'),'|')"/>
</Details2>
<Details3>
<xsl:value-of select="substring-after(substring-after($Temp,'|'),'|')"/>
</Details3>


Cheers,
-AR


Saturday, January 8, 2011

XSLT transformation and Line Breaks

This post details how to add and remove Line Breaks in a XSLT.

Removing Line Breaks in XSLT:

Consider the XML below. Need to remove the line breaks in the input payload:
<test>Line1
Line2</test>


Use the XSLT chunk below to remove the line break from the XML:
<xsl:variable name="Temp">
<xsl:value-of select="translate(/InputXml/test, '&#xA;', '|')"/>
</xsl:variable>
<Line1>
<xsl:value-of select="substring-before($Temp,'|')"/>
</Line1>
<Line2>
<xsl:value-of select="substring-after($Temp,'|')"/>
</Line2>


And then do a concat($Line1,',',$Line2) or as required!

Adding Line Breaks in XSLT:

Adding a line break should not be an issue once the removal of it has been figured out. Lets consider the same XML without line break. We will add line breaks to generate the xml:
<test>Line1
Line2</test>


 Use the XSLT chunk below to add the line break from the XML:
<xsl:stylesheet version="1.0">
<xsl:template match="/">
<OutputXml>
<Details>
<xsl:value-of select="concat(/InputXml/Line1,'&#xA;',/InputXml/Line2)"/>
</Details>
</OutputXml>
</xsl:template>
</xsl:stylesheet>
 

Cheers,
-AR
 

Saturday, January 1, 2011

Happy New Year 2011 !

Dear Visitors,

Wish you all a very happy and prosperous new year ahead.

Happy New Year 2011 !


Thank you all for reading my blog and supporting me. Please continue to do so in the year ahead too!

Cheers,
-AR

Wednesday, December 29, 2010

FOTY0001: Type Error

I have encountered the below error during runtime many a time:

ORABPEL-09500
XPath expression failed to execute.
Error while processing xpath expression, the expression is "ora:processXSLT('Transformation_5.xsl',bpws:getVariableData('inputVariable','payload'))", the reason is FOTY0001: type error. Please verify the xpath query.

This error, though mentions the reason for failure was due to a xpath expression, when one executes the xslt using xalan or test option of Jdeveloper, the xslt works fine. I later found that the part name was missing in the transformation node where the xsl was used. This could be because, the bpel file was edited prematurely even before the details of the node were loaded or could be an actual issue with the schema (in case of first timers)!

Always check if the part name in the transformation node are present and are correct before debugging further on this error. I found the this link useful when I was debugging.

Please note this is only one such FOTY0001 error (most common) and one such solution which worked for me. There could be many other reasons for the error in different scenarios and hence different resolutions.

Cheers,
-AR

Saturday, December 18, 2010

Oracle Business Rules as a Composite Service

The general practice of using Oracle Business Rules is to create a set of rules in a dictionary and this dictionary in turn will be invoke by a bpel, which would have been exposed as a web service or composite service. But there are cases where a bpel is not needed and one needs the service of just rules.

In those particular cases, the dictionary themselves can be exposed as a composite service. So a web service would be created which would directly interface with the dictionary. A couple of points has to be noted when doing this and apart from that, its just a normal rules configuration, soa composite deploy and test:

Create an empty composite, just add a dictionary and make sure to mark the dictionary for the below:





































When testing the service, it would require the name of the decision function to be passed. Earlier this was taken care by the bpel when we used to drag drop the business rules component and choose the dictionary and decision function:











Cheers,
-AR

Sunday, November 28, 2010

Upcoming Review of the book - Getting Started with Oracle BPM Suite 11gR1

I have been reading technical articles and books on SOA and related technologies. I have read several books to learn about Fusion Middleware 11g and one of the most effective ones among the lot was "Getting Started With Oracle SOA Suite 11g R1". The book was very practical and the gets you started very fast with hands-on on Oracle SOA Suite 11g.

Now, when I want to teach myself Oracle BPM 11g, I am naturally attracted to a book, similar in nature, for BPM, "Getting Started with Oracle BPM Suite 11gR1". I will be using the book for learning BPM, on a hands-on level. On completion of this book, I would put forth my review of the book. In the meantime, for those interested to help me out on this exercise, the book can be found and bought via the link below (Click on the picture to find and purchase the book).













Cheers,
- AR
Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License