XPath in BPM switch

Hi,
I'm trying to use a switch in an integration process that relies on XPath for the switching logic and I am having some difficulties getting it to work.
I've tested the following and it is a valid XPath statement, but does not seem to work as I would expect in XI
/p1:BAPI_EQUI_GETDETAIL.Response/DATA_GENERAL_EXP[number(translate(READ_CRDAT, "-", ""))>=20010101]
This should return a node and if the string in READ_CRDAT is greater than 2001-01-01 and thus satisfy the EX condition. However, all of the records are rejected even though there are number of test cases that should pass.
What type should I specify in the expression editor for the XPath? Can you use the number() and translate() functions in XI? Is there a length limit to XPath expressions? Are there other known issues that prevent this kind of logical comparison?
TIA for your help.
Rob

Hey,
In the source structure is the the string of the format 2001-01-01 ? Then probably you can use this deine a constant of type string and the value 2001-01-01.
Then for the xpath expression
/p1:BAPI_EQUI_GETDETAIL.Response/DATA_GENERAL_EXP[number(translate(READ_CRDAT, "-", ""))>=constant]
or you can try this one for the existing condition.
/p1:BAPI_EQUI_GETDETAIL.Response/DATA_GENERAL_EXP[number(translate(READ_CRDAT, "-", ""))>=2001-01-01]
Give it a shot.
Cheers
<b>*RAJ*
*REWARD POINTS IF FOUND USEFULL*</b>
XPath in BPM switch
Posted: Jul 18, 2007 4:54 AM 
Hi,
I'm trying to use a switch in an integration process that relies on XPath for the switching logic and I am having some difficulties getting it to work.
I've tested the following and it is a valid XPath statement, but does not seem to work as I would expect in XI
/p1:BAPI_EQUI_GETDETAIL.Response/DATA_GENERAL_EXP[number(translate(READ_CRDAT, "-", ""))>=20010101]

