Wednesday, February 18, 2026

Composite Sensors

composite sensors:

Implementing composite sensors within a SOA solution provides the ability to define trackable fields on messages and enables you to find a specific composite instance by searching for a field or fields within a message. 

-> Composite sensors provide a method for implementing traceable fields on messages. Composite sensors enable you to perform the following tasks:

    Monitor incoming and outgoing messages.

    Specify composite sensor details in the search utility of the Instances page of a SOA composite application in Oracle Enterprise Manager Fusion Middle-ware Control. This action enables you to locate a particular instance.

    Publish JMS data computed from incoming and outgoing messages.

    Track composite instances initiated through business event subscriptions.

-> It basically means marking a variable or data field to be traced at runtime. So at runtime you can see the values of this field or variable for a running instance, but also you can search for running instances (e.g. find the running instance of which the field ‘order id’ has value ‘AB12345’).

Handle Fault in Synch process

Scenario: 

If a fault occurs then we need to store the fault message in DB also sent the same fault to the consumer for Sync Process.

->

In BPEL whenever we call the external services and that services are not available then we get remote/binding fault.

In our scenario we are calling DB to store data suppose DB is down then in that case we can handle the error by using catch/catchAll/throw activity.

Note: 

Throw

The throw activity provides one way to handle errors in a BPEL process by generating a fault.

throw activity in a BPEL process can throw any type of fault, including standard faults,

A fault thrown by a throw activity should be caught and handled in the BPEL process.

The throw activity has three elements: its name, the name of the fault, and the fault variable

Catch

defines a set of custom fault-handling activities that execute based on an optional fault name and/or fault variable. If the fault name is missing, then the catch intercepts all faults with the same type of fault data.

CatchAll

CatchAll fault handler that executes if a thrown fault is not caught by a  catch block.

 Catch all is a variant of catch. It does not specify a fault name or variable to catch.

Step 1: For custome error create catch block in your block, once u define define any system error like binding/remote fault also create variable faultVar. 

-> This variable will create runtime.wsdl 

Runtime Faults
<message name="RuntimeFaultMessage">
<part name="code" type="xsd:string"/> 
<part name="summary" type="xsd:string"/> 
<part name="detail" type="xsd:string"/> 
</message>

Step 2:
In assign activity assign code/detail/smmary value

Step3:
In same scope throw system errror.

step4: we can aso define same thing in catchAll block

XSLT Variables

 

Variables in XSLT

<xsl:variable> element is used to declare variables in XSLT. 

After declaring a variable, you can assign the required values to it. To access the value stored in a variable, prefix the variable name with the $ character.

Creating Variables

Variables in XSLT are categorized as local and global variables. 

Global variables are created using the <xsl:variable> element 

Local variables are declared within the body of a particular template, within the <xsl:template> element. These variables can be accessed only within the template in which they were declared.

syntax for the <xsl:variable> element is

<xsl:variable name = Qname select =Expression as = sequence-type > template body </xsl:variable>

  • name: Represents the name of a variable, and is a qualified name such as the XML name. The qualified name can have the name of the namespace as a prefix.

  • select: Holds the value of a variable or an expression. This is an optional attribute. 

  • For example, the following is the syntax to assign the value returned to a variable:

<xsl:variable name="CameraName" select=" 'XYZ' "/>

In the above syntax, a variable, CameraName, is declared, and the value, XYZ, is assigned to the variable.

Example

Camera.xml File
<?xml version="1.0"?> <Camera> <CameraName>XYZ</CameraName> <Price type=USD>75</Price> </Camera>
Camera.xsl Stylesheet
the code of an XSLT file that uses variables to retrieve and display information from the Camera.xml file

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="Camera"> <xsl:variable name="cname" select="CameraName"/> <xsl:variable name="cprice" select="Price"/> </xsl:template> </xsl:stylesheet>

the CameraName and Price information of the Camera.xml file are selected and assigned to the variables, cname and cprice, respectively. The select attribute is used to assign the values.

The select attribute is optional, and if not present, the value of the variable is the data within the <xsl:variable> element.

<xsl:variable name="BookName"> Science </xsl:variable>

syntax to declare a variable of the integer datatype

<xsl:variable name="Marks" as="xs:integer*" select="90"/>

In the above syntax, a variable, Marks, of the integer datatype is declared, and the value, 90, is assigned to it.

Accessing Variables

To access the value stored in a variable, use the $ character.
$Marks

Note

In XSLT, you cannot change the value of the variable dynamically.

Cameras.xml File
<?xml version="1.0"?> <CameraInformation> <Camera> <CameraName>XYZ</CameraName> <Price type="USD">75</Price> </Camera> <Camera> <CameraName>PQR</CameraName> <Price type="USD">80</Price> </Camera> <Camera> <CameraName>HIJ</CameraName> <Price type="USD">85</Price> </Camera> </CameraInformation>
 Cameras.xsl File
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <CAMInformation> <xsl:apply-templates/> </CAMInformation> </xsl:template> <xsl:template match="Camera"> <xsl:variable name="cname" select="CameraName"/> <xsl:variable name="cprice" select="Price"/> <xsl:value-of select="$cname"/> <xsl:value-of select="$cprice"/> </xsl:template> </xsl:stylesheet>

two variables, cname and cprice, are created and the values of CameraName and Price are stored in these variables. To display these values in the resultant document, use the $ character. 


SOA Overview Part-1

  Middleware It provides a mechanism for the process to interact with other processes running on multiple network machines. Advantages...