Transform Activity in BPEL

Hi,
I have a question in transform activity in BPEL. Basically my composite consists of a DB adapter polling for records. when it gets the records, i will insert the same records in the database. So, here in the BPEL i have a while loop which iterates the number of record times. In each while loop, i will insert that iteration record in the table. I can do this using assign activity and point to that specific record using the xpath and all. But, i want to use the transform activity instead and assign the current record of that iteration to the Db insert input variable. Basically, i need to add a variable to the XSL Map and that variable needs to be incremented in each while loop. Any inputs appreciated.
Thanks,
N

Hi Eric,
This is my source code in XSL Map.
<xsl:param name="newCType"/>
<xsl:template match="/">
<ns1:Testnew2Collection>
<ns1:Testnew2>
<ns1:id1>
<xsl:value-of select="/ns0:Testnew1Collection/ns0:Testnew1[$newCType/ns3:element2/ns3:element3]/ns0:id1"/>
</ns1:id1>
<ns1:id2>
<xsl:value-of select="/ns0:Testnew1Collection/ns0:Testnew1[$newCType/ns3:element2/ns3:element3]/ns0:id2"/>
</ns1:id2>
</ns1:Testnew2>
</ns1:Testnew2Collection>
</xsl:template>
</xsl:stylesheet>
You can see above that i have declared a complex type and in that i have created an element of type string. So, newCType is of that complex type because inorder to add for transformation input , we cannot add directly the string or integer variables right. So, when my BPEL process is getting 5 rows as input, in each of the while loop iteration the same first row is getting assigned.
How to indexing here in this source code ?
Please help...
Thanks,
N

