Wednesday 23 December 2015

Creating Reports in BAM 12C

Please follow below steps to configure and integrating with oracle BAM 12c:

1. We need to create a simple data object in BAM with column name and datatype as shown below.  
     

2. In BAM 12c, the integration process was changed and one of the process by using a Topic/queue we can integrate BAM data object. For this process, we need to configure Enterprise Message Source (EMS) in BAM console.

Below screen shots shows the step wise indications.


3. Step to create EMS 

·         Create a SalesOrder EMS.
·         Configure EMS with a Topic/Queue.
·         Configure TargetNamespace of XSD schema of a Topic/Queue in XML Message Formatting        session.
·         Configure Dataobject and select “Insert” operation.
·         Configure element names of XSD and Dataobject.
·         Click on Start button.

 4. We can see Green light shows that EMS is started to poll the data from a Topic/Queue to BAM DataObject.




5. We need to create a SOA project to send data to JMS Topic/Queue and below screen shot shows the operation of JMS Adapter.


6. Configure the JMS adapter with a Topic/Queue details shown below.


7. Configure the SalesOrder.xsd file in JMS adapter.


8. Start SOA project to send data to JMS Topic/Queue which initiate to send data from JMS Topic/Queue to BAM Dataobject shown below.


9. Create project in Oracle BAM console and add SalesOrder Dataobject to BAM project. 


10. Create Business Queries and select SalesOrder Dataobject.
11. Check required field in X-axis and Y-axis to show the result in graphical view and Click on SAVE.


12. Create a Business View and Select SalesOrder Business Query as shown below.
 If we need an auto refresh option, click on Runtime-Interaction.


13. Check below options and provide the interval frequency value.
Click on Apply and Close.


14. Create a Dashboard and drag and drop SalesOrder from project view to dashboard.
Click On SAVE.

15. Go to Home and Click on Open Project.


16. Select OracleBAM project as shown below.

17. We can see SalesOrder dashboard in OracleBAM project and Click on SalesOrder dashboard.


18. We can see the graphical view of SalesOrder dashboards in new tab.


 19. SalesOrder dashboard will refresh automatically as per the frequency interval we mentioned.

Thank you.. !!

Monday 23 November 2015

String To Time Stamp Conversion using XSLT


            This post shows about String To Time Stamp Conversion using XSLT /Transformation in BPEL process which i have done in my real time experience.
     
            The requirement looks like we are getting time as a string from source and we need to convert to time stamp (hh:mm:ss). for example, from source the value will be "102530" and the response should be "10:25:30". This can be done by using substring() function. But after 12:00 AM, the request value will be like "30" or "525" and response should be like "00:00:30" or "00:05:25".

            In order to get this type of response i wrote a logic in XSLT as below.

XSLT code :

<xsl:variable name="StringToTime">
      <xsl:choose>
        <xsl:when test="/ns0:process/ns0:input">
          <xsl:variable name="Temp">
            <xsl:value-of select="substring(concat('000000', /ns0:process/ns0:input), string-length(/ns0:process/ns0:input)+1)"/>
          </xsl:variable>
          <xsl:value-of select="concat(substring($Temp,1,2),':',substring($Temp,3,2),':',substring($Temp,5,2))"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="/ns0:process/ns0:input"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>


Request :

<?xml version="1.0" encoding="UTF-8" ?>
<process xmlns="http://xmlns.oracle.com/DemoApplication/StringtoTimeConversion/BPELProcess">
   <input>525</input>
</process>

Response :

<?xml version = '1.0' encoding = 'UTF-8'?>
<ns0:processResponse xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:ns0="http://xmlns.oracle.com/DemoApplication/StringtoTimeConversion/BPELProcess">
   <ns0:result>00:5:25</ns0:result>
</ns0:processResponse>


Thanks!!

Friday 10 July 2015


Coherence Adapter in SOA 12c


Coherence adapter is one of the new features in Oracle SOA 12c. Coherence cache is act like a store where we can put database data and made it available for different application, Coherence cache serves as intermediary between database and client application.
The operations that we can perform using coherence adapter are:
  1. Put
  2. Get
  3. Remove
  4. Query

In this post, I am going to explain how to configure coherence adapter in oracle soa 12c for Put and Get operations. I have create a database table contains header details and this sample need to fetch the header details from database table by passing some parameter value. In this process, we will implement coherence adapter with Get and Put operations. Get operation is used fetch the values that are available in coherence and Put operation is to insert values into coherence if the values are not available.  
Firstly, drag and drop a BPEL process and configure it with one way template and default request schema.
XSD schema for this sample is shown below.







Overview of the project looks like below.

Next, Drag a DB adapter and configure it with proper database details.


Check with Select operation type and complete the configuration with table selection.

Add a parameter for the query to fetch the values based on parameter value as show below.


Next, drag the Coherence Adapter to configuration with Get operation.
Give the coherence connection JNDI name as per below and click on Next.



Check the Get operation and click on Next.


We use the default catch name as “adapter-local” for this sample.
Key value is “input”. This is the request schema element name and click on Next.


Choose the schema QueryHeaderInfo_table.xsd, which is generated from DB adapter table and click on Next.

Click Finish.





Next, drag the Coherence Adapter to configuration with Get operation.
Give the coherence connection JNDI name as per below and click on Next.




Check the Put operation and click on Next.


We use the default catch name as “adapter-local” for this sample.
Key value is “input”. This is the request schema element name and click on Next.


Choose the schema QueryHeaderInfo_table.xsd, which is generated from DB adapter table and click on Next.


Click Finish.


Overview of the BPEL is show below.

Drag an invoke activity to integrate with Query Coherence adapter to get the header details from coherence catch.
Add assign activity to map parameter value to get operation coherence adapter as shown below.

Add a property jca.coherence.Key with value from $inputVaiable in invoke activity.


Drag IF condition after invoke activity to verify the values for the parameter are available on not in coherence catch.
By using below count condition for coherence adapter response, we can verify.

If we get values, then flow will exit with empty activity and if we don’t have any values in coherence cache, we can continue the flow in else condition as show below.

Invoke DB adapter to get the values from database by mapping request value to parameter using assign activity as shown below.

Drag another invoke to integrate Put Coherence Adapter and add the property jca.coherence.Key with value form $inputvariable.

Deploy the project and test it.
First time testing with above value.

                                


Second time testing with same value.
                                   


Good Luck  JJ


Thursday 2 July 2015

Unable to get Metadata Manager for DVM in SOA 12C


DVM Issue:

The XPath expression failed to execute; the reason was: oracle.fabric.common.xml.xpath.XPathFunctionException: Unable to get Metadata Manager for DVM

Solution:

While providing values for DVM in oracle SOA 12c, 

please follow below steps:

DVMLocation : DVM/<DVM File Name>

SourceColumnName : <SourceColumnName>

SourceValue : <SourceValue>

TargetColumnName : <TargetColumnName>

DefaultValue : <DefaultValue>