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

Similar Messages

  • How to delete empty element in popup list

    I have a question about a suspicious behaviour in Forms Builder 10.1.2.0.2.
    When I have a list object (pop up list) I can define some values in the attribute palette of the object.
    So you can set a shown name and a value behind. In this little window to set the items of the popup list you get automatically a white empty item at the end of the list. When I click now on this empty item (you do so, when you want to add an item) Forms Builder automatically adds an new empty item at the end.
    When I click this new empty item, Forms Builder adss another empty one ... and so on.
    It´s very suspicious because, when I end this dialog with "OK", it will be saved and when I open the form (over web) I have at the end of the list one, two (or more) empty elements in list.
    But I can´t delete this empty ones from the list in Forms Builder.
    So my question:
    how can I delete empty items in a popup list??
    I try it with hit "del" button at keyboard or delete the set value for the item (I hope Forms Builder delete items without value). But all does not help.

    Thanks jwh for this great solution! :)
    On my german keyboard it is:
    ctrl+< for deleting a line
    ctrl+> (= ctrl+shift+<) for adding a new line
    Thanks! :)
    I have another question (you can maybe help me, too?).
    On this popup lists you can have several items. When you open a form (via web) and the list has more than x items (maybe 5 or 6) the form shows a scroll bar on the right side.
    Is there any poosibility to set how much items has to show and only show a scroll bar when there are more items in the list?
    Or other way: set the maximum of shown items so big, that there will be no scroll bar.
    Message was edited by:
    ulfk

  • Transformation activity very slow in Jdev.

    Hi!
    When I use the Transformation activity it takes for ever for Jdev to populate the two parts boxes (Source part & Target part)
    Sometimes it wont even succeed.
    Is this a bug in Jdev or what?
    I've tried 10.1.3.3 and 10.1.3.4 - same result.
    Regards, Henrik

    Hmmmm....I dont think its a bug because we also use this feature quite often.
    I have not faced such problems.
    Is your xsd contains huge number of elements?
    Cheers,
    Abhi...

  • Empty Elements: Breach with Paragraph 2.1.4 of JSP 1.1 Specificat ion?

    Hi,
              I think I found a violation of the JSP1.1 spec and I'd like to know
              opinions if I am correct or if I missed something.
              This is what the JSP spec says on empty elements:
              2.1.4 Empty Elements
              Following the XML specification, an element described using an empty tag
              is
              indistinguishable from one using a start tag, an empty body, and an end
              tag.
              Thus there should be no difference between these two custom tags:
              1. <sw:cv key="string" number="1" />
              2. <sw:cv key="string" number="1"></sw:cv>
              While the first compiles fine, the second produces the following error
              message on WebLogic 5.1 SP9:
              Parsing of JSP File '/layouts/1029128.jsp' failed:
              /layouts/1029128.jsp(-1): Error in tag library at: 'sw': The TLD
              description for tag 'cv' requires that the body be empty.
              probably occurred due to an error in /layouts/1029128.jsp line -1:
              I generate my JSPs using an XSLT transformation and the processor
              generates the tags with empty elements. I do not see a chance to change
              this behaviour. A possible workaround could be to allow a tag body, but
              I am afraid of possible side effects (performance, misuse of the tag).
              Would you agree that this behaviour is in contradiction to the
              specification?
              Thanks for your time!
              Daniel
              

    Hi,
              I think I found a violation of the JSP1.1 spec and I'd like to know
              opinions if I am correct or if I missed something.
              This is what the JSP spec says on empty elements:
              2.1.4 Empty Elements
              Following the XML specification, an element described using an empty tag
              is
              indistinguishable from one using a start tag, an empty body, and an end
              tag.
              Thus there should be no difference between these two custom tags:
              1. <sw:cv key="string" number="1" />
              2. <sw:cv key="string" number="1"></sw:cv>
              While the first compiles fine, the second produces the following error
              message on WebLogic 5.1 SP9:
              Parsing of JSP File '/layouts/1029128.jsp' failed:
              /layouts/1029128.jsp(-1): Error in tag library at: 'sw': The TLD
              description for tag 'cv' requires that the body be empty.
              probably occurred due to an error in /layouts/1029128.jsp line -1:
              I generate my JSPs using an XSLT transformation and the processor
              generates the tags with empty elements. I do not see a chance to change
              this behaviour. A possible workaround could be to allow a tag body, but
              I am afraid of possible side effects (performance, misuse of the tag).
              Would you agree that this behaviour is in contradiction to the
              specification?
              Thanks for your time!
              Daniel
              

  • 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

  • Delete empty rows while having empty xml tag

    I've seen something like same but it doesn't work for me. I have a table which is created using xml rules, some time it contains empty xml tag also converted into row but I don't want these empty rows. After table creation empty rows need to be deleted.
    I've got this script from this forum which delete empty rows
    for(var i=myDocument.textFrames.length-1; i>=0; i--){
      for(var j=myDocument.textFrames[i].tables.length-1; j>=0; j--){
       for(var k=myDocument.textFrames[i].tables[j].rows.length-1; k>=0; k--){
        myContents = 0;
        for(var l=myDocument.textFrames[i].tables[j].rows[k].cells.length-1; l>=0; l--){
         if (myDocument.textFrames[i].tables[j].rows[k].cells[l].contents != "") myContents++;
         if (myContents == 0) myDocument.textFrames[i].tables[j].rows[k].remove();
    but incase of any cell contains empty xml element it goes blank. Could any one help on this.
    Thanks
    Mac

    Gyan,
    Thanks for your help. I have modified the code as below:
    public void removeblankline()
    OAViewObject rvo = (OAViewObject)findViewObject("NCRPaymentExtLineVO1");
    Row row[] = rvo.getAllRowsInRange();
    System.out.println("Remove all blank rows");
    System.out.println("Total Rows"+rvo.getRowCount());
    int jcount = rvo.getRowCount();
    for (int j=0;j< jcount;j++)
    NCRPaymentExtLineVORowImpl rowj = (NCRPaymentExtLineVORowImpl)row[j];
    System.out.println("Check Line Number: "+j);
    System.out.println("Line Type Lookup Code: "+rowj.getLineTypeLookupCode());
    if((rowj.getLineTypeLookupCode()==null)||("".equals(rowj.getLineTypeLookupCode().trim())))
    System.out.println("Removed Line Number: "+j);
    rowj.remove();
    System.out.println("Processed with Line Number: "+j);
    } // end removeblankline
    This is the change I have done:
    int jcount = rvo.getRowCount();

  • 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

  • SOA11g: Transform Activity shows as Pending

    Guys,
    After migration of a process from 10.1.3.4 into 11.1.1.4, In many processes Transform/Assign activity always shows in pending state. Here is the xsl used in one of the Transform activity.
    *<?xml version = '1.0' encoding = 'UTF-8'?>*
    *<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"*
    xmlns:tns="http://xmlns.oracle.com/AddUser"
    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue">
    *<xsl:output method="text" omit-xml-declaration="yes"/>*
    *<xsl:template match="/">*
    *<xsl:for-each select="/tns:AddUserRequest/tns:UserGroups/tns:UserName">*
    *<xsl:text>~ </xsl:text>*
    *<xsl:value-of select="."/>*
    *<xsl:text> </xsl:text>*
    *</xsl:for-each>*
    *</xsl:template>*
    *</xsl:stylesheet>*
    This is just one of the case, there are many processes in which assign/Transform activity shows as pending after migration.
    the error it shows in audit trail is:
    Error in evaluate <from> expression at line "140". The result is empty for the XPath expression : "ora:processXSLT(........)
    and fault thrown by process is:
    Non Recoverable System Fault :
    *<bpelFault><faultType>0</faultType><selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"></selectionFailure></bpelFault>*
    can someone help on this?
    Thanks,
    AB
    Edited by: AB on Sep 26, 2011 11:28 PM

    There is a known bug related to ORA:PROCESSXSLT() in PS3 (11.1.1.4). Raise a case with support and you should get a patch.
    Regards,
    Anuj

  • Oraext:parseEscapedXML  in xsl of  Transform Activity

    Hi,
    oraext:parseEscapedXML is not working in xsl of a Transform Activity. But the same thing works in Assign activity
    In xsl:
    <xsl:value-of select="oraext:parseEscapedXML('&lt;person>&lt;name>sreeny&lt;/name>&lt;/person>')"/> returns "sreeny" (It returning only text values of the xml elements only)
    In Assign Activity:
    <copy>
    <from>oraext:parseEscapedXML('&lt;person>&lt;name>sreeny&lt;/name>&lt;/person>')</from>
    <to>$tmpDocument</to>
    </copy>
    returns: <name xmlns="">sreeny</name>
    as per my requirements, I have to use xsl tranform only. Anyone know how do i tranform xml string to an XML Elemen using xslt?
    Any help is appriciated.
    Thanks
    --Sreeny                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    If you use copy-of instead of value-of it should work
    Regards,
    Melvin

  • OSB: Payload validation required for empty elements inside OSB process.

    Hello
    I need to validate the payload for non-empty elements. If the payload is completely empty then OSB should throw an error that the submitted payload is empty.
    If the payload contains at least one element then it should pass through.
    As in process to test this particular one, i have tried with the following code to generally validate for an element.
    xquery version "1.0" encoding "Cp1252";
    (:: pragma bea:global-element-parameter parameter="$inputParameters1" element="ns0:InputParameters" location="../adapter/StoreProcDB/xsd/StoreProcDBService_sp.xsd" ::)
    (:: pragma bea:schema-type-return type="ns1:Validation" location="../xsd/validation.xsd" ::)
    declare namespace xf = "http://tempuri.org/StoreProc_osb/transformation/PayloadValidation/";
    declare namespace ns1 = "http://www.sigmainfo.com/validation";
    declare namespace ns0 = "http://xmlns.oracle.com/pcbpel/adapter/db/sp/StoreProcDBService";
    declare function xf:PayloadValidation($inputParameters1 as element(ns0:InputParameters))
    as element()
    <ns1:Validation>
              <ns1:Payload>{$inputParameters1/.}</ns1:Payload>
              <ns1:ValidationErrorList>
                   (: BEGIN - Required Field Validations :)
              (:     if (empty($inputParameters1/ns0:ACCOUNTNUMBER/text())) then
                        <ns1:ValidationError>
                             <ns1:code>1</ns1:code>
                             <ns1:message>ACCOUNTNUMBER: Required Field</ns1:message>
                        </ns1:ValidationError> :)
                   if (empty($inputParameters1/ns0:AUDITUSER/text())) then
                        <ns1:ValidationError>
                             <ns1:code>1</ns1:code>
                             <ns1:message>AUDITUSER: Required Field</ns1:message>
                        </ns1:ValidationError>
                   else ''
                   (: END - Required Field Validations :)
    </ns1:ValidationErrorList>
         </ns1:Validation>
    declare variable $inputParameters1 as element(ns0:InputParameters) external;
    xf:PayloadValidation($inputParameters1)
    But it throws the following error:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    REQUEST DOCUMENT:
    <soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    </soap:Header>
    <soapenv:Body>
    <stor:InputParameters
    xmlns:stor="http://xmlns.oracle.com/pcbpel/adapter/db/sp/StoreProcDBService">
    <!--Optional:-->
    <stor:P_ACCOUNTNUMBER>00101</stor:P_ACCOUNTNUMBER>
    <!--Optional:-->
    <stor:P_AUDITUSER>venkat</stor:P_AUDITUSER>
    </stor:InputParameters>
    </soapenv:Body>
    </soapenv:Envelope>
    RESPONSE DOCUMENT:
    The invocation resulted in an error: . <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>BEA-382505: OSB Validate action failed validation</faultstring><detail><con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-382505</con:errorCode>
    <con:reason>OSB Validate action failed validation</con:reason>
    <con:details>
    <con1:ValidationFailureDetail xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config">
    <con1:message>
    Incompatible elements: expected an XML instance of name "{http://xmlns.oracle.com/pcbpel/adapter/db/sp/StoreProcDBService}InputParameters", but found an XML instance of name "{http://schemas.xmlsoap.org/soap/envelope/}Body".
    </con1:message>
    <con1:xmlLocation/>
    </con1:ValidationFailureDetail>
    </con:details>
    <con:location>
    <con:node>PipelinePairNode1</con:node>
    <con:pipeline>PipelinePairNode1_request</con:pipeline>
    <con:stage>stage1</con:stage>
    <con:path>request-pipeline</con:path>
    </con:location>
    </con:fault>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    But this is not the way it should be done as i progress.
    Please suggest a simple way to have a pragma with sample and complete validation for the input payload.
    Appreciate your help in advance
    Regards
    Venkat

    Venkat,
    Find below url's for implementing security policies in OSB
    http://docs.oracle.com/cd/E17904_01/doc.1111/e15866/owsm.htm#CHDEEGJI
    http://docs.oracle.com/cd/E17904_01/doc.1111/e15866/owsm.htm#CHDBIJHD
    http://niallcblogs.blogspot.in/2010/07/osb-11g-and-wsm.html
    http://biemond.blogspot.in/2009/06/ws-security-in-osb.html
    Regards,
    Abhinav

  • Picking Individual Records from Transform Activity

    Hi ,
    Can anyone suggest me how to pick individual records from the transform activity.
    The Output of Transform Activity is as follows
    <InvokeInsertServiceInputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="DeptCollection"><DeptCollection xmlns:ns2="http://xmlns.oracle.com/pcbpel/adapter/db/top/InsertService" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/InsertService">
    <ns2:Dept>
    <ns2:deptno>77</ns2:deptno>
    <ns2:dname>Cafetaria</ns2:dname>
    <ns2:loc>Chennai</ns2:loc>
    </ns2:Dept>
    <ns2:Dept>
    <ns2:deptno>88</ns2:deptno>
    <ns2:dname>HelpDesk</ns2:dname>
    <ns2:loc>Whitefield</ns2:loc>
    </ns2:Dept>
    </DeptCollection>
    </part></InvokeInsertServiceInputVariable>
    I want to pick deptno 77 & 88 individually.

    Count the number of records that you have using a count() function. This function returns the number of nodes of a particula xml element.
    Initialize iterator variable with 1.
    start a while loop with condition iterator<=count
    <begin of while loop>
    do your activities
    increment the iterator
    <end of while loop>
    in your case
    deptcolletion/dept[iterator] gives you a handle of every node.
    Check out the xpath tutorial from w3schools.com . that will help
    Message was edited by:
    AshishSharma

  • 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?

  • Want to change the cost element for a activity type (KP26)

    Hi,
    I want to change the Allocation cost element for an activity type in KP26. I have already changed the cost element in the activity master data in KL02. Now i want to change it in KP26. I am trying to delete the existing line item in KP26  to create the new line item with the new cost element, but system not allowing to delete the existing one. It throws the error message ""Allocations with XXXXXXX/XXXX (Cost center/Activity type)  exist ; deletion not possible". Can someone please help me to change the cost element?
    Regards
    Dev

    Hi Rao and Lalit,
    Thanx for you people for helping me. i havin gone doubt here. If i am deleting the existing line in KP26 and create new line with appropriage cost element will it be cause the existing datas? I don't want to go for another activity type, because our process is a complex process exist all over the world in more than 300 company codes. So i want to use the existing activity type but want to change the allocation cost element alone. Is there any possibility to change the cost element alone?
    Regards,
    Dev

  • Error with transform activity - failed to save XSL Map

    I am trying to create a bpel process that gets files via ftp which consists and a set of data records. The plan is for the data to be inserted into a db staging table. Along the way I need to execute a transformation on the data to get it into a form that the staging table can use. Thus I was trying to execute a transform activity which would take the ftp source data which is a xml document with multiple records and then port it into the collection for insertion into the db table. However I find that when I try to save the transform after connecting the recs element to the for-each for the db elements I get a message from jdeveloper 10.1.3.4 "Failed to save XSL Map".
    How to I transport the data and overcome this problem?
    Thanks,
    Steve

    Hi,
         I had faced similar kind of problem earlier. It was not a problem with transformation; it was problem with JDeveloper sessions. Before creating the XSL please check if you can able to connect the remote system from JDeveloper.

  • How do you delete [empty] a single file or folder from "Trash"?

    How do you delete [empty] a single file or folder from "Trash"?
    Can you "securely delete" just 1 item?

    A dangerous and incorrect shell command has been posted in this thread.
    NEVER empty the Trash in the shell (Terminal.) NEVER put anything in the Trash unless you intend to delete it immediately. If you do put something in the Trash and change your mind about deleting it, move it out or use the Put Back contextual menu item. Then empty the remaining items in the Trash as usual.

Maybe you are looking for