Similar Messages

  • Transform Activity in BPEL 10.1.3 (Developers Preview)

    Hi
    Have you tried to use Transform Activity in BPEL 10.1.3 Developers Preview?
    Try this simple test:
    I create a new BPEL process, add a transform, edit the transformation map: connect the two variables (inputVariable and outputVariable), click save and get this error:
    "Failed to save XSL map. Make sure XSL map is valid".
    Thanks

    Can't say that I duplicated your scenario but I did test transforms out to see if there were any distinctive changes in 10.1.3.1. I was hoping there would be some relief from the hard coded partner link endpoint in the transform file.
    Anyway, I was able to generate and save the transform without difficulty.

  • Question regarding the Transformation activity in BPEL

    Hi,
    I have a question regarding the Transformation activity in BPEL.
    I have a database adapter that uses a PL/SQL API. The API returns two tables of nested objects and it automatically generates a schema for me based on the outputs structure. I need to use the Transformation activity to map both these out parameters to root element in the destination.
    The element in the destination is "unbounded". Please take a look at the following screen shot -
    http://www-apps.us.oracle.com:1100/~rvishnuv/transform1.gif
    From the screen shot, you can notice that I have two XML segments X_TEST_TBL and X_TEST_TBL1 in the source and I have one GLOGXMLElement ("unbounded") in the destination. I need to map each of the source elements to the same destination. Then internally, I will be mapping the elements of X_TEST_TBL to "Location" segment/element and the elements of "X_TEST_TBL1" to "ItemMaster" segment/element. If I try to use "foreach" and map second
    element "X_TEST_TBL1" also GLOGXMLElement using the foreach, I get the following error -
    http://www-apps.us.oracle.com:1100/~rvishnuv/transform1_error.gif
    Let us say my X_TEST_TBL contians two records and X_TEST_TBL1 contains one record. Is there any way that I can use these two out parameters to map to the same destination (GLOGXMLElement) so that my final document contains multiple "GLOGXMLElement"s that represents data from both the output parameters? i.e. there should be in total of three occurances of GLOGXMLelement in the output document such that two occurances correspond to data obtained from X_TEST_TBL and one corresponds to data from X_TEST_TBL1.
    Please let me know if there is any way to achieve this.
    Thanks
    Ravi

    Is the listed $200 credit towards a trade-in on top of the original trade in value of a phone, or the maximum amount?

  • Transform Activity

    Can Transform Activity in BPEL Process have Multiple Input Scource Schema to Feed Destination Schema
    I want schemas s1. s2. s3 feed destination d1?
    is it possible?

    Also, if you just need to pass in a handful of other values (not in the input schema), you can use parameters. Something along the lines of this: http://sathyam-soa.blogspot.com/2009/05/passing-bpel-variables-to-xsl.html

  • BPEL Variables in to Transform activity (XSL)

    Hi,
    I need to access a BPEL variable from within a Transform activity (XSL).
    I need an output like this:
    <XML>
    <val1>1</val1>
    <val2>2</val2>
    <val3>3</val3>
    <val4>4</val4>
    </XML>
    Val1 and val2 is reachable from the xsd in the Transform activity (source variable). A DB-adapter is used to provide these data.
    Val3 and val4 is present in the BPEL, within BPEL variables.
    I have created a Transform activity with source = result of DP-adapter (val1 + val2), but will then need to get val3 + val4 (BPEL vars) from inside the Transform activity as well.
    How can I do this ?
    I have tried passing the variables in as parameters, but can't get this to work. I either only get the parameters, or only get the values from the DB-adapter, as it seems I only can have 1 source.
    Similar thread, but with no answer:
    Global Variables in to XSL

    Thank you for answering.
    The link you're referring to is the thing that I mentioned that I couldn't get to work.
    Works fine when just passing parameters, but when I already have a source (like my DB-adapter output), and want the parameters as well, it's getting tricky. Seems there can only be 1 source: Parameters or DB-adapter output.
    What I need is values from a source (DB-adapter output) + be able to send BPEL variables to the same Transform activity (XSL).
    Have you tried this ? Is it at all possible ?

  • Problems with: orcl:lookup-xml in BPEL process transformation activity

    All,
    I'm trying to do a lookup (using orcl:lookup-xml) from a transform activity within a BPEL process.
    The function editor in JDeveloper tells me that the following params are needed:
    - docURL
    - parentXPath
    - keyXPath
    - lookupXPath
    - key
    All of this is clear! In the examples I can find on the oracle site, the value for the docURL is always like: "file:/x:/somefile.xml". This works fine when I test the xsl on my local development pc. However when I deploy to my test environment (SOA Suite on Linux) this file reference isn't going to work obviously.
    I want the docURL to point to an XML file which I include in the deploy of the BPEL process. Can anyone tell me how to do this?
    Hope you can help!
    Message was edited by:
    Chris Everett NL

    Is this xml-file on some relative path of your bpel process, or can you ship it in the same directory inwhich also the .bpel file exists ?

  • BPEL 11g Transform Activity

    Hi
    We are developing EDI 850 Transaction using SOA 11g Environment. We are successfully able to complete the B2B 11g Trading partner setups and able to successfully puch EDI XML to IP_IN_QUEUE.
    We developed a 850 EDI BPEL mappings using BPEL 11g (Build JDEVADF_11.1.1.2.0_GENERIC_091029.2229.5536). We received the payload from IP_IN_QUEUE using B2B adapter successfully. After receiving this payload we are trying to map source elements to target schema. For testing we have mapped couple of elements from source to target.
    But, Transform activity is not performing the mappings which we mapped and its coming null at run time.
    We are not able to find the reason. Could some body let us know what could be issue?
    Regards
    Ravi

    Hi
    Thanks for your reply.
    We tried by assigning the static text, this text successfully comes at run time.
    We have only issue when mapping from source to target. None of the values are getting mapped to target from source.
    - Ravi

  • Real trouble creating BPEL transform activity, please advise.

    I am using JDeveloper 10G (10.1.3.3.0)
    1. I create a new application, right click it, create a new bpel process project. (Async)
    2. in the bpel design window, I drag a transform activity to the middle, double click it and in the transformation tab select source=inputVariable and target=outputVariable. (then click ok)
    3. up comes the xsl mapping: I drag a line across from the input to the result. (the only option as this only takes in 1 value and only outputs 1 value)
    4. I right click the center and test it. both Transformation_1-Source.xml and Transformation_1-Target.xml are selected. I click ok.
    here I get an error in a pop up window, "failed to transform source xml, null". what does this mean and how do you fix it?
    does this version of Jdeveloper have bugs, I am trying to follow tutorials but I keep getting these kind of errors.
    can anyone get a small example working like this? if so what did you do differently?
    Lavanya
    ps - I also get "failed to save xsl map, make sure xsl map is valid"....starting to wonder if it is a bug
    Edited by: LavanyaHalliwell on Jun 25, 2010 9:42 AM

    I'm having the same problem with 10.1.3.5.0.4306
    10.1.3.4 worked great but since moving up to .5 it's nothing but headaches with xsl. I even entered an SR and was sent a new version of lib/xmlparserv.jar but still have problems.
    Simple one-to-one test transforms even fail as above. If I view the source then go back to design it gives another error "Error: XSL Map generation failed. Please use the source editor to correct the problems an return to the design editor".
    I re-downloaded an installed and it worked for a little while then started flaking out again.
    How do we get it to work like 10.1.3.4 did?

  • JDev deletes empty elements in transform activity

    Dear all,
    the XSD in my BPEL process defines a "Group" element:
    <xs:element name="Groups">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Group" type="Group_Type" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:complexType name="Group_Type">
    <xs:sequence>
    <xs:element name="id" type="xs:int"/>
    <xs:element name="name" type="xs:string"/>
    <xs:element name="desc" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    As one can see, a "Group" element contains three mandatory elements named "id", "name" and "desc". This "Group" element is the output target of an XSLT transform activity in my BPEL process.
    In the output target, the "desc" element should be empty (<desc/> or <desc></desc>). Therefore, the corresponding XSLT should look like:
    <foo:Group>
    <foo:id>
    <xsl:value-of select="'do something'"/>
    </foo:id>
    <foo:name>
    <xsl:value-of select="'do something'"/>
    </foo:name>
    <foo:desc/>
    </foo:Group>
    First, it is not possible to define an empty element (<desc/>) in the graphical design modus of an XSLT transform activity. Or is there a workaround available?
    Second, when inserting the empty element in the source modus => saving the document => changing to the graphical design modus => do something in the graphical design modus => returning to the source modus, the empty element was deleted by JDeveloper! Is there a workaround for this very annoying bug of Jdev?
    Thanks in advance!
    Lars

    You can also append an xml fragment to put back the missing fields....for example:
    - Type: Append (Note, this is different than the copy operation)
    - From Type: XML Fragment
    - From Value:
    <ns4:ShipTo xmlns:ns4="http://www.globalcompany.com/ns/order">
    <ns4:Name>
    <ns4:First/>
    <ns4:Last/>
    </ns4:Name>
    </ns4:ShipTo>
    (Replace ns4 in this example with your namespace .)
    - To Type: Variable

  • Access Multiple Source Variables in Transform  Activity

    We have a transform activity that fills a complex type from another complex type that is received from a webservice invoke activity.
    One of the nodes in that destination complex type does not exist in the source complex type. The actual value of that destination node exists as a value in the current bpel process wsdl file, but I can't figure out how to set that value in the transform activity.
    I've been trying to use the xpath document method to parse an external xml file to grab the node that contains the value. Here is my xsl transformation file. Notice the line that contains the document method call. Does this not work in the BPEL transformations? The error I always receive is.
    Invalid XPath expression
    Is there another way to access a second source file within a transformation xslt file?
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
      <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
      <mapSources>
        <source type="WSDL">
          <schema location="StorePrice.wsdl"/>
          <rootElement name="GetPricingResponse" namespace="http://services.darr.fastenal.com/GetPrice/StorePriceOutput.xsd"/>
        </source>
      </mapSources>
      <mapTargets>
        <target type="WSDL">
          <schema location="TestMobilieQuote.wsdl"/>
          <rootElement name="TestMobilieQuoteProcessResponse" namespace="http://xmlns.oracle.com/TestMobilieQuote"/>
        </target>
      </mapTargets>
      <!-- GENERATED BY ORACLE XSL MAPPER 10.1.2.0.0(build 050923.1500) AT [THU FEB 02 14:10:26 CST 2006]. -->
    ?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:tns="http://services.darr.fastenal.com/GetPrice/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:ns0="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:s1="http://services.darr.fastenal.com/GetPrice/StorePriceOutput.xsd"
    xmlns:s0="http://services.darr.fastenal.com/GetPrice/StorePriceInput.xsd"
    xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:client="http://xmlns.oracle.com/TestMobilieQuote"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    exclude-result-prefixes=
    "xsl tns mime wsdl soap12 http ns0 soap soapenc s1 s0 tm plnk client bpws ldap xp20 ora orcl">
      <xsl:template match="/">
        <client:TestMobilieQuoteProcessResponse>
          <client:result>
            <client:AccountNumber>
              <xsl:value-of select="document('TestMobilieQuote',/)/TestMobilieQuoteProcessRequest/CustomerNumber"/>
            </client:AccountNumber>
            <xsl:for-each select="/s1:GetPricingResponse/s1:GetPricingResult/s1:PricingInformation">
              <client:PartList>
                <client:PartNumber>
                  <xsl:value-of select="s1:PartNumber"/>
                </client:PartNumber>
                <client:SellPrice>
                  <xsl:value-of select="s1:SellPrice"/>
                </client:SellPrice>
                <client:IsValid>
                  <xsl:value-of select="not(xp20:matches(s1:SellPrice,"^0$"))"/>
                </client:IsValid>
              </client:PartList>
            </xsl:for-each>
          </client:result>
        </client:TestMobilieQuoteProcessResponse>
      </xsl:template>
    </xsl:stylesheet>

    I noticed in my post that I had a copy error for the line in the xsl transformation that I have a question about. Here is the proper line
    <xsl:value-of select="document('TestMobilieQuote.wsdl',/)/TestMobilieQuoteProcessRequest/CustomerNumber"/>

  • Transformation activity - Audit trail or logging

    We have a big transformation file (XSL) and the input and output payload to the transformation activity is also huge. Currently, the process is failing in transformation activity and the error is FOTY0001: type error.
    Is there any way, by which we can add some debug messages in the XSL code to know, till which point the transformation has succeed ? Ideally, would like to view these debug messages in the audit log of the BPEL instance .
    Thanks.

    There is no explicit logging for XSL. I use JDeveloper XSL Test as available on XSL Maps to test the XSL input --> Output. To Solve FOTY errorYou can just copy you payloads from BPEL instance and copy in the source file for XSL Test.

  • Using the XPATH expression function in Transformation activity

    Hi,
    I have to map the variable value(other than the source variable) to one of the node in the target variable in the transformation activity. For that I am using the XPATH expression function bpws:getVariableData ('variableName') and map it to corrsponding target node. But this mapping is not at all happening. The same prolem occurs while using function ora:getInstanceID() in transformation function. Then I could find a metalink note id: 387381.1,saying it as the bug in 10.1.2.2 BPEL PM, which they are covering in the next release. But our BPEL PM version is 10.1.3.3. But still the same type of problem occurs.
    Please let me know, is there are any solution for using the ora:getInstanceID() , bpws:getVariableData in Transformation activity.

    Hi,
    I dont understand why would you need to use the "bpws:getVariableData" function.
    When you are mapping a source-node to a target-node, it usually assigns the value in the source-node to the target-node, which is as good as using the "bpws:getVariableData" function.
    So, technically speaking you need to use this function explicitly to achieve that ...
    Also, if you want the instance-id, you can use the "ora:getInstanceId()" directly in the BPEL code than using it in the transformation.
    Regards,
    Madhu.

  • Transform Activity Problem - The Target is mismatched from the one in ...

    Hi everyone,
    When I double click Transform activity, It pop up an error message said "The Target is mismatched from the one in transformation file".
    Could anyone tell me how to solve the problem???
    Thanks....
    Elvis.

    You transform the result into some bpel-variable.
    The mismatch may be between the type of that bpel-variable compared to the type declared as the target of the transformation. The target is given by an xsd-reference in the xml-comments in the header of the xslt-file (source view).
    Hope this helps.
    /CadB

  • Include variable into xpath expression of transformation activity

    Are we able to include variable from the BPEL process into the xpath expression of the transformation activity?
    I tried it but I received error saying it does not recognize the function bpws:getVariableData('loopCounter') when I included it into the xpath expression inside the transformation.
    Thanks.
    Kenny

    Maybe I am giving a bad example. Instead of bpws:getVariableData('loopCounter'), I need something like bpws:getVariableData('accountName') which is being used in the filter like /root/accounts/account[name=bpws:getVariableData('accountName')]
    The assign will not work in this xpath expression because it return multiple nodes in source.

  • Invoking Stored Procedure - Transform Activity

    I am attempting to invoke a PL/SQL stored procedure via the database adapter in BPEL (10.1.3.1). The stored procedure is very simple and takes 2 parameters:
    PROCEDURE log_admission(p_px_id NUMBER, p_cons_lev NUMBER) IS
    BEGIN
    UPDATE nhscont_px
    SET pat_admitted = 'Y',
    pat_admitted_date = sysdate
    WHERE pat_match_id = p_px_id;
    END;
    The BPEL flow has the following activities:
    Recieve
    Transform
    Invoke => DB Adapter, with package / procedure selected
    Reply
    I have created a variable of type: MessageType: PartnerLink: DbAdapterCall: args_in_msg.
    In the Transform activity, I have selected the inputVariable/Payload as the source, and the defined variable/Inputparameters as the destination. I have created a mapping file and mapped the variables between schemas.
    I have set the input variable of the process as the variable created above.
    When I deply and execute the process, the record does not update, although the PL/SQL is being executed. It looks like the parameters are not being passed in correctly.
    Does anyone have any ideas as to what I could be doing wrong here?
    Thanks
    Message was edited by:
    steve_macleod

    Seeing the parameters being passed in to the procedure on the invoke activity.
    Does the Invoke activity in BPEL have the values you are transforming?
    Kalidass
    http://oraclebpelindepth.blogspot.com/

