Sunday, 17 July 2016

Sum of the resultant nodes of the apply template in XSLT


No Explanation, just a example with sample xml's and screen shots.

Request XML:



<?xml version="1.0" encoding="UTF-8" ?>
<process xmlns:ns0="http://xmlns.oracle.com/Application3/SampleProject/BPELProcess1">
   <mulWeight>
      <weight>800</weight>
      <UoMCodeWei>grm</UoMCodeWei>
   </mulWeight>
   <mulWeight>
      <weight>9000</weight>
      <UoMCodeWei>grm</UoMCodeWei>
   </mulWeight>
   <mulWeight>
      <weight>1000000</weight>
      <UoMCodeWei>mrm</UoMCodeWei>
   </mulWeight>
</process>






XSLT File:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:msxsl="urn:schemas-microsoft-com:xslt"
                xmlns="http://xmlns.oracle.com/Application3/SampleProject/BPELProcess1"
                exclude-result-prefixes="msxsl">
  <xsl:template match="/process">
    <xsl:variable name="resultGroup">
      <xsl:apply-templates select="mulWeight"/>
    </xsl:variable>
    <processResponse>
      <result>
        <xsl:value-of select="sum(msxsl:node-set($resultGroup)/*)"/>
      </result>
    </processResponse>
  </xsl:template>
  <xsl:template match="mulWeight">
    <xsl:if test="UoMCodeWei='grm'">
      <result>
        <xsl:value-of select="weight div 1000"/>
      </result>
    </xsl:if>
    <xsl:if test="UoMCodeWei='mrm'">
      <result>
        <xsl:value-of select="weight div 1000000"/>
      </result>
    </xsl:if>
  </xsl:template>
</xsl:stylesheet>


Result XML :

<?xml version = '1.0' encoding = 'UTF-8'?>
<processResponse xmlns="http://xmlns.oracle.com/Application3/SampleProject/BPELProcess1">
   <result>10.8</result>
</processResponse>





Friday, 15 July 2016

Requested audit trail size is larger than threshold

Unable to open audit trial on EM Exception:Requested audit trail size is larger than threshold 1048576 chars
Error: Exception occured while retrieving the Flowtrace XML for the Composite Instancejava.lang.RuntimeException: oracle.soa.management.facade.DataSetTooLargeException: Requested audit trail size is larger than threshold 1048576 chars

To change instanceTrackingAuditTrailThreshold -
1. Right click on SOA-Infra and navigate till Audit Config
SOA_Infra ->Administration -> System Mbean Browser ->Application Defined MBeans ->oracl.as.soinfa.config ->Select server ->SoaInfraConfig -> soa-infra -> Audit Config

2. Change instanceTrackingAuditTrailThreshold value(In my case we have to raise it till 4 MB) and click Apply.