Need to generate a standard XML even without data

Hi All,
I am using the below query to generate XML Data.
SELECT XMLSERIALIZE (CONTENT DATA AS CLOB) AS DATA
           FROM (  SELECT XMLELEMENT (
                             "RegionData",
                             XMLAGG (
                                XMLFOREST (
                                   XMLCData(r.region) AS "RegionName",
                                   r.first_name || r.last_name AS "EmployeeFullName",
                                   r.ntlogin AS "EmployeeAlias",
                                   r.job_title AS "EmployeeRole",
                                   r.sap_number AS "SAPNumber",
                                   r.sales_transaction_dt AS "Day",
                                   r.postpaid_totalqty AS "PostpaidCount",
                                   r.postpaid_totaldollars AS "PostpaidAmount",
                                   r.postpaidfeature_totalqty AS "PostpaidFeatureCount",
                                   r.postpaidfeature_totaldollar AS "PostpaidFeatureAmount",
                                   r.prepaid_totalqty AS "PrepaidCount",
                                   r.prepaid_totaldollars AS "PrepaidAmount",
                                   r.prepaidfeature_totalqty AS "PrepaidFeatureCount",
                                   r.prepaidfeature_totaldollars AS "PrepaidFeatureAmount",
                                   r.accessory_totalqty AS "AccessoriesCount",
                                   r.accessory_totaldollars AS "AccessoriesAmount",
                                   r.handset_totalqty AS "HandsetsCount",
                                   r.handset_totaldollars AS "HandsetsAmount",
                                   (SELECT XMLAGG (
                                              XMLELEMENT (
                                                 "Division",
                                                 XMLFOREST (
                                                    di.division AS "DivisonName",
                                                    di.postpaid_totalqty AS "PostpaidCount",
                                                    di.postpaid_totaldollars AS "PostpaidAmount",
                                                    di.postpaidfeature_totalqty AS "PostpaidFeatureCount",
                                                    di.postpaidfeature_totaldollar AS "PostpaidFeatureAmount",
                                                    di.prepaid_totalqty AS "PrepaidCount",
                                                    di.prepaid_totaldollars AS "PrepaidAmount",
                                                    di.prepaidfeature_totalqty AS "PrepaidFeatureCount",
                                                    di.prepaidfeature_totaldollars AS "PrepaidFeatureAmount",
                                                    di.accessory_totalqty AS "AccessoriesCount",
                                                    di.accessory_totaldollars AS "AccessoriesAmount",
                                                    di.handset_totalqty AS "HandsetsCount",
                                                    di.handset_totaldollars AS "HandsetsAmount",
                                                    (SELECT XMLAGG (
                                                               XMLELEMENT (
                                                                  "District",
                                                                  XMLFOREST (
                                                                     dis.district AS "DistrictName",
                                                                     dis.postpaid_totalqty AS "PostpaidCount",
                                                                     dis.postpaid_totaldollars AS "PostpaidAmount",
                                                                     dis.postpaidfeature_totalqty AS "PostpaidFeatureCount",
                                                                     dis.postpaidfeature_totaldollar AS "PostpaidFeatureAmount",
                                                                     dis.prepaid_totalqty AS "PrepaidCount",
                                                                     dis.prepaid_totaldollars AS "PrepaidAmount",
                                                                     dis.prepaidfeature_totalqty AS "PrepaidFeatureCount",
                                                                     dis.prepaidfeature_totaldollars AS "PrepaidFeatureAmount",
                                                                     dis.accessory_totalqty AS "AccessoriesCount",
                                                                     dis.accessory_totaldollars AS "AccessoriesAmount",
                                                                     dis.handset_totalqty AS "HandsetsCount",
                                                                     dis.handset_totaldollars AS "HandsetsAmount",
                                                                     (SELECT XMLAGG (
                                                                                XMLELEMENT (
                                                                                   "Store",
                                                                                   XMLFOREST (
                                                                                      mst.store_id AS "StoreNumber",
                                                                                      mst.store_name AS "StoreLocation",
   mst.postpaid_totalqty AS "PostpaidCount",
                                                                                      mst.postpaid_totaldollars AS "PostpaidAmount",
                                                                                      mst.postpaidfeature_totalqty AS "PostpaidFeatureCount",
                                                                                      mst.postpaidfeature_totaldollar AS "PostpaidFeatureAmount",
                                                                                      mst.prepaid_totalqty AS "PrepaidCount",
                                                                                      mst.prepaid_totaldollars AS "PrepaidAmount",
                                                                                      mst.prepaidfeature_totalqty AS "PrepaidFeatureCount",
                                                                                      mst.prepaidfeature_totaldollars AS "PrepaidFeatureAmount",
                                                                                      mst.accessory_totalqty AS "AccessoriesCount",
                                                                                      mst.accessory_totaldollars AS "AccessoriesAmount",
                                                                                      mst.handset_totalqty AS "HandsetsCount",
                                                                                      mst.handset_totaldollars AS "HandsetsAmount")))
                                                                        FROM stores_comm_mobility_info_vw mst
                                                                       WHERE mst.district =
                                                                                dis.district) "StoreData")))
                                                       FROM diST_comm_mobility_info_vw dis
                                                      WHERE dis.division =
                                                               di.division) "DistrictData")))
                                      FROM div_comm_mobility_info_vw di
                                     WHERE di.region = r.region) AS "DivisionData")))
                             AS DATA
                     FROM reg_comm_mobility_info_vw r WHERE region=p_region;
----Ex
<RegionData>
  <RegionName>West</RegionName>
  <EmployeeFullName>James</EmployeeFullName>
  <PostpaidCount>1000</PostpaidCount>
  <DivisionData>
  <Division>
  <DivisonName>WestDiv1</DivisonName>
  <PostpaidCount>1000</PostpaidCount>
  <DistrictData>
  <District>
  <DistrictName>WestDistrict1</DistrictName>
  <PostpaidCount>1000</PostpaidCount>
  <StoreData>
  <StoreNumber>123</StoreNumber>
  <PostpaidCount>1000</PostpaidCount>
  </StoreData>
  </District>
  </DistrictData>
  </Division>
  </DivisionData>
</RegionData>
But the problem here is if there is no data, then that particular element is not coming. My requirement is if there is no data in any of the levels then a default emplty element needs to be populated and if the query returns no rows then only empty skeleton needs to be created.
Appreciate your response.
Thanks,
MK

Hi,
My requirement is if there is no data in any of the levels then a default emplty element needs to be populated and if the query returns no rows then only empty skeleton needs to be created.
First part of the requirement is easy : don't use XMLForest, but XMLElement instead.
Second part depends on what structure you want to return.
For example do you just need the following or a deeper structure ?
<RegionData/>

Similar Messages

  • Need to generate a Index xml file for corresponding Report PDF file.

    Need to generate a Index xml file for corresponding Report PDF file.
    Currently in fusion we are generating a pdf file using given Rtf template and dataModal source through Ess BIPJobType.xml .
    This is generating pdf successfully.
    As per requirement from Oracle GSI team, they need index xml file of corresponding generated pdf file for their own business scenario.
    Please see the following attached sample file .
    PDf file : https://kix.oraclecorp.com/KIX/uploads1/Jan-2013/354962/docs/BPA_Print_Trx-_output.pdf
    Index file : https://kix.oraclecorp.com/KIX/uploads1/Jan-2013/354962/docs/o39861053.out.idx.txt
    In R12 ,
         We are doing this through java API call to FOProcessor and build the pdf. Here is sample snapshot :
         xmlStream = PrintInvoiceThread.generateXML(pCpContext, logFile, outFile, dbCon, list, aLog, debugFlag);
         OADocumentProcessor docProc = new OADocumentProcessor(xmlStream, tmpDir);
         docProc.process();
         PrintInvoiceThread :
              out.println("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
                   out.print("<xapi:requestset ");
                   out.println("<xapi:filesystem output=\"" + outFile.getFileName() + "\"/>");
                   out.println("<xapi:indexfile output=\"" + outFile.getFileName() + ".idx\">");
                   out.println(" <totalpages>${VAR_TOTAL_PAGES}</totalpages>");
                   out.println(" <totaldocuments>${VAR_TOTAL_DOCS}</totaldocuments>");
                   out.println("</xapi:indexfile>");
                   out.println("<xapi:document output-type=\"pdf\">");
    out.println("<xapi:customcontents>");
    XMLDocument idxDoc = new XMLDocument();
    idxDoc.setEncoding("UTF-8");
    ((XMLElement)(generator.buildIndexItems(idxDoc, am, row)).getDocumentElement()).print(out);
    idxDoc = null;
    out.println("</xapi:customcontents>");
         In r12 we have a privilege to use page number variable through oracle.apps.xdo.batch.ControlFile
              public static final String VAR_BEGIN_PAGE = "${VAR_BEGIN_PAGE}";
              public static final String VAR_END_PAGE = "${VAR_END_PAGE}";
              public static final String VAR_TOTAL_DOCS = "${VAR_TOTAL_DOCS}";
              public static final String VAR_TOTAL_PAGES = "${VAR_TOTAL_PAGES}";
    Is there any similar java library which do the same thing in fusion .
    Note: I checked in the BIP doc http://docs.oracle.com/cd/E21764_01/bi.1111/e18863/javaapis.htm#CIHHDDEH
              Section 7.11.3.2 Invoking Processors with InputStream .
    But this is not helping much to me. Is there any other document/view-let which covers these thing .
    Appreciate any help/suggestions.
    -anjani prasad
    I have attached these java file in kixs : https://kix.oraclecorp.com/KIX/display.php?labelId=3755&articleId=354962
    PrintInvoiceThread
    InvoiceXmlBuilder
    Control.java

    You can find the steps here.
    http://weblogic-wonders.com/weblogic/2009/11/29/plan-xml-usage-for-message-driven-bean/
    http://weblogic-wonders.com/weblogic/2009/12/16/invalidation-interval-secs/

  • Any tool that generates a sample XML with some data given an xsd

    hello friends, is there any free tool availaible that generates a sample XML with some data given an xsd . please do let me know

    got it guys, xmlspy and stylus studio , neways thanks

  • How to generate PDF from XML output without XML publisher

    Hi,
    I am facing a problem while splitting the rdf generated XML output.
    Problem Description:
    I have a oracle invoice report which runs once every day (scheduled program). This report fetches me the invoices generated on that day and needs to be Mailed / Faxed to the customers.
    So i developed the report in such a way that it generates the output order by customers...since the output generated will be as one .out file in APPLCSF/out directory...the .out file needs to be splitted by customers, for which i have written a cursor which takes the data of the main query and submits that many requests as many as customers are there.....There is a possibility of having 1000 customers per day also. If that is the case then my main program will fire that many requests.
    Is there a different approach......any inputs are highly appreciated.
    Also, i am generating the output in XML format. Is there a way from which i can directly generate a PDF from that XML output rather using any other tool.
    Thanks & Regards,
    Lakshmi Kalyan Vara Prasad.

    Hi,
    with Reports Bursting and the defined "distributions" it's possible to have one report splittet to several parts with different receipients. Have a look at http://download-uk.oracle.com/docs/cd/B14504_01/dl/bi/B13673_01/pbr_dist.htm.
    With xsl-fo it's possible to create pdf out of xml ... that's what xml publisher is doing.
    Regards
    Rainer

  • Generating and Viewing XML Output without rdf

    Howdy,
    I have been dev Oracle Forms/Reports for over 10 years. We are now migrating all of our reports to BIP.
    To date when I have been developing these reports I have been using the old rdf files to "generate to a file" and thus get a nice, quick and dirty XML output file (what I am calling a “datafile”). Using this makes it substantially easier to then dev the format template. However going forward I/we would like to completely remove the Designer 2000 tool entirely when it comes to report development.
    How can we as developers can get our hands on the XML "datafiles" that are generated by the data templates in BIP? Are these stored anywhere on the server for the viewing? Is there another tool I can pop my Data template and SQL into and generate XML ‘with’ the correct groupings, ect.?
    Thanks in advance for any assistance/guidance you can provide.
    ScottC

    Or, from the browser see Note:394631.1
    1.Using System Administrator responsibility
    Nav:Profile->System
    query Viewer: Text, set this to Browser and save
    2. Using your Receivables responsibility
    Run the the XML report that is failing, note the request_id
    when it finishes, even with errors do this,
    View->Requests
    query this request_id
    click on Diagnostic button->View XML
    save the file to your PC by doing File->Save As
    3. Upload this XML data file.

  • XSL gives a XML file without data

    I am using XSL to create a new XML file from a given XML file. The resulting XML file created contains no data!! Pls. tell me what is wrong or if I have omitted something.

    I am using XSL to create a new XML file from a given XML file. The resulting XML file created contains no data!! Pls. tell me what is wrong or if I have omitted something.

  • Generate a File XML in Forms with PL/SQL

    Hi Friends!
    I need to generate a file XML and validate it with a XSD schema!
    I see some ways to generate a file with a QUERY.
    But i cant generate a file with a Query because my datas existing in diferent tables and isn't possible to create in a query! I need to construct the XML step by step... creating the nodes and subnodes... setting values to the nodes and so on!
    I see a class java called by Marshall and i created a bean to generate XML but it is so slow even in a powered server!
    How can i do this in PL/SQL?????
    Somebody can help me!!

    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_xmldom.htm#sthref10098
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb10pls.htm#sthref1389
    Regards.

  • How to generate the following XML-Output?

    Hi all,
    I would like to generate the following XML-Output without defining any types or tables:
    <?xml version = '1.0'?>
    <DEPARTMENTS_EMPLOYEES>
    <DEPARTMENT NAME="ACCOUNTING">
    <DEPTNO>10</DEPTNO>
    <LOC>NEW YORK</LOC>
    <EMPLOYEES_OF_DEPARTMENT>
    <EMPNO>...</EMPNO>
    <ENAME>...</ENAME>
    </EMPLOYEES_OF_DEPARTMENT>
    </DEPARTMENT>
    <DEPARTMENT NAME="RESEARCH">
    <DEPTNO>20</DEPTNO>
    <LOC>DALLAS</LOC>
    <EMPLOYEES_OF_DEPARTMENT>
    </EMPLOYEES_OF_DEPARTMENT>
    </DEPARTMENT>
    </DEPARTMENTS_EMPLOYEES>
    Unfortunately the following SQL-Statement does not working:
    select xmlElement("DEPARTMENTS_EMPLOYEES",
    xmlAttributes(d.deptno as "DEPTNO"),
    xmlElement("DNAME", d.dname),
    xmlElement("LOC", d.loc),
    xmlElement("EMPLOYEES_OF_DEPARTMENT",
    (select xmlAgg(xmlElement("EMPLOYEE", xmlAttributes(e.empno as "EMPNO"), xmlForest(e.ename as "ENAME", e.job as "JOB", e.hiredate as "HIREDATE", e.sal as "SAL", e.comm as "COMM", m.empno as "MGRNO", m.ename as "MGRNAME" ) )
    from emp e, emp m
    where e.deptno = d.deptno
    and m.empno = e.mgr
    ) as XML
    from dept d;
    1. When I provide this statement with SQL*Plus
    (unfortunately 9.0.1.3.0) then I get the
    following output:
    XML()
    XMLTYPE()
    XMLTYPE()
    XMLTYPE()
    XMLTYPE()
    2. When I provide this statement with SQL Navigator
    4.3.0.456 then I get the following error:
    [1]: (Error): OCI-21560: argument 3 is null, invalid,
    or out of range
    3. When I execute the following PL/SQL-Code then I get
    the XML-Error message:
    DECLARE
    x CLOB;
    xmlstr VARCHAR2(32767);
    line VARCHAR2(2000);
    BEGIN
    x := dbms_xmlquery.getxml('select xmlElement("DEPARTMENT",
    xmlAttributes(d.deptno as "DEPTNO"),
    xmlElement("DNAME", d.dname),
    xmlElement("LOC", d.loc),
    xmlElement("EMPLOYEELIST",
    (select xmlAgg(xmlElement("EMPLOYEE",
    xmlAttributes(e.empno as "EMPNO"),
    xmlForest(e.ename as "ENAME",
    e.job as "JOB",
    e.hiredate as "HIREDATE",
    e.sal as "SAL",
    e.comm as "COMM",
    m.empno as "MGRNO",
    m.ename as "MGRNAME"
    from emp e, emp m
    where e.deptno = d.deptno
    and m.empno = e.mgr
    ) as XML
    from dept d');
    xmlstr := dbms_lob.SUBSTR(x,32767);
    LOOP
    EXIT WHEN xmlstr IS NULL;
    line := SUBSTR(xmlstr,1,INSTR(xmlstr,CHR(10))-1);
    DBMS_OUTPUT.PUT_LINE(line);
    xmlstr := SUBSTR(xmlstr,INSTR(xmlstr,CHR(10))+1);
    END LOOP;
    END;
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: Unimplemented Feature</ERROR>
    4. When I provide the following PL/SQL-Code then I get the same xml-error:
    DECLARE
    x CLOB;
    xmlstr VARCHAR2(32767);
    line VARCHAR2(2000);
    BEGIN
    x := dbms_xmlquery.getxml('select xmlElement("SYSDATE", xmlElement("Datum", to_char(sysdate,''DD.MM.YYYY'')),
    xmlElement("Zeit", to_char(sysdate,''HH24:MI:SS''))) as XML
    from dual');
    xmlstr := dbms_lob.SUBSTR(x,32767);
    LOOP
    EXIT WHEN xmlstr IS NULL;
    line := SUBSTR(xmlstr,1,INSTR(xmlstr,CHR(10))-1);
    DBMS_OUTPUT.PUT_LINE(line);
    xmlstr := SUBSTR(xmlstr,INSTR(xmlstr,CHR(10))+1);
    END LOOP;
    END;
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: Unimplemented Feature</ERROR>
    Can I generate the needed XML-Output from Database with SQL or PL/SQL?
    Can anybody help me?
    Regards
    Leonid Pavlov

    I have this done with:
    DECLARE
    qryCtx DBMS_XMLGEN.ctxHandle;
    result CLOB;
    xmlstr VARCHAR2(32767);
    line VARCHAR2(2000);
    BEGIN
    qryCtx := dbms_xmlquery.newContext('select deptno, dname, loc, cursor(select e.empno, e.ename, e.job,
    to_char(e.hiredate,''DD.MM.YYYY'') hiredate, e.sal, e.comm,
    m.empno MGRNO, m.ename MGRNAME
    from emp e, emp m
    where e.deptno = dept.deptno
    and m.empno(+) = e.mgr) emp
    from dept');
    dbms_xmlquery.useNullAttributeIndicator(qryCtx, FALSE);
    dbms_xmlquery.setRowsetTag(qryCtx, 'DEPARTMENTS_EMPLOYEES');
    dbms_xmlquery.setrowtag(qryCtx, 'DEPARTMENT');
    DBMS_XMLQuery.setRowIdAttrName(qryCtx, 'ID');
    DBMS_XMLQuery.setRowIdAttrValue(qryCtx, 'DEPTNO');
    -- dbms_xmlquery.setrowidattrname(qryCtx, NULL);
    result := dbms_xmlquery.getXML(qryCtx);
    DBMS_XMLQuery.closeContext(qryCtx);
    xmlstr := dbms_lob.SUBSTR(result,32767);
    LOOP
    EXIT WHEN xmlstr IS NULL;
    line := SUBSTR(xmlstr,1,INSTR(xmlstr,CHR(10))-1);
    DBMS_OUTPUT.PUT_LINE(line);
    xmlstr := SUBSTR(xmlstr,INSTR(xmlstr,CHR(10))+1);
    END LOOP;
    END;
    But how can I rename the <EMP>-Element to Employees?

  • Given WSDL, need to generate example request / response XML to give testers

    Without actually making the service calls I need to generate example XML request and response messages for each service in a given a WSDL.
    So far the only other tool that can do this is the Oxygen xml editor wsdl inspector. Not even XMLspy does this.
    Just wondering if my experimenting with Jdev 11.(latest) has missed a way to get this accomplished?
    tnx curt

    how about SoaPUI tool?

  • Random sound generated from external midi device even without a song opened... How to uninstall external control surfaces?

    Recently bought systems used :
         Roland FA-08 workstation
         Mixingtable with USB connection Yamaha MG12XU
         Mac Os X 10.9.4 Maverick with Logic Pro X 10.0.7
    for each system the latest usb-drivers are installed
    Problem :
    I get random noises generated (non-stop) from the connected synthesizer FA08 starting up Logic, even without a song opened.
    (My midi local is switched of, that's not the solution)
    The problem started (i think) installing the Mackie control for the DAW use as was suggested by the Roland manual
    in Logic Pro X > Control Surfaces > setup...
    Other than my remote control i now have Mackie controllers that i can not remove from the setup. Right click says 'delete' but
    they are not deleted, the program even crashed once. Reinstalling Logic does not remove them either.
    I read somewhere that there should be a 'controller rebuild'-command but that doesn't seem to exist.
    And i have no idea why in the 'inspector', the host of the Mackie Control seems to be my I-pad (?)
    I suspect that te problem is either some midi/usb driver conflict when used with Mavericks
    or te use of the mackie controller conflicting with
    the audio-bord of the yamaha mixing console MG 12XU (which seems to be working fine) or with the DAW controller of the FA 08
    Audio/Midi setup of my computer seems to be installed correctly.
    How can i uninstall this controller settings ?
    Anyone has an idea why i get random noise generated?
    Anyhow, it is impossible working with Logic this way..
    Please help..

    In case you need to get back the default Logic control surface setup you can delete the Control Surface preference file and the default file will be rebuilt. It's a good way to get back to Logic's initial control surface setting. Also, if you had chosen to edit the Logic Remote CS entry instead of remove it there are adjustments that can be made, like disabling Active Sensing, or even disabling "Flash Mute and Solo Buttons" on the basic Control Surface Preferences pane.
    Deleting the Logic 10 Control Surface Prefs.
    In the Finder, choose Go > Go to Folder from the menu.
    Type ~/Library/Preferences  in the "Go to the folder" field.
    Press the Go button.
    Delete the com.apple.logic.pro.cs file from the preferences folder.
    Note: to get to the User-Library the tilde ~ has to be included.        ~/Library/Preferences

  • To generate planned orders throught MRP even without forecast/sales orders

    Goor morning, we should send long term plan forecast to the suppliers, but in the system we're able to see just few weeks demand (lng term horizon is not still implemented). Do you think is possible to generate some planned order as MTS policy (based on the past consumption), even without any sales order or forecast inside the system? Tks in advance

    1) create a Plan IN MD61 with inactive version select the period as you want & enter  W- week in initial screen
    2) create a plan In MS31 and assign the created in active version plan in MS32 assign the plant and activate  independent requirement
    3) Run MRP in MS01, system will create a plan order for LTP
    4) and do the evaluation for created plan order in MS38.

  • Need to generate XML based on Data template

    Hi,
    I'm unable to submit (the second submit) my request using the demo links (XDO 5.6.3 or XDO 5.7) provided in http://bipublisher.us.oracle.com/?tab=samples&header=dataTemplate to generate the XML based on the data template.
    Heard that these links are available for Oracle EBS internal use. I work with EBS-CRM. I need to generate XML based on a data template and use the XML in the template. Data template has two queries for a template.
    Pls help.
    Thanks,
    Impha

    Impha
    Please use the internal mailing list for your questions the forum is meant for external customers. If you do not know the ML name - drop me a mail
    Tim

  • Why do v need 2 generate new smartform from scratch when v have a standard

    hi experts
    why do v need 2 generate new smartform from scratch when v have so many standard smartforms can any one explain in detail the scenario where v have 2 do that
    thanks
    bhanu

    Hello Bhanu,
    Standard smartforms are for standard SAP applications.
    Every client will customise standard SAP to suit their own requirements. So if there is a requirement specific to the cleint, they can ask us to develop a custom Smartform.
    Award points if found useful.
    Regards
    Indrajit.

  • ADF Task Flow Binding - Refresh ifNeeded being invoked even WITHOUT any Parameter change

    Using JDeveloper 11.1.1.6.0
    Issue: Task Flow Binding property "refresh = ifNeeded" seems to be triggered even without the mutation of the input parameter.
    As per definition, "ifNeeded: refresh the ADF Region if the value of a task flow binding parameter changes." (Reference: 17.5 Refreshing an ADF Region)
    Now for the setup which reproduces the issue.
    I'll focus at the fragment bounded task flow level and will skip the jspx side.
    taskflow: main-flow.xml
    contains a single fragment mainFgmt.jsff
    has a managed bean defined SampleBean.java as pageFlow scope.
    taskflow: sub-flow.xml
    contains a single fragment subFgmt.jsff
    has an inputParameter SampleBean.java (because it is an input parameter, by default it will be at pageFlow scope)
    !important - has a nested taskflow (task flow call as defined in the component pallete) called inner-flow (see below)
    the nested taskflow is the default activity
    the nested taskflow has an outcome pointing to subFgmt where outcome = "return"
    taskflow: inner-flow.xml
    contains a single fragment called stop.jsff
    has a return activity without outcome = "return"
    stop.jsff has a navigation pointing to the outcome.
    Finally mainFgmt.jsff has a task flow binding (pageDef)
    with id = "sub-flow.xml"
    refresh = "ifNeeded"
    parameter SampleBean being submitted as sub-flow's input parameter. (id=sampleBean, value=#{pageFlowScope.mainSampleBean})
    Assume that code compiles.
    In this scenario where the only tricky condition is the inner nesting (defined by !important), when the inner nesting decides to invoke its outcome to visit sub-flow's fragment, mainFgmt is restarting its taskflow which makes sub-flow start over again.
    Another way of saying it is, if sub-flow starts a nested activity and that nested activity exits out to utilize sub-flow's view. The high level definition which is mainFgmt's refresh ifNeeded is restarting sub-flow.
    In the above example if you notice, the bean (SampleBean) is not really being utilized except that it is completing the purpose of refresh=ifNeeded. This scenario is only to simplify the setup - in practical use this bean will be mutated to be utilized as a refresh mechanism.
    Now interestingly, if I change the pattern a bit then the issue will not happen:
    Don't use the nested taskflow (inner-flow) as the default activity, let a fragment of sub-flow hold the initial view.
    Navigate to the nested flow.
    Exit nested flow.
    Everything works.
    Now in this scenario, it seems like the sub-flow needs to have a view established first for it to be properly be used.
    So my questions are as follows:
    Can I consider the behavior of the refresh=ifNeeded as a bug in this usecase?
    Would it be better to utilize a different way of refreshing (maybe combination of refresh condition) to get around the issue?
    Is the use of the task flow as defined logical or does it cross any boundary or best practice that might be causing this behavior?

    Hi,
    actually you lost me in your description due to complexity. I lived under assumption that sub-flow already is a region on a view in main flow, but then you sad that
    "!important - has a nested taskflow (task flow call as defined in the component pallete) called inner-flow (see below)"
    which then confused me as to I have no idea if inner flow now is the second level nesting or first level nesting (should be second level nesting). If sub-flow is a region then having "has an inputParameter SampleBean.java (because it is an input parameter, by default it will be at pageFlow scope)"  is an unnecessary broad scope because the region wont live longer than view scope.
    Anyway, it seems that a region refresh is triggered by the lifecycle involved, which can be by design or a bug. I suggest you file a Service Request with support and provide a test case as purely from the description, its hard to parse and understand what is going on.
    Frank

  • XML message without encoding type

    Hi,
    Is there any possibility to generate the XML file without encoding?
    Should convert  <?xml version="1.0"; encoding="UTF-8"?> to <?xml version="1.0";?>. I have checked the blog and the answer was either Java mapping or XSLT mapping. Is it possible to handle in graphical mapping?
    I am using the AS2 adapter to send the file to customer and External defination for the target message. Below are few information on the AS2 configuration:
    Signing Algorithm: SHA-1
    Encryption: 3DES
    Your suggestion is highly appreciated.
    Regards,
    Vasantha

    HI Vasantha,
        It is not possible with Graphical Mapping you need to go either with JAVA or XSLT mapping.
    /people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
    Cheers!!!
    Naveen

Maybe you are looking for