Maybe you are looking for

  • How to show value in list box on screen.

    Hey, I'm trying to write a little program to select a value from a listbox on a screen...  Filling the listbox, no problem.  But showing the value on screen, and using the selected value isn't working... So when i select a value, directly after the l

  • Adobe Acrobat 9 supposedly allows you to convert selected areas of a web page to PDF from within Int

    Software: Adobe Acrobat 9 Standard Issue: Using the 'Adobe PDF toolbar' from within Internet Explorer Problem #1: Can't convert selected areas of a web page to PDF When you click 'select' on the adobe pdf toolbar, a red dotted line is supposed to app

  • Entity Manager in EJB3

    Could someone explain the concept of 1. Entity manager. 2. Types and Purpose of Entity manager 3. How they are injected Thanks in advance.

  • Error encountered in phase SHDINST_DB_PREP - EHP1 upgrade using EHPI.

    Hi Experts, I am currently in the configuration phase of Enterprise Portal upgrade from 700 to EHP1 then i got this error in phase SHDNST_DB_PREP, I am using OS platform Windows Server 2003; here is the message: On the EHPi GUI: Decide how you want t

  • Hard drive failing - recover data

    I backed up my data a couple of months ago but not since then. Per disk utility, my hard drive is failing. I think it has died. When I turn my g4 on I get the grey screen with the apple logo then a few minutes later the screen turns black. Ugh! Is th