OSB Retry BS Conditionally

Hi,
Below is my Requirement
I have a JMS queue on which a PS will be listening does some transformations logging and a call to Business service happens.
So In case of error i need to retry the BS so 1st retry i was able to configure using automatic retry feature of BS (Retry Count, Interval)
But 2nd retry in case if the response xml in end system has an error code then retrying is an issue for me.
Any suggestions on this. Also The Ordering of messages and Rollback of messages needs to happen on the JMS queue for which i have used unit of order and enabled transactions on proxy request and response.
Please help with this 2nd retry requirement.
JMS Queue ->              JMS proxy Service -                      BusinessService -                                                                                            EndSystem
(Ordering,                                                                      1. Retry in case of Error from End system ( Fault Response)
Failed Message                                                              2. Retry in case of Response containing error code / desc
should go back to
Queue)

Ideally the end system should return the transport status code as error (for ex. in case of HTTP 500 status code) when returning an XML payload containing error, in which case if you have selected Retry Application errors to true in business service, it will automatically retry for application errors as well.
But it that is not possible, then do this:
Add a new local proxy between JMS Proxy and Business service. So your flow becomes: JMS Queue-->JMSProxy-->LocalProxy-->BusinessService
1. Retry in case of Error from End system ( Fault Response) = this will be taken care of if you set retry properties in business service
2. Retry in case of Response containing error code / desc = To achieve this, in the local proxy, check the response from business service, if the response contains error code, then do a Reply with Failure otherwise do a Reply with Success. In the JMS proxy, in the communication action that you are using to call the LocalProxy, add routing options and set Retry Count and Retry interval. So if an XML containing an error status was receive by local proxy from business service, then local proxy will reply with failure and the JMS proxy will retry by calling the local proxy again.