Similar Messages

  • BPM: XPath-Condition in Switch Step

    Hello,
    I have the following requirement in BPM.
    There is a switch step with five branches, and I have the following document structure:
    <Root>
    <Segment>
       <Docnum> 12345 </Docnum>
    </Segment>
    <Segment>
       <Docnum> 12346 </Docnum>
    </Segment>
    </Root>
    The switch condition is done based on the last digit of the first Docnum element. So in this case the value would be 5.
    I tried to work with a substring as the total number of digits of docnum is always 5.
    How would an XPath expression look like to retrieve the substring from the first <Segment> element? I tried different combinations but none of them really worked.
    Example what I tried: p1:/root/Segment[1]/substring(docnum, 4,1)
    Any advise on this?
    Thank you very much

    Try this...
    substring(/p1:/root/Segment[1]/docnum,4,1)
    for more info see
    http://www.w3.org/TR/xpath
    Message was edited by:
            Alex

  • BPM switch condition xPath

    All,
    Inside the BPM there is a switch condition -
    which checks whether ( InXML\Item1\Key = "COMPNAME" AND InXML\Item1\Value="HRB" ) - if this condition is true, then it sends the whole xml to a particular receiver.
    For this condition to work - does the Item1 node (with COMPNAME key value) be first? Currently we are getting it in random places within the Item1 nodes.
    Sample Input message -
    <InXML>
    <Item1>
    <Key>CODE</Key>
    <Value>CC</Value>
    </Item1>
    <Item1>
    <Key>COMPNAME</Key>
    <Value>HRB</Value>
    </Item1>
    <Item1>
    <Key>REGSTATUS</Key>
    <Value>Y</Value>
    </Item1>
    <Item1>
    <Key></Key>
    <Value></Value>
    </Item1>
    </InXML>
    Thanks.

    I think my initial question is not clear... let me rephrase it.
    In the following XML there are 4 Item1 nodes. Does the one that is bold (this is the one that will satisfy the condition), need to be the first in the 4 or will it work immaterial of the position within the Item1 node collection?
    <InXML>
    <Item1>
    <Key>CODE</Key>
    <Value>CC</Value>
    </Item1>
    <Item1>
    <Key>COMPNAME</Key>
    <Value>HRB</Value>
    </Item1>
    <Item1>
    <Key>REGSTATUS</Key>
    <Value>Y</Value>
    </Item1>
    <Item1>
    <Key></Key>
    <Value></Value>
    </Item1>
    </InXML>

  • BPM switch gives error.

    Hello everyone.
    I have a BPM scenario where I use a switch. Based on content in the received message I would like to either perform a transformation or cancel the process.
    But whenever I activate my scenario and look in SXI_CACHE, the BPM scenario shows error 99. Looking further into the error, it displays this message: 'VALIDFORARCHVING' is not a component of data object 'PAYLOAD'
    Currently I'm checking the value through a context object, but I've also tried checking it with XPATH and through a BPM variable. Still I've got the same problem.
    What am I missing in my setup?
    Best regards,
    Jacob

    This is a KNown issue with SP14...
    Are you on SP14.. ?
    Pls apply this OSS note..
    Thnaks,
    Renjith
    sorry here is the note number...890760
    Message was edited by: Renjith Andrews

  • Xpath in BPM correlation. Have to pass only few characters of a field in co

    Hi All,
    Header file:
    MDk-111;1728;175;02.09.11;781961.09;0.00;0.00;781961.09;;;;;;;;;0
    MDk-112;8574;175;02.09.11;4462;1112;104098800;104102150;;;;;;;;;2
    MDk-113;1729;175;02.09.11;781962.09;0.00;0.00;781961.09;;;;;;;;;0
    MDk-114;8575;175;02.09.11;781963.09;0.00;0.00;781961.09;;;;;;;;;0
    Detail file:
    MDk-112;8574;175;02.09.11;;DEBIT;;;;;-1112;;0;02.09.11;;;;20555;;;037;
    MDk-112;8574;175;02.09.11;;CREDIT;;;;;104098800;;0;02.09.11;;;;;;;099;
    - I have to merge header and detail records into one target structure..
    - For the records which doesn't consists of detail records should pass only header record. ex: MDk-113
    - To merge the both the files, im using BPM with correlation.
    The correlation which i need to use in BPM is the first record in both the files "MDk-XXX" where XXX is the number which may or may not match in both the files.. So i need to pass only first four characters of the first filed in the correlation ie. "MDK-".
    After file content conversion, the input xml payload will be as below
    <Code>MDK-112</bankCode>
    How can I pass only first four characters of this field ("MDK-") in Xpath in the correlation tab?
    Kindly suggest.
    Thanks
    Deepthi

    Hi Deepthi,
    You can send the substring of the Code value. This is explained in the following WIKI, have a look at this.
    http://wiki.sdn.sap.com/wiki/display/XI/XpathConditioninReceiverDetermination
    regards
    Ramesh

  • BPM- Switch Condition ?

    Hi All,
    I have a question regarding the usage of Switch condition (Like Option) in BPM.
    For Example I want to give a condition such that I should pass all the messages starting with 'J' followed by any letter.
    Thanks in advance

    The Operator that you are talking about is the Contains Pattern...
    Have your Left Operand the node that you have to impose the condition on
    Middle Operand as the Contains Pattern
    Right Operand as Constant and it should be
    * J  (or J* )
    just check it not quite sure......dont have an access to 7.0 right now
    Check with this
    For more info refer: http://help.sap.com/saphelp_nw70/helpdata/en/67/49767669963545a071a190b77a9a23/content.htm
    Regards,
    Abhishek.
    Edited by: abhishek salvi on Jul 29, 2009 9:38 AM

  • Splitting Message using BPM

    hi,
    I am not able to see the split in BPM when using SWITCH.
    Scenario: IDOC->XI->Multiple Receivers with error handling using BPM
    In BPM SWITCH i have 2 steps.
    1st branch step has Transformation0, Receiver Determination0 and Send0
    2nd branch step has Transformation1, Receiver Determination1 and Send1
    Receivers will be differnt. Container elements have 2 receivers for Receiver0 and Receiver1
    When the IDOC is triggered i can see only one message in SXMB_MONI.
    I don't see any failure steps in SXMB_MONI_BPE.
    In the ID, i have 2 receivers configured.
    Why aren't the messages being processed?
    Thanks,
    Tirumal

    Hi Tirumal,
    Switch is condtional step. It is not for Split. It is like If-Else condition. If you want to split the messages in the same time, then go for Fork step.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/24/e2283f2bbad036e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/6a/db283fd0ca8443e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/14/d5283fd0ca8443e10000000a114084/frameset.htm
    Hope this helps,
    regards,
    Moorthy

  • Throw exception in Java mapping and handle this in BPM

    Hi,
    I'll use a Java mapping in a BPM transform step. Is it possible to throw an exception inside this Java mapping and handle this in a BPM exception handler?
    thanks and regards
    Verena

    Hi Verena,
    In a BPM transformation step, I think you can throw exceptions only for system errors.
    Let me explain with an example, one of the ways to handle your scenario:
    Lets assume your Java Mapping fails then you can trap that exception in your Java mapping and compose an XML message which indicates that an error has occurred.
    say for e.g.
    <intermediateStructure>
    <SatusDocument>
    <StatusCode>ERROR</StatusCode>
    <ErrCode>123</ErrCode>
    <ErrDesc><!populate the thrown exception details></ErrDesc>
    </StatusDocument>
    <Payload>
    <!contains actual XML message with data>
    </Payload>
    </intermediateStructure>
    if Java mapping is Successful, you can compose the XML message as follows:
    <intermediateStructure>
    <SatusDocument>
    <StatusCode>SUCCESS</StatusCode>
    <ErrCode>0</ErrCode>
    <ErrDesc></ErrDesc>
    </StatusDocument>
    <Payload>
    <!contains actual XML message with data>
    </Payload>
    </intermediateStructure>
    You can use BPM switch operation to switch to different processing branches say for e.g. "error" branch or "success" branch by examining the value of <StatusCode> tag.
    Hope it helps !
    Regards,
    Sridhar

  • BPM  & Message monitoring

    Currently
    My scenario  : File to XI to IDOC
    Based on the Employeenumber in the File I need to Group them as IDOC and then I need to send to the R/3 for further processing. This has been acheived with a simple BPM and its working fine now. I am hardcoding in the Message type in the Message Mapping.
    Sender Adapter : File and Receiver Adapter IDOC
    XI 3.0, SP 14
    In Future
    I have 3 Files from 3 vendors (3 Message types) , but they are mapped to the same IDOC.(1 IDOC)
    Whether it is possible to know from which vendor we have received the file? If so How should I do that? (No Header record in the file says its from which Vendor!!!)
    But these 3 files are stored in 3 different locations in the server.
    If I can determine from which vendor the data has arrived, with simple BPM switch step I can branch the control and further necessary actions I can perfrom.
    Please assist me. If you need any further info keep me informed.
    Thanks

    I Created the Userdefined Function. Sending a constant as an input and getting the result in a target field.
    I got the following error
    Source code has syntax error:  /usr/sapDX1/DX1/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map578a9c7066b011dab462f6f8a000f002/source/com/sap/xi/tf/_AFLAC_IDOC_MM_.java:231: <identifier> expected public String FileName$(String ,Container container){ ^ /usr/sapDX1/DX1/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map578a9c7066b011dab462f6f8a000f002/source/com/sap/xi/tf/_AFLAC_IDOC_MM_.java:260: ')' expected } ^ 2 errors  Source code has syntax error:  /usr/sapDX1/DX1/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map578a9c7066b011dab462f6f8a000f002/source/com/sap/xi/tf/_AFLAC_IDOC_MM_.java:231: <identifier> expected public String FileName$(String ,Container container){ ^ /usr/sapDX1/DX1/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map578a9c7066b011dab462f6f8a000f002/source/com/sap/xi/tf/_AFLAC_IDOC_MM_.java:260: ')' expected } ^ 2 errors

  • How to Throw/Catch Exceptions in BPM

    Hi All,
    I've seen a couple articles that talk about how to Throw/Catch an execption in a BPM. My question has two parts:
    1) RFC Call: I was able to catch an Fault Message in an exception step when calling an RFC (Synchronous Interface). What I wanted to do is use the fault message (exception) and store it in a DB for later review.
    2) IDOC: I'm sending an IDOC to R3 from a BPM. The send step is enclosed in a block w/ an exception. The send step is throwing an error (IDOC adpater system error), but the exception is never thrown. My question is: when the error occurrs at the adapter level does it still throw an exception in a BPM?
    Thanks for any tip/advice/anything!
    Fernando.

    Hi Fernando,
    1) Define a send step in the exception branch.
    2) If u send a IDoc from R/3 to XI and the IDoc adapter is running to an error of course there cant be an exception in ur business process. Usually the IDoc adapter sends back status back up via ALEAUD. In case of success IDoc should have then '03', if the adapter cannot send anything the IDoc should remain at '39'. U should send a ALEAUD in case of exception of BPM switching to status '40', in case of success to '41'.
    Regards, Udo

  • Problem with BPM fix

    We all know about the BPM switch fix for finding and removing dead entries from iTunes, but I have encountered a (big) problem with this. Actually, two problems, one big, and one slightly smaller:
    1. As anyone who has done this knows, it takes quite a while to write the new information to all your files, especially if you have a lot (I have 5000 songs).
    2. The bigger problem is that once you do this, syncing with you iPod takes over an hour, because every file has to be replaced.
    I don't understand why iTunes can't just let show you a list of all the files that it can't find, instead of having to use a ghetto workaround like the BPM switch. If anyone has any OTHER workaround that doesn't cause this to happen, please let me know...I'll be here for a while as I wait for my ipod to finish updating....

    I don't know what the "BPM Fix" is, but my fix for removing for finding dead entries is much simpler.
    Download one of these scripts:
    http://otto.homedns.org/itunes/RemoveDeadTracks.txt
    http://otto.homedns.org/itunes/FindDeadTracks.txt
    Save them to your hard drive and rename them to have a ".js" extension.
    While iTunes is running, double click one of them to run them. The Remove one will remove all dead tracks from your library. The Find one will just create a text file with the names of these tracks instead.
    "Dead tracks" being anything that will have a ! beside it in iTunes.
    *The RemoveDeadTracks script is the same one included in Apple's iTunes COM SDK. It's unmodified.
    *The FindDeadTracks script is my modified version of same.

  • How to use contains() function in bpel?

    Hi
    Am facing a problem in using contains() function in a switch case... my condition inside a switch case is contains(bpws:getVariableData('singleSIS'),bpws:getVariableData('singleSIS_check')) where the variable 'singleSIS' has a value 'ABCDE' and 'singleSIS_check' has a value 'ABCDE' ... Ideally this condition should return true,but its not happening..Can someone tell me what is the issue with this ?
    P.S both the variables are of string type. Please help me with this..

    Sure:
    <?xml version = "1.0" encoding = "UTF-8" ?>
    <!--
    Oracle JDeveloper BPEL Designer
    Created: Fri Apr 06 12:41:59 IDT 2012
    Author: DELL
    Purpose: Asynchronous BPEL Process
    -->
    <process name="BPELProcess1"
    targetNamespace="http://xmlns.oracle.com/SodaDev_jws/Project4/BPELProcess1"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:client="http://xmlns.oracle.com/SodaDev_jws/Project4/BPELProcess1"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
    xmlns:bpel2="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:med="http://schemas.oracle.com/mediator/xpath"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:bpmn="http://schemas.oracle.com/bpm/xpath"
    xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap">
    <!--
    PARTNERLINKS
    List of services participating in this BPEL process
    -->
    <partnerLinks>
    <!--
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="bpelprocess1_client" partnerLinkType="client:BPELProcess1" myRole="BPELProcess1Provider" partnerRole="BPELProcess1Requester"/>
    </partnerLinks>
    <!--
    VARIABLES
    List of messages and XML documents used within this BPEL process
    -->
    <variables>
    <!-- Reference to the message passed as input during initiation -->
    <variable name="inputVariable" messageType="client:BPELProcess1RequestMessage"/>
    <!-- Reference to the message that will be sent back to the requester during callback -->
    <variable name="outputVariable" messageType="client:BPELProcess1ResponseMessage"/>
    </variables>
    <!--
    ORCHESTRATION LOGIC
    Set of activities coordinating the flow of messages across the
    services integrated within this business process
    -->
    <sequence name="main">
    <!-- Receive input from requestor. (Note: This maps to operation defined in BPELProcess1.wsdl) -->
    <receive name="receiveInput" partnerLink="bpelprocess1_client" portType="client:BPELProcess1" operation="process" variable="inputVariable" createInstance="yes"/>
    <!--
    Asynchronous callback to the requester. (Note: the callback location and correlation id is transparently handled using WS-addressing.)
    -->
    <switch name="Switch_1">
    <case condition="contains(bpws:getVariableData('inputVariable','payload','/client:process/client:input'), 'ABCDE' )">
    <empty name="Empty_1"/>
    </case>
    <otherwise>
    <sequence>
    <empty name="Empty_2"/>
    <empty name="Empty_3"/>
    </sequence>
    </otherwise>
    </switch>
    <invoke name="callbackClient" partnerLink="bpelprocess1_client" portType="client:BPELProcess1Callback" operation="processResponse" inputVariable="outputVariable"/>
    </sequence>
    </process>

  • Error while handling faults

    Hi ,
    1.)I have imported fault-policies.xml and fault-bindings.xml into my project
    2.)RuntimeFault.wsdl also has got imported in my project .
    Inspite of that while deploying i get the following error :
    Error(101): unresolved message Type
    WSDL messageType "{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage" of variable "FaultVarUpdate" is not defined in any of the WSDL files
    Make sure the WSDL messageType "{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage" is defined in one of the WSDLs referenced by the deployment descriptor.
    What has to be done for this error ?
    Regards,
    Sasmit
    Edited by: 860942 on May 24, 2011 1:37 AM

    <?xml version = "1.0" encoding = "UTF-8" ?>
    <process name="MF0901T"
    targetNamespace="http://xmlns.oracle.com/JDEMasterData_jws/F0901T/MF0901T"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:client="http://xmlns.oracle.com/JDEMasterData_jws/F0901T/MF0901T"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/JDEMasterData/F0901T/ReceiveF0901TXeData"
    xmlns:ns2="http://xmlns.oracle.com/pcbpel/adapter/db/JDEMasterData/F0901T/InsertJDE90F0901"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:mhdr="http://www.oracle.com/XSL/Transform /java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
    xmlns:bpel2="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:med="http://schemas.oracle.com/mediator/xpath"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:ns3="http://xmlns.oracle.com/pcbpel/adapter/db/top/ReceiveF0901TXeData"
    xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:ns4="http://xmlns.oracle.com/pcbpel/adapter/db/JDEMasterData/F0901T/UpdateJDE90F0901"
    xmlns:ns5="http://xmlns.oracle.com/JDEMasterData_jws/DefaultExceptionEmail/ExceptionEmailBPEL"
    xmlns:ns6="http://trekbikes.com/exceptionemail"
    xmlns:ns7="http://xmlns.oracle.com/pcbpel/adapter/db/top/InsertJDE90F0901">
    <partnerLinks>
    <partnerLink myRole="ReceiveF0901TXeData_role" name="ReceiveF0901TXeData"
    partnerLinkType="ns1:ReceiveF0901TXeData_plt"/>
    <partnerLink name="InsertJDE90F0901" partnerRole="InsertJDE90F0901_role"
    partnerLinkType="ns2:InsertJDE90F0901_plt"/>
    <partnerLink name="UpdateJDE90F0901" partnerRole="UpdateJDE90F0901_role"
    partnerLinkType="ns4:UpdateJDE90F0901_plt"/>
    <partnerLink name="DefaultEmailException"
    partnerRole="ExceptionEmailBPELProvider"
    partnerLinkType="ns5:ExceptionEmailBPEL"/>
    </partnerLinks>
    <variables>
    <variable name="Receive_F0901TXeData_receive_InputVariable"
    messageType="ns1:F0901TCollection_msg"/>
    </variables>
    <sequence name="main">
    <!-- Receive input from requestor. (Note: This maps to operation defined in MF0901T.wsdl) -->
    <receive name="Receive_F0901TXeData"
    variable="Receive_F0901TXeData_receive_InputVariable" createInstance="yes"
    partnerLink="ReceiveF0901TXeData"
    portType="ns1:ReceiveF0901TXeData_ptt" operation="receive"/>
    <scope name="Scope_1">
    <switch name="Switch_1">
    <case condition="bpws:getVariableData('Receive_F0901TXeData_receive_InputVariable','F0901TCollection','/ns3:F0901TCollection/ns3:F0901T/ns3:entryType') = 'UP'">
    <bpelx:annotation>
    <bpelx:general>
    <bpelx:property name="userLabel">UpdateJDE90F0901</bpelx:property>
    </bpelx:general>
    </bpelx:annotation>
    <scope name="Scope_3">
    <bpelx:annotation>
    <bpelx:general>
    <bpelx:property name="userLabel">Scope_UpdateJDE90F0901</bpelx:property>
    </bpelx:general>
    </bpelx:annotation>
    <variables>
    <variable name="Invoke_JDE90F0901_update_InputVariable"
    messageType="ns4:F0901Collection_msg"/>
    <variable name="FaultVarUpdate"
    messageType="bpelx:RuntimeFaultMessage"/>
    <variable name="Invoke_UpdateJDE90F0901T_process_InputVariable"
    messageType="ns5:ExceptionEmailBPELRequestMessage"/>
    </variables>
    <faultHandlers>
    <catch faultName="bpelx:bindingFault"
    faultVariable="FaultVarUpdate">
    <sequence>
    <assign name="Assign_UpdateDefaultException">
    <copy>
    <from variable="FaultVarUpdate" part="summary"/>
    <to variable="Invoke_UpdateJDE90F0901T_process_InputVariable"
    part="payload"
    query="/ns6:emailDetails/ns6:exceptionDetails/ns6:summary"/>
    </copy>
    <copy>
    <from variable="FaultVarUpdate" part="detail"/>
    <to variable="Invoke_UpdateJDE90F0901T_process_InputVariable"
    part="payload"
    query="/ns6:emailDetails/ns6:exceptionDetails/ns6:details"/>
    </copy>
    <copy>
    <from variable="FaultVarUpdate" part="code"/>
    <to variable="Invoke_UpdateJDE90F0901T_process_InputVariable"
    part="payload"
    query="/ns6:emailDetails/ns6:exceptionDetails/ns6:code"/>
    </copy>
    </assign>
    <invoke name="Invoke_UpdateJDE90F0901T"
    inputVariable="Invoke_UpdateJDE90F0901T_process_InputVariable"
    partnerLink="DefaultEmailException"
    portType="ns5:ExceptionEmailBPEL"
    operation="process"/>
    </sequence>
    </catch>
    </faultHandlers>
    <sequence name="Sequence_2">
    <assign name="Transform_2">
    <bpelx:annotation>
    <bpelx:pattern>transformation</bpelx:pattern>
    </bpelx:annotation>
    <copy>
    <from expression="ora:processXSLT('xsl/Transformation_2.xsl',bpws:getVariableData('Receive_F0901TXeData_receive_InputVariable','F0901TCollection'))"/>
    <to variable="Invoke_JDE90F0901_update_InputVariable"
    part="F0901Collection"/>
    </copy>
    </assign>
    <invoke name="Invoke_JDE90F0901"
    inputVariable="Invoke_JDE90F0901_update_InputVariable"
    partnerLink="UpdateJDE90F0901"
    portType="ns4:UpdateJDE90F0901_ptt" operation="update"/>
    </sequence>
    </scope>
    </case>
    <case condition="bpws:getVariableData('Receive_F0901TXeData_receive_InputVariable','F0901TCollection','/ns3:F0901TCollection/ns3:F0901T/ns3:entryType')='PX' or bpws:getVariableData('Receive_F0901TXeData_receive_InputVariable','F0901TCollection','/ns3:F0901TCollection/ns3:F0901T/ns3:entryType')='PT'">
    <bpelx:annotation>
    <bpelx:general>
    <bpelx:property name="userLabel">InsertJDE90F0901</bpelx:property>
    </bpelx:general>
    </bpelx:annotation>
    <scope name="Scope_2">
    <bpelx:annotation>
    <bpelx:general>
    <bpelx:property name="userLabel">Scope_InsertJDE90F0901</bpelx:property>
    </bpelx:general>
    </bpelx:annotation>
    <variables>
    <variable name="Invoke_InsertJDE90F0901_insert_InputVariable"
    messageType="ns2:F0901Collection_msg"/>
    </variables>
    <faultHandlers/>
    <sequence name="Sequence_1">
    <assign name="Transform_1">
    <bpelx:annotation>
    <bpelx:pattern>transformation</bpelx:pattern>
    </bpelx:annotation>
    <copy>
    <from expression="ora:processXSLT('xsl/Transformation_1.xsl',bpws:getVariableData('Receive_F0901TXeData_receive_InputVariable','F0901TCollection'))"/>
    <to variable="Invoke_InsertJDE90F0901_insert_InputVariable"
    part="F0901Collection"/>
    </copy>
    </assign>
    <invoke name="Invoke_InsertJDE90F0901"
    inputVariable="Invoke_InsertJDE90F0901_insert_InputVariable"
    partnerLink="InsertJDE90F0901"
    portType="ns2:InsertJDE90F0901_ptt" operation="insert"/>
    </sequence>
    </scope>
    </case>
    <otherwise>
    <empty name="Empty_1"/>
    </otherwise>
    </switch>
    </scope>
    </sequence>
    </process>

  • Issue with reading a xml file from xsl

    Hi,
    When I am trying to read a xml file from xsl, I am getting unwanted output.
    Following is the XSL:
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
      <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
      <mapSources>
        <source type="XSD">
          <schema location="../xsd/B2BMarketProperties.xsd"/>
          <rootElement name="ReceipentIDType" namespace="http://www.example.org"/>
        </source>
      </mapSources>
      <mapTargets>
        <target type="XSD">
          <schema location="../xsd/B2BMarketProperties.xsd"/>
          <rootElement name="ReceipentIDType" namespace="http://www.example.org"/>
        </target>
      </mapTargets>
      <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.4.0(build 110106.1932.5682) AT [TUE DEC 03 16:06:03 EST 2013]. -->
    ?>
    <xsl:stylesheet version="1.0"
                    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
                    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
                    xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
                    xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
                    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xmlns:ns0="http://www.example.org"
                    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
                    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:med="http://schemas.oracle.com/mediator/xpath"
                    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
                    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
                    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
                    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
                    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                    xmlns:ora="http://schemas.oracle.com/xpath/extension"
                    xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
                    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
                    exclude-result-prefixes="xsi xsl ns0 xsd bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref ora socket ldap">
      <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
      <xsl:variable name="ReceipentID" select="document('../xsd/B2BMarketProperties.xml')"/>
      <xsl:template match="/">
        <ns0:ReceipentIDType>
        <xsl:for-each select="$ReceipentID">
          <ns0:ReceipentID>
            <xsl:value-of select="$ReceipentID"/>
          </ns0:ReceipentID>
          </xsl:for-each>
        </ns0:ReceipentIDType>
      </xsl:template>
    </xsl:stylesheet>
    Following is the XML ( B2BMarketProperties.xml)
    <?xml version="1.0" encoding="UTF-8" ?>
    <ReceipentIDType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="http://www.example.org B2BMarketProperties.xsd"
                     xmlns="http://www.example.org">
      <ReceipentID>123</ReceipentID>
      <ReceipentID>345</ReceipentID>
    </ReceipentIDType>
    The output i am getting with this code is
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:ReceipentIDType xmlns:ns0="http://www.example.org">
        <ns0:ReceipentID>123345</ns0:ReceipentID>
    </ns0:ReceipentIDType>
    But, I need output in the following format
    <ns0:ReceipentIDType xmlns:ns0="http://www.example.org">
        <ns0:ReceipentID>123</ns0:ReceipentID>
         <ns0:ReceipentID>345</ns0:ReceipentID>
    </ns0:ReceipentIDType>
    Could you guys let me know what i am doing wrong. Any help would be appreciated.
    Thanks,

    This worked for me :
      <xsl:template match="/">
        <ns0:ReceipentIDType>
          <xsl:for-each select="document('B2BMarketProperties.xml')/*:ReceipentIDType/*:ReceipentID">
            <xsl:variable name="count" select="position()"/>
            <ns0:ReceipentID>
              <xsl:value-of select="document('B2BMarketProperties.xml')/*:ReceipentIDType/*:ReceipentID[$count]"/>
            </ns0:ReceipentID>
          </xsl:for-each>
        </ns0:ReceipentIDType>
      </xsl:template>

  • ORABPEL-01005 class path is set correctly while deploying a BPEL composite.

    07:20:08 AM Received HTTP response from the server, response code=500
    07:20:08 AM Error deploying archive sca_HelloSoa1_rev1.0.jar to partition "default" on server soa_server1 http://slc01mrt.us.oracle.com:8001
    07:20:08 AM HTTP error code returned 500
    07:20:08 AM Error message from server:
    There was an error deploying the composite on soa_server1: Deployment Failed: Error occurred during deployment of component: HelloSoa1 to service engine: implementation.bpel, for composite: HelloSoa1: ORABPEL-01005
    Failed to compile bpel generated classes.
    failure to compile the generated BPEL classes for BPEL process "HelloSoa1" of composite "default/HelloSoa1!1.0*soa_3764b7a8-b2ca-43ba-a289-1f8e281a50bc"
    The class path setting is incorrect.
    Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version.
    07:20:08 AM Check server log for more details.
    07:20:08 AM Error deploying archive sca_HelloSoa1_rev1.0.jar to partition "default" on server soa_server1 http://slc01mrt.us.oracle.com:8001
    07:20:08 AM #### Deployment incomplete. ####
    07:20:08 AM Error deploying archive file:/scratch/jdev11117/jdevuserhome/mywork/MMSOAHello/HelloSoa1/deploy/sca_HelloSoa1_rev1.0.jar
    (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)
    My BPEL has a Java Embedding I have posted the entire BPEL below:
    <?xml version = "1.0" encoding = "UTF-8" ?>
    <!--
    Oracle JDeveloper BPEL Designer
    Created: Thu Sep 12 22:41:52 PDT 2013
    Author: mmuppago
    Type: BPEL 1.1 Process
    Purpose: Synchronous BPEL Process
    -->
    <process name="HelloSoa1"
    targetNamespace="http://xmlns.oracle.com/MMSOAHello/HelloSoa1/HelloSoa1"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:client="http://xmlns.oracle.com/MMSOAHello/HelloSoa1/HelloSoa1"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpel2="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap">
    <bpelx:exec import="oracle.security.jps.*"/>
    <!--
    PARTNERLINKS 
    List of services participating in this BPEL process 
    -->
    <partnerLinks>
    <!--
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="hellosoa1_client" partnerLinkType="client:HelloSoa1" myRole="HelloSoa1Provider"/>
    </partnerLinks>
    <!--
    VARIABLES 
    List of messages and XML documents used within this BPEL process
    -->
    <variables>
    <!-- Reference to the message passed as input during initiation -->
    <variable name="inputVariable" messageType="client:HelloSoa1RequestMessage"/>
    <!-- Reference to the message that will be returned to the requester-->
    <variable name="outputVariable" messageType="client:HelloSoa1ResponseMessage"/>
    </variables>
    <!--
    ORCHESTRATION LOGIC 
    Set of activities coordinating the flow of messages across the 
    services integrated within this business process 
    -->
    <sequence name="main">
    <!-- Receive input from requestor. (Note: This maps to operation defined in HelloSoa1.wsdl) -->
    <receive name="receiveInput" partnerLink="hellosoa1_client" portType="client:HelloSoa1" operation="process" variable="inputVariable" createInstance="yes"/>
    <assign name="Assign1">
    <copy>
    <from expression="concat('Hello ', bpws:getVariableData('inputVariable','payload','/client:process/client:input'))"/>
    <to variable="outputVariable" part="payload"
    query="/client:processResponse/client:result"/>
    </copy>
    </assign>
    <bpelx:exec name="Java_Embedding1" version="1.5" language="java">
    <![CDATA[/*Write your java code below e.g.
    System.out.println("Hello, World");
    try {
    System.out.println("Hello from MM World");
    oracle.security.jps.util.SubjectUtil.getUserName(oracle.security.jps.util.SubjectUtil.getCurrentSubject());
    } catch(Exception ex) {
    System.out.println("Exception");
    ex.printStackTrace();
    }]]>
    </bpelx:exec>
    <!-- Generate reply to synchronous request -->
    <reply name="replyOutput" partnerLink="hellosoa1_client" portType="client:HelloSoa1" operation="process" variable="outputVariable"/>
    </sequence>
    </process>

    Hi,
    The problem you are referring above is definitely due to the java embedding you are using.
    This seems to be a simple Hello World example, and if you are looking for the same to work, you can simply use an assign activity to concat the input with the Hello world.
    If you are trying to use a java embedding activity which has some custom java coding in it, please refer to the following:
    Make sure all the dependent classes are explicitly mentioned with their packagename.ClassName.
    Also , make sure you make all the classes as jar and include it in sca-inf\lib directory of the code.
    a) See that your external / dependent Java applications dependent Jar files are copied in csa-inf/lib (e.g all jars like log4j, apache jars, wickets jar etc etc etc )
    b) also make sure u deploy the dependent java application as JAR using jdeveloper deploy wizard.... for example archive1.jar and then copy this jar as well in sca - inf / lib folder
    it will work ....
    Thanks,
    Deepak.

Maybe you are looking for