Not able to pass varibale from bpel to XSLT in 10g

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Not able to pass varibale from bpel to XSLT in 10g

Manjunath Shetty
Hi Albin,

Am trying to pass variable from bpel to XSLT in 10g.But its not working.

Please find the below code .

XSD structure
----

<element name="parameters">
<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.oracle.com/service/bpel/common" targetNamespace="http://schemas.oracle.com/service/bpel/common" elementFormDefault="qualified">
<xsd:element name="parameters">
<xsd:annotation>
<xsd:documentation> A sample element </xsd:documentation> </xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="item" maxOccurs="unbounded"> <xsd:complexType>
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="value" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>

-------------

bpel code:

i have declared a variable 'Params' as type parameters.

I have used below xml fragment to assign values to params.

<copy>
 -<from>-
<bpelcommon:parameters xmlns:bpelcommon="http://schemas.oracle.com/service/bpel/common">-<bpelcommon:item>
<bpelcommon:name>processInstanceId</bpelcommon:name>
<bpelcommon:value/>
</bpelcommon:item>
</bpelcommon:parameters>
</from>
<to variable="Params" query="/bpelcommon:parameters"/>
</copy>
<copy>
<from expression="ora:getInstanceId()"/>
<to variable="Params" query="/bpelcommon:parameters/bpelcommon:item[bpelcommon:name='processInstanceId']/bpelcommon:value"/>
</copy>


-<copy><from expression="ora:processXSLT('Transformation_1.xsl',bpws:getVariableData('ProcessCustomerPartyListResponseMsg','ProcessCustomerPartyListResponseEBM'),bpws:getVariableData('Params'))"/><to variable="ProcessCustomerPartyListResponseMsg" part="ProcessCustomerPartyListResponseEBM"/></copy>

XSL code:

in xslt i used below code..

<xsl:param name="processInstanceId"/>

inside template match

<xsl:value-of select="$para"/>

when i tested, am able to see values name=processInstanceId and value=instance_id value in the assign activity .but  transform activity does not returning any output.


Please help.

Regards,
Manjunath Shetty