Similar Messages

  • Calling more than one action at a time in fault policy file

    hi
    can any one tell me how to refer two actions at a time in faultpoicies.xml file . To make it clear to you i want to call both rethrow action and human intervention action after retry . please refer below faultpolicy file
    <?xml version="1.0" encoding="windows-1252" ?>
    <faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <faultPolicy version="2.0.1" id="BpelFaultMechanism"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Conditions>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:bindingFault">
    <condition>
    <action ref="retry-action"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="retry-action">
    <retry>
    <retryCount>4</retryCount>
    <retryInterval>2</retryInterval>
    <retryFailureAction ref="rethrow-action"/>
    </retry>
    </Action>
    <Action id="human-intervention-action">
    <humanIntervention/>
    </Action>
    <Action id="rethrow-action">
    <rethrowFault/>
    </Action>
    </Actions>
    </faultPolicy>
    </faultPolicies>
    please reply asap
    Regards
    siva

    Hi FRNzzz!! wrote:
    hi i am using oracle 10g database.
    can it be possible ?
    in if condition we can have more than one variable in one condition
    if a=100 then
    b:=200;
    c:=300;
    end if; how it will be in case statement ? i have searched lot on internet but didnt get
    case
    when a=100 then 200, 300 ... ???
    thanksnot sure if I got your question correctly, is this what you are looking for?
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2      a number := 100;
      3      b number;
      4      c number;
      5  begin
      6      case
      7        when a = 100 then
      8          b := 200;
      9          c := 300;
    10        when a = 0 then
    11          b := 300;
    12          c := 400;
    13        else
    14          b := 0;
    15          c := 0;
    16      end case;
    17  dbms_output.put_line('a :'||a||' b :'||b||' c :'||c);
    18* end;
    SQL> /
    a :100 b :200 c :300
    PL/SQL procedure successfully completed.

  • SOA BPEL 11g (11.1.1.3.0) - Using encapsulated retries in fault-policy file

    Hi,
    We are using oracle SOA suite 11g (11.1.1.3.0)
    I'm trying to configure a fault-policy file so that it first retries 20 times every 20 secs, then reties 20 times every 10 minutes, then retries 23 times every hour, then retries 24 times every 6 hours and if the fault persists call a java action to send an email and then go to human-intervention. It seems however that only the first retry is executed. The rest ones are ignored and the action following the first retry failure is the Java Action. The fault-policy is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <faultPolicy version="0.0.1" id="TransferResponsibilityRequestProcessFaults"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Conditions>
    <faultName xmlns:freeze="http://rom/cosmote/bpel/webservice/util" name="freeze:BpelWSFault">
    <condition>
    <action ref="ora-human-intervention"/>
    </condition>
    </faultName>
    <faultName xmlns:retry="http://rom/cosmote/bpel/webservice" name="retry:PendingRequestsFault">
    <condition>
    <action ref="ora-retry-20sec"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="ora-retry-20sec">
    <retry>
    <retryCount>10</retryCount>
    <retryInterval>20</retryInterval>
    <retryFailureAction ref="ora-retry-10min"/>
    </retry>
    </Action>
         <Action id="ora-retry-10min">
    <retry>
    <retryCount>10</retryCount>
    <retryInterval>600</retryInterval>
    <retryFailureAction ref="ora-retry-1hour"/>
    </retry>
    </Action>
    <Action id="ora-retry-1hour">
    <retry>
    <retryCount>23</retryCount>
    <retryInterval>3600</retryInterval>
    <retryFailureAction ref="ora-retry-6hour"/>
    </retry>
    </Action>
         <Action id="ora-retry-6hour">
    <retry>
    <retryCount>24</retryCount>
    <retryInterval>21600</retryInterval>
    <retryFailureAction ref="ora-java"/>
    </retry>
    </Action>
    <Action id="ora-java">
    <javaAction className="gr.cosmote.bpel.util.JavaActionInCaseOfRetryFails"
    defaultAction="ora-human-intervention">
    <returnValue value="RETURNED" ref="ora-human-intervention"/>
    </javaAction>
    </Action>
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    </Actions>
    </faultPolicy>
    </faultPolicies>
    Is retrying with various intervals only done by using the tag <exponentialBackoff/>?
    Thanks for any response.

    I had a similar requirement, although not as elaborate as yours. After I failed to figure it out myself I filed a SR. Basically, you cannot restart a retry block after the first execution to avoid an infinite loop.
    If you need to send the e-mail after the 23rd hour, why not just retry until the 23rd hour and send an e-mail?

  • Fault handling from MDS is not working for messagerejection

    Hi All,
    I am sorry if i am asking simple things, but after trying i couldn't figure out the problem so i reached here.
    In my project i am using file adapter in many places, so rejection handler is very important in finding out the missing files at the time of reading the file.So i created fault policies and bindings and i created simple process and placed the polices and binding files in the project, as expected it is working fine but if i referred the same files from my mds path rejection is not working.
    here is my fault polices and binding files.
    faultpolices.xml
    <?xml version='1.0' encoding='UTF-8'?>
    <faultPolicies version="2.0.1" xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <faultPolicy version="2.0.1" id="BpelFaultMechanism" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.oracle.com/bpel/faultpolicy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Conditions>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:bindingFault">
    <condition>
    <action ref="retry-action"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:remoteFault">
    <condition>
    <action ref="retry-action"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:selectionFailure">
    <condition>
    <action ref="retry-action"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="retry-action">
    <retry>
    <retryCount>4</retryCount>
    <retryInterval>2</retryInterval>
    <retryFailureAction ref="rethrow-action"/>
    </retry>
    </Action>
    <Action id="human-intervention-action">
    <humanIntervention/>
    </Action>
    <Action id="abort-action">
    <abort/>
    </Action>
    <Action id="replay-action">
    <replayScope/>
    </Action>
    <Action id="rethrow-action">
    <rethrowFault/>
    </Action>
    <Action id="ora-terminate">
    <abort/>
    </Action>
    </Actions>
    </faultPolicy>
    <faultPolicy version="2.0.1" id="RejectedMessages">
    <Conditions>
    <faultName xmlns:rjm="http://schemas.oracle.com/sca/rejectedmessages" name="rjm:Messagerejection">
    <condition>
    <action ref="writeToFile"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="writeToFile">
    <fileAction>
    <location>/u01/textdata/SOADEV/rejection</location>
    <fileName>Messagerejection_%ID%_%TIMESTAMP%.xml</fileName>
    </fileAction>
    </Action>
    </Actions>
    </faultPolicy>
    </faultPolicies>
    Note:-In the above xml fault policy BpelFaultMechanism is used in all composite for common remote and binding fault errors and this one is working fine from mds location.
    Fault-Binding.xml
    <?xml version='1.0' encoding='windows-1252'?>
    <faultPolicyBindings version="2.0.1" xmlns="http://schemas.oracle.com/bpel/faultpolicy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <composite faultPolicy="BpelFaultMechanism"/>
    <service faultPolicy="RejectedMessages">
    <name>Messagerejection</name>
    </service>
    </faultPolicyBindings>
    Composite.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- Generated by Oracle SOA Modeler version 1.0 at [30/09/12 5:41 PM]. -->
    <composite name="Messagerejection"
    revision="1.0"
    label="2012-09-30_17-41-29_597"
    mode="active"
    state="on"
    xmlns="http://xmlns.oracle.com/sca/1.0"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
    xmlns:orawsp="http://schemas.oracle.com/ws/2006/01/policy"
    xmlns:ui="http://xmlns.oracle.com/soa/designer/">
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/file/Correlation/Messagerejection/Messagerejection"
    location="Messagerejection.wsdl" importType="wsdl"/>
    <service name="Messagerejection" ui:wsdlLocation="Messagerejection.wsdl">
    <interface.wsdl interface="http://xmlns.oracle.com/pcbpel/adapter/file/Correlation/Messagerejection/Messagerejection#wsdl.interface(Read_ptt)"/>
    <binding.jca config="Messagerejection_file.jca"/>
    <property name="oracle.composite.faultPolicyFile">oramds:/apps/Faultpolicyfiles/fault_policies.xml</property>
    <property name="oracle.composite.faultBindingFile">oramds:/apps/Faultpolicyfiles/fault_binding.xml</property>
    </service>
    <component name="Messagerejectionservice" version="1.1">
    <implementation.bpel src="Messagerejectionservice.bpel"/>
    <property name="bpel.config.oneWayDeliveryPolicy" type="xs:string"
    many="false">async.cache</property>
    </component>
    <wire>
    <source.uri>Messagerejection</source.uri>
    <target.uri>Messagerejectionservice/Messagerejection</target.uri>
    </wire>
    </composite>
    Also in some cases i am going with De-batching option,in which my xml file contains multiple record and publishing each record to the target service. In this case if any record has improper content then that particular record from should move to the custom folder.Please let me know how can i do this.
    I hope some one will help me here.
    Regards,
    Tarak

    Hi Kalyan,
    Thanks for helping me here.
    Now i am able to resolve the issue after restarting the server i place the properties of the files as below
    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- Generated by Oracle SOA Modeler version 1.0 at [30/09/12 5:41 PM]. -->
    <composite name="Messagerejection"
    revision="1.0"
    label="2012-09-30_17-41-29_597"
    mode="active"
    state="on"
    xmlns="http://xmlns.oracle.com/sca/1.0"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
    xmlns:orawsp="http://schemas.oracle.com/ws/2006/01/policy"
    xmlns:ui="http://xmlns.oracle.com/soa/designer/">
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/file/Correlation/Messagerejection/Messagerejection"
    location="Messagerejection.wsdl" importType="wsdl"/>
    <service name="Messagerejection" ui:wsdlLocation="Messagerejection.wsdl">
    <interface.wsdl interface="http://xmlns.oracle.com/pcbpel/adapter/file/Correlation/Messagerejection/Messagerejection#wsdl.interface(Read_ptt)"/>
    <binding.jca config="Messagerejection_file.jca"/>
    </service>
    <property name="oracle.composite.faultPolicyFile">oramds:/apps/Faultpolicyfiles/fault_policies.xml</property>
    <property name="oracle.composite.faultBindingFile">oramds:/apps/Faultpolicyfiles/fault_binding.xml</property>
    <component name="Messagerejectionservice" version="1.1">
    <implementation.bpel src="Messagerejectionservice.bpel"/>
    <property name="bpel.config.oneWayDeliveryPolicy" type="xs:string"
    many="false">async.cache</property>
    </component>
    <wire>
    <source.uri>Messagerejection</source.uri>
    <target.uri>Messagerejectionservice/Messagerejection</target.uri>
    </wire>
    </composite>
    Regards,
    Tarak

  • XPath expression test possibilities in Fault Policy file

    Hi All,
    It would be a great help if someone can show me a way to implement the next case:
    I have the next scenario, in a fault policies file I have different actions to execute for the same fault andI have to choose what action will be executed checking a value that has not relation with the $fault variable. The value indicates the number of retries that I have to try the invocation. This is the code, but this code is not working. Anybody knows how to declare the variable to be accesible in the fault policy?
    Thanks in advance,
    <Conditions>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:remoteFault">
    <condition>
    <test>$Var=1</test>
    <action ref="ora-retry-one"/>
    </condition>
    <condition>
    <test>$Var=2</test>
    <action ref="ora-retry-two"/>
    </condition>
    <condition>
    <test>$Var=3</test>
    <action ref="ora-retry-three"/>
    </condition>
    </faultName>
    <Conditions>
    <Actions>
    <Action id="ora-retry-one">
    <retry>
    <retryCount>5</retryCount>
    <retryInterval>2</retryInterval>
    <exponentialBackoff>1</exponentialBackoff>
    </retry>
    </Action>
    <Action id="ora-retry-two">
    <retry>
    <retryCount>7</retryCount>
    <retryInterval>2</retryInterval>
    <exponentialBackoff>1</exponentialBackoff>
    </retry>
    </Action>
    <Action id="ora-retry-three">
    <retry>
    <retryCount>9</retryCount>
    <retryInterval>2</retryInterval>
    <exponentialBackoff>1</exponentialBackoff>
    </retry>
    </Action>
    </Actions>
    </faultPolicy>
    </faultPolicies>

    Hi,
    Here is an example of the possible solution:
    In fault policy file:
    <Conditions>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:remoteFault">
    <condition>
    <test>"my_xpath:getRetryCount()=number(1)"</test> (getRetryCount is a custom XPath that returns the number of retries)
    <action ref="ora-retry_1"/>
    </condition>
    <condition>
    <test>"my_xpath:getRetryCount()=number(2)"</test>
    <action ref="ora-retry_2"/>
    </condition>
    <condition>
    <test>"my_xpath:getRetryCount()=number(3)"</test>
    <action ref="ora-retry_3"/>
    </condition>
    <Actions>
    <Action id="ora-retry_1">
    <retry>
    <retryCount>1</retryCount>
    <retryInterval>1</retryInterval>
    <exponentialBackoff>1</exponentialBackoff>
    </retry>
    </Action>
    <Action id="ora-retry_2">
    <retry>
    <retryCount>2</retryCount>
    <retryInterval>1</retryInterval>
    <exponentialBackoff>1</exponentialBackoff>
    </retry>
    </Action>
    <Action id="ora-retry_3">
    <retry>
    <retryCount>3</retryCount>
    <retryInterval>1</retryInterval>
    <exponentialBackoff>1</exponentialBackoff>
    </retry>
    </Action>
    The problem of this solution is that the number of retries is finite but I don't know other way to do it.
    Cheers

  • Retry mechanism for HTTP Transport in OSB

    Hi
    I am using OSB 11gR1. I have a business service which is HTTP protocol based.
    The BS is configured with the RetryCount as 0 and Retry Application Errors is enabled.
    I have to store the message in a persistent store or some store in case the endpoint URI is temporarily unreachable.
    Once the URI is reachable, the service should pick the data from the data store and send it across to the HTTP URI.
    Has anyone implemented this or knows how this can be configured?
    Please suggest and help.
    Regards
    Kshama

    Business Service by default does not have any persistence available(well apart from persistence used for throttling which is not useful for this use case).
    You will need to add an explicit persistence layer between the Proxy Service which receives the message from Client and the HTTP Business Service which calls the back end service provider.
    You will need a JMS queue and additional JMS Business Service and a JMS Proxy Service in the flow.
    The flow should now look like following:
    Client-->HTTP PS-->JMS BS-->JMS Queue-->JMS PS-->HTTP BS-->service provider
    You can set retry conditions on the XA enabled JMS queue so that it will keep retrying the messages which failed because destination was unreachable until they are delivered. You will be able to set a retry delay and maximum number of retries etc. Keep in mind that this would be an asynchronous flow.

  • Instead of Retry Count is to 0,file is coming twise in OSB.

    In my OSB project ,the xml file is polling from a folder ,after that it is transformed through Xquery,then it goes to a DB. I have added a route level error handeller ,if any error occurs a file will be generated with this payload and stored in a folder. Everything is working fine.but if any error occurs then all time 2 file is generated.though  retry.count=0 in adapter and business service also,where did i make mistake,please advise..

    Please provide some valuable answer. I am not able to understand why this is happening????
    Thanks!!

  • OSB conditional branches

    Hi,
    I have problem with conditional branches in OSB.
    I have 2 business services and 1 proxy service which route message to one of 2 business services.
    Conditional branch look like this:
    XPath: ./ter:process/ter:provider
    In Variable: provider
    TerminalKingBranch look like this:
    Label: TerminalKing
    Operator: =
    Value: "King"
    Message is never routed by TerminalKingBranch even message is <ter:process><ter:provider>King</ter:provider></ter:process>
    I try repalce double quotes with single quotes without effect.
    Message is always routed by Default route node.
    Please help.
    Thanks.

    <?xml version="1.0" encoding="UTF-8" ?>
    <schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/project/TerminalService/TerminalService"
    xmlns:tns="http://xmlns.oracle.com/project/TerminalService/TerminalService"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <element name="process">
    <complexType>
    <sequence>
    <element name="provider" type="string"/>
    <element name="serviceId" type="decimal"/>
    <sequence>
    <element name="param1" type="string"/>
    <element name="param2" type="string"/>
    <element name="param3" type="string"/>
    </sequence>
    </sequence>
    </complexType>
    </element>
    <element name="processResponse">
    <complexType>
    <sequence>
    <element name="status" type="string"/>
    </sequence>
    </complexType>
    </element>
    </schema>
    This is View Stage Configuration      : Route Node
    Route to [ TerminalService ] invoking [ process ]
    Request Actions:
    Assign [ XQuery Resource... ]
    XQuery Resource: Project/Processes/TerminalService/TerminalServiceRequest Variable Names And Bindings: source - $body/ter:process
    to [ transformedRequest ]
    Replace [ node contents ] of [ . ]
    in [ body ] with [ $transformedReq... ]
    $transformedRequest
    Response Actions:
    Assign [ XQuery Resource... ]
    XQuery Resource: Project/Processes//TerminalService/TerminalServiceResponse Variable Names And Bindings: sourceProcessResponse - $body/ter:processResponse
    to [ transformedResponse ]
    Replace [ node contents ] of [ . ]
    in [ body ] with [ $transformedRes... ]
    Edited by: Peter551059 on Jun 9, 2011 11:34 PM

  • Error using conditional branch node in OSB

    Hi,
    We are using Oracle Service Bus in our project. I have created the following steps in the OSB Proxy Service:
    1) Assigning a value in a variable inside a request pipeline.
    2) I am using a Conditional Branch after the pipelined pair. The branching will happen according to the value of that variable, I assigned in the pipelined pair.
    Here we are getting an error in OSB test console:
    The invocation resulted in an error: Unknown error while processing message for service ProxyService MHEducation/CCAuthorization/CCAuthorizationProxyService.
    I am getting the following log in the console:
    <Nov 5, 2009 6:14:04 PM IST> <Error> <OSB Kernel> <BEA-382016> <Failed to instantiate router for service ProxyService MHEducation/CCAuthorization/CCAuthorizationProxyService: com.bea.wli.sb.management.BrokerManagementException: com.bea.wli.
    sb.stages.StageException: The xquery cannot have an unbound current node.com.bea.wli.sb.management.BrokerManagementException: com.bea.wli.sb.stages.StageException: The xquery cannot have an unbound current node.
    at com.bea.wli.sb.pipeline.BranchNode.<init>(BranchNode.java:89)
    at com.bea.wli.sb.pipeline.RouterCompiler.compileNode(RouterCompiler.java:129)
    at com.bea.wli.sb.pipeline.RouterCompiler.compileFlow(RouterCompiler.java:115)
    at com.bea.wli.sb.pipeline.Router.<init>(Router.java:135)
    at com.bea.wli.sb.pipeline.RouterCompiler.compileRouter(RouterCompiler.java:89)
    Truncated. see log file for complete stacktrace
    com.bea.wli.sb.stages.StageException: The xquery cannot have an unbound currentnode.
    at com.bea.wli.sb.stages.expressions.ExpressionHelper.validateXQuery(ExpressionHelper.java:481)
    at com.bea.wli.sb.stages.expressions.ExpressionHelper.validate(ExpressionHelper.java:59)
    at com.bea.wli.sb.stages.expressions.ExpressionHelper.getExecutor(ExpressionHelper.java:325)
    at com.bea.wli.sb.stages.expressions.ExpressionBuilderImpl.getExecutor(ExpressionBuilderImpl.java:151)
    at com.bea.wli.sb.stages.expressions.ExpressionBuilderImpl.getExecutor(ExpressionBuilderImpl.java:143)
    Truncated. see log file for complete stacktrace
    >
    Any suggestion why am I getting the error?
    Chandrachur.

    check if your conditional branch uses quotes around the compaired value
    so
    /body/myinput = 'myvalue' instead of
    /body/myinput = myvalue

  • OSB Split Join Repeat Until Question On XPath Condition

    I'm trying to use OSB File Transport to stream a very large XML document file into a service which will split the file into very many small XML documents. So, given a file like:
    <BookStore>
    <Book></Book>
    <Book></Book>
    ... (many more books)
    </BookStore>
    In the split join I want to use a 'repeat until' to process each Book until there are no more Books in the BookStore. Here's my question: What is the correct XPath expression to use as the Repeat Until terminating condition? (I'm an XPath novice.)
    Thanks for your help!!!

    Hi,
    Based on what I understood, you should be using a for each loop with the conditions as follows:
    Within the Split Join flow
    for each ( counter variable from 1 to Count (xpath of book) ) --> For my example it was count($request.parameter/sjpoc:Orders/sjpoc:Order) replace this with your xpath.
    - do your logic
    Snapshot just in case @ http://dl.dropbox.com/u/19901533/sj_foreach_snapshot.JPG
    Based on this the split and join would happen for n (based on count) number of Book tags.
    Let me know if my understanding is incorrect.
    Thanks,
    Patrick

  • Conditional Branch Node in OSB

    Hi There,
    I'm trying to set a Conditional Branch in the beginning of my Proxy Service, i'm trying to compare to fields of the body, but when i build the xpath to compare this 2 fields i'm obtaining a compilation error.
    My xpath line is :
    fn:compare(./cre:Trace_PM/trac:Trace_PM/trac:traceLevel/text(), ./cre:Trace_PM/cre:Level/text())
    And the error is :
    XPath expression invalid, not a selection: declare namespace trac = 'http://www.ferrovial.es/XSD/Trace';
    declare namespace cre = 'http://www.ferrovial.es/XSD/CreateTrace_PM';
    declare namespace jca = 'http://www.bea.com/wli/sb/transports/jca';
    declare namespace wsp = 'http://schemas.xmlsoap.org/ws/2004/09/policy';
    declare namespace jms = 'http://www.bea.com/wli/sb/transports/jms';
    declare namespace wsa05 = 'http://www.w3.org/2005/08/addressing';
    declare namespace tp = 'http://www.bea.com/wli/sb/transports';
    declare namespace jejb = 'http://www.bea.com/wli/sb/transports/jejb';
    declare namespace xs = 'http://www.w3.org/2001/XMLSchema';
    declare namespace sftp = 'http://www.bea.com/wli/sb/transports/sftp';
    declare namespace flow = 'http://www.bea.com/alsb/flow/transport';
    declare namespace soap-env = 'http://schemas.xmlsoap.org/soap/envelope/';
    declare namespace wsu = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd';
    declare namespace dsp = 'http://www.bea.com/dsp/transport/sb';
    declare namespace ejb = 'http://www.bea.com/wli/sb/transports/ejb';
    declare namespace wsa = 'http://schemas.xmlsoap.org/ws/2004/08/addressing';
    declare namespace bpel-10g = 'http://www.bea.com/wli/sb/transports/bpel10g';
    declare namespace tuxedo = 'http://www.bea.com/wli/sb/transports/tuxedo';
    declare namespace file = 'http://www.bea.com/wli/sb/transports/file';
    declare namespace ctx = 'http://www.bea.com/wli/sb/context';
    declare namespace fn = 'http://www.w3.org/2004/07/xpath-functions';
    declare namespace soap12-enc = 'http://www.w3.org/2003/05/soap-encoding';
    declare namespace soap12-env = 'http://www.w3.org/2003/05/soap-envelope';
    declare namespace fn-bea = 'http://www.bea.com/xquery/xquery-functions';
    declare namespace ws = 'http://www.bea.com/wli/sb/transports/ws';
    declare namespace soa-direct = 'http://www.bea.com/wli/sb/transports/soa';
    declare namespace http = 'http://www.bea.com/wli/sb/transports/http';
    declare namespace email = 'http://www.bea.com/wli/sb/transports/email';
    declare namespace ftp = 'http://www.bea.com/wli/sb/transports/ftp';
    declare namespace sb = 'http://www.bea.com/wli/sb/transports/sb';
    declare namespace xsd = 'http://www.w3.org/2001/XMLSchema';
    declare namespace soap-enc = 'http://schemas.xmlsoap.org/soap/encoding/';
    declare namespace xsi = 'http://www.w3.org/2001/XMLSchema-instance';
    fn:compare(./cre:Trace_PM/trac:Trace_PM/trac:traceLevel/text(), ./cre:Trace_PM/cre:Level/text()).
    I was checking in the forum and i found a similiar issue but i saw that it was not answered. Do you know which is the reason to this issue in conditional branchs on OSB?
    Regards
    Yuri

    Hi Yuri,
    From the OSB documentation -
    Conditional branching is driven by a lookup table with each branch tagged with a simple, but unique, string value. A variable in the message context is designated as the lookup variable for that node, and at run time, its value is used to determine which branch to follow. If no branch matches the value of the lookup variable, the default branch is followed. You should design the proxy service in such a way that the value of the lookup variable is set before reaching the branch node.Does your case fulfill above criteria? Please let us know your use case in detail.
    Regards,
    Anuj

  • Conditional branching in OSB

    Hi,
    I wan to use conditional branching in OSB for a WSDL WS.I am not able to use operationl branching because the method names and request message names are different.
    I want to do conditional branching based on operations or request messages.
    For example if operation name and request msgs are as below,
    add , addRequest
    minus , minusRequest
    What should I give for the "Selected path" and "variable" in the condtions?
    Thanks.

    Can you paste the Message section please, where you are defining the Part of request and response.
    The part should be element based and not type based for Operational Branching to work.
    I did a test and its working correctly, Find the WSDL I used below:
    <definitions
      name="Test"
      targetNamespace=
        "http://tempuri.org/OTN.wsdl"
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:tns=
        "http://tempuri.org/OTN.wsdl"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:wsx=
       "http://tempuri.org/OTN">
      <types>
        <xsd:schema
          targetNamespace=
            "http://tempuri.org/OTN"
          xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
          xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema">
          <xsd:element name="AddRequest">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element maxOccurs="1" minOccurs="1" name="operand1"
                 nillable="true" type="xsd:decimal"/>
              <xsd:element maxOccurs="1" minOccurs="1" name="operand2"
                 nillable="true" type="xsd:decimal"/>
            </xsd:sequence>
          </xsd:complexType>
         </xsd:element>
    <xsd:element name="MinusRequest">
          <xsd:complexType >
            <xsd:sequence>
              <xsd:element maxOccurs="1" minOccurs="1" name="operand1"
                 nillable="true" type="xsd:decimal"/>
              <xsd:element maxOccurs="1" minOccurs="1" name="operand2"
                 nillable="true" type="xsd:decimal"/>
            </xsd:sequence>
          </xsd:complexType>
         </xsd:element>
        </xsd:schema>
      </types>
      <message name="addRequest">
        <part name="addRequest" element="wsx:AddRequest"/>
      </message>
       <message name="minusRequest">
        <part name="minusRequest" element="wsx:MinusRequest"/>
      </message>
      <message name="Response1">
        <part name="Result" type="xsd:string"/>
      </message>
        <message name="Response2">
        <part name="Result" type="xsd:string"/>
      </message>
      <portType name="Test">
        <operation name="add">
          <input message="tns:addRequest"/>
          <output message="tns:Response1"/>
        </operation>
        <operation name="minus">
          <input message="tns:minusRequest"/>
          <output message="tns:Response2"/>
        </operation>
      </portType>
      <binding name="Test" type="tns:Test">
        <soap:binding style="document"
          transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="add">
          <soap:operation soapAction="add"/>
          <input>
            <soap:body use="literal" />     
          </input>
          <output>
            <soap:body use="literal"/>
          </output>
        </operation>
        <operation name="minus">
          <soap:operation soapAction="minus"/>
          <input>
            <soap:body use="literal" />     
          </input>
          <output>
            <soap:body use="literal"/>
          </output>
        </operation>
      </binding>
      <service name="Test">
        <documentation>Test</documentation>
        <port name="Test" binding="tns:Test">
          <soap:address
            location="http://localhost:8090/Test"/>
        </port>
      </service>
    </definitions>

  • OSB 11g: Conditional Branch value will not accept string Value

    OSB 11g 11.1.1.3.0 (OSB11_MAIN_GENERIC_100418.1323885)
    When I edit a message flow and create a conditional branch I:
    1. Enter an Xpath expression
    2. Name the variable containing the XPath expression
    3. Select an operator (=)
    4. Enter a string value for Value: 'true'
    5. Give the label a name (isMember)
    6. Save my work
    7. When I go back into the branch the 'true' value is gone and the Value field is blank.
    If I enter a number it saves fine - only when I enter text with single quotes
    is this a known bug?

    Thank you, however I still think this is a bug because:
    1. Version 10g training materials has this example as a lab exercise and says in particular 'make sure to place single quotes around the text string: 'true')
    2. The documentation for 11g says to enter a value but does not say it cannot be a 'string'
    3. If I don't enter any value for the value field, when I click Save it indicates an error -the field cannot be empty. When I place a numeric in the field(unquoted) I can save it and return to it and the numeric value is still there. If I enter a 'quoted string' I can save it but when I return to it, it is gone
    4. If I enter the same information using the eclipse IDE I can see the 'quoted string' is saved and when I view it (not edit but view) in the web IDE (sbconsole) I can see the 'quoted string'. If I edit it the string disappears.
    I will continue to test. While you may be correct and the intent is to accept only numerics, that does not make sense to me. Why not allow simple and fast conditional branching based on text string values in a message? I know I can use other mechanisms to achieve the same goal: a routing table would work also.
    My point was the behavior of the UI implies a bug.
    Edited by: jo**** on Nov 21, 2010 8:44 AM

  • OSB 11g - Conditional Branch Problem using attribute selection

    Folks,
    Came across a problem using OSB Conditional Branch using attribute selection, it fails & is most likely a bug. It was bug in ALSB2.5 but read in forums was fixed in ALSB 2.6
    things I am doing -
    1. In the Msg Flow, Conditional branch is @ the start of the flow
    Xpath :- ./cm:processLineItem/cm:lineItem/@actionCode
    In-Variable: - body
    Label: - MODIFY
    Operator:- =
    Value:- 'Modify'
    It fails with BEA-382000 error Code
    <con:errorCode>BEA-382000</con:errorCode>
         <con:reason>
         com.bea.wli.sb.stages.StageException: {bea-err}TYPE003: Runtime Type Mismatch
         </con:reason>
    What could be wrong with Xpath or is it a Bug ?
    Thanks,
    Abhijeet

    Hi Abhijeet,
    Your case is re-producible. It may be a bug.
    BTW, I have noticed a strange behaviour -
    1. If there is only one attribute then it works fine (<cus:lineItem actionCode="Modify")
    2. If the attribute which you want to refer in selection, is in the last then also it works fine (<cus:lineItem priorityRanking="201" quantity="1"> actionCode="Modify")
    So I will suggest you to raise a case with support and meanwhile as a workaround I would suggest you to use actionCode attribute in the last of lineItem node. So your XML should be like -
    <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <cus:processLineItem xmlns:com="http://vodafone.com.au/ebo/vha/CommonComponents" xmlns:cus="http://vodafone.com.au/cm/ocv/ebm/CustomerOrder" xmlns:cus1="http://vodafone.com.au/ebo/vha/CustomerManagement">
    <com:header>
    <com:createDateTime>2008-09-29T11:49:45</com:createDateTime>
    <!--Optional:-->
    <com:webUser>test</com:webUser>
    <com:channel>string</com:channel>
    <com:applicationName>string</com:applicationName>
    <com:businessIdentifier>string</com:businessIdentifier>
    <!--Optional:-->
    <com:entityIdentifier>string</com:entityIdentifier>
    <!--Optional:-->
    <com:sourceIdentifier>string</com:sourceIdentifier>
    <!--Optional:-->
    <com:statusCode>Success</com:statusCode>
    <!--Optional:-->
    <com:messageIdentifier>string</com:messageIdentifier>
    </com:header>
    <cus:lineItem priorityRanking="201" quantity="1" actionCode="Modify">
    <!--You have a CHOICE of the next 3 items at this level-->
    <!--Optional:-->
    <cus1:product ID="string">
    <!--Zero or more repetitions:-->
    <cus1:attribute>
    <com:name>test</com:name>
    <com:value>test1</com:value>
    </cus1:attribute>
    </cus1:product>
    </cus:lineItem>
    </cus:processLineItem>
    </soapenv:Body>
    Regards,
    Anuj

  • Extracting node value from XPath Expression in OSB Conditional Branch

    HI All
    While using conditional branch in OSB,i only get an XPath Expression editor to set a variable used to test a condition.
    Now let's say my request is
    <Body>
    <exam:PersonSearchReq xmlns:exam="http://www.example.org">
    <exam:RequestorSSO>James</exam:RequestorSSO>
    </exam:PersonSearchReq>
    </Body>
    I write my XPath expression as :
    ./exam:PersonSearchReq/exam:RequestorSSO/text()
    Now if I test this using the tester application , insted of getting node value 'James' ,i get the entire node element ,i.e
    <exam:RequestorSSO xmlns:exam="http://www.example.org">James</exam:RequestorSSO>
    Please suggest how can i extract the text value.
    Regards,
    Chinmay

    Hi Guys
    Actually it turns out that you need to populate In-Variable to function is correctly.As soon as i entere 'body' in it,it worked fine.
    Thanks
    Chinmay

Maybe you are looking for

  • Uccx 8,5 outbound IVR unable to load contact list intermittently and other ?

    Good morning on our outbound IVR we seem to have problems importing the contacts page and sometimes when it does load it show the calls were successful, yet none of the numbers were dialed. when we import the contacts it will usually show the remaini

  • Changing Chart Legend Title

    How do I change a legend title? I created a bar chart using the chart wizard, and the legend title was taken from the name of the column appearing on the Y-axis. I changed the axis label, but this change was not propagated to the legend title. Is the

  • BEx:Hierarchies in DIM and FAC are different for Cost Element

    Hi Experts, Whenever we execute a report we are getting a warning message as "Hierarchies in DIM and FAC are different for Cost Element", but in report level we are not maintaining hierarchy properties for Cost Element. We have executed Master Data t

  • Siri not working with reminders

    Suddenly Siri has stopped being able to set reminders for me. Started using her with reminders about 2 weeks ago and everything worked fine. Today she has suddenly developed a problem with using her on my iPhone. She still works perfectly on my ipad.

  • Release strategy does not reset after PO change - tried changeability 4 & 6

    Hi, After my PO is released, I change the item quantity/price such that the net PO value (increased) is changed MORE than the tolerance % set in the changeability.  I expect that the PO release should be reset but it does not. However if my PO value