Conditioned Routing in OSB

Hi All,
I have a scenario that, From ReqCS i have to call a contract proxy service. In that i used route node and routing option to route to Provider connector services. But i have to use an condition and if it satisfies i'l route to the ProvCS else i'l give an error response. But am not able to use if condition under route option. I have three operations in it under operational branch. Plz help me
Regards
Prabhu

You can use Conditional Branch Node in message flow -
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15867/proxy_messageflow.htm#CHDEEHIF
Regards,
Anuj

Similar Messages

  • Abap mapping for content conditions routing in a flat-flat scenario

    Dear Experts.
    I have a flat-flat file scenario. Based on the content of the input file, I need to route data to the receiver.The source flat file will have several IDOC details.
    Assume two fields FIELD1 and FIELD2 in different segments of the IDOC. My requirement is if FIELD1 of an IDOC = "XYZ" and FIELD2 of the same IDOC = "PQR", then this  IDOC's details has to be passed to the receiver.
    I have tried to implement the above condition at interface determination in graphical mapping.
    In the graphical mapping,  the problem is:
    Assuming there are 3 idocs in the input file.
    FIELD1 of IDOC[1] = 'XYZ' and FIELD2 of IDOC[1] = 'PQR'
    FIELD1 of IDOC[2] = 'LMN' and FIELD2 of IDOC[2] = 'RST'
    FIELD1 of IDOC[3] = 'ABC' and FIELD2 of IDOC[3] = 'DEF' .
    Now, if none of the IDOCs in the input file satisfy my requirement,the message mapping should not be called at all. But in my case its failing because FIELD1 of IDOC[1] and FIELD2 of IDOC[3] together are satisfying the condition and hence the message mapping is getting called.
    And I need to check this condition IDOC wise. Both the conditions has to be satisfied in the same IDOC.
    The question is very similar to the one posted by SHOBHA HB. (Topic:Receiver determination(or Interface determination) and conditional routing )
    but, due to complexities in the graphical mapping,  we have decided to go for the ABAP mapping instead.
    Kindly help, by mentioning the steps I should follow for this interface, the logic basically. I already have paths to some basic ABAP mapping documents from SDN, so, kindly refrain from posting general URLS for definition or history of ABAP mapping.
    IF you could guide me on this interface, It would be really helpful.
    regards,
    giri raj

    Hi,
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    This document will help you to create ABAP Mapping .
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how%20to%20use%20abap-mapping%20in%20xi%203.0.pdf
    How to Use ABAP Mapping in Exchange Infrastructure 3.0 (NW2004)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    SAP Network Blog: How to call XI ABAP Mapping via RFC
    /people/ricardoandres.maienza/blog/2007/04/06/how-to-call-xi-abap-mapping-via-rfc
    SAP Network Blog: Testing ABAP Mapping
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    /people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs
    An ad-on
    /people/michal.krawczyk2/blog/2006/09/20/xi-abap-mapping-logs--more-standard-better-visibility
    Regards

  • Conditional Routing of emails from Exchange 2007

    I have a requirement to be able to control the routing of emails from Exchange 2007 based upon the sender email address.
    For example, an exchange 2007 email system has 2 accepted domains, domain1.com and domain2.com.  The system uses 2 external SMTP gateways used for sending all outbound email (gateway1 & gateway2)
    If [email protected] emails [email protected] I want it to travel via gateway1
    If [email protected] emails [email protected] I want it to travel via gateway2.
    All mailboxes are on a single mailbox server cluster, and there are 2 load balanced Hub Transport servers.
    I have looked into various ways of dealing with this and have had no success.  I looked at transport rules, but I dont believe it is possible to specify the next hop.  I've also looked into setting permissions on the send connectors, but it is not clear exactly what permissions I need to set, or whether it will work.
    The only solution I can see is to forward all outbound emails to a separate SMTP gateway (such as postfix) which supports this kind of functionality.  However I would rather solve the problem using Exchange.
    Any suggestions?

    This is not possible natively in Exchange but you can create your own transport agent and hook it with Exchange to configure conditional routing. You may try posting a query in Development forum to get help from developers on writing a transport agent.
    http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/threads
    Here is a great step-by-step example in that direction, not exactly what you are looking for but quite similar to that...
    How to control routing from your own routing agent
    http://blogs.technet.com/appssrv/archive/2009/08/26/how-to-control-routing-from-your-own-routing-agent.aspx
    Amit Tank | MVP – Exchange Server | MCITP: EMA | MCSA: M | http://ExchangeShare.WordPress.com

  • Conditional Routing in Reciever Determination: Best Practise

    Hi ALL
    I am doing a File to EDI scenario....
    And based on the vendor name in the file... I will be routing the EDI to
    various vendor destination hosts.
    Here is the Scenario
    A file which is coming from a single sender is being routed to
    multiple hosts(vendors); I am currently using conditional routing by
    specifying the Vendor name as the filter
    condition in the Receiver Determination and
    routing it to the corresponding vendor party.
    single sender FILE (ECC) -> multiple EDI relievers.
    Filter Condition for routing to vendor party:
    Vendor name / Vendor Code specified inside the file
    as one of the fields.
    However, my vendor list might increase to about 50 ...In this case would
    this be the best approach to do the conditional routing ... or can you please
    suggest any better method.
    Thank you,
    Patrick.

    Hi! ALL
    Thank you for the response....
    Most of the receivers are file (FTP) - 90%; some of them are AS2(HTTP protocol) - 10%.
    Also, here is an overview of the scenario:
    ECC would write IDOC's in batch mode
    in a .xml file (each .xml file would have
    3 or 5 Idoc's for a particular vendor).....So, PI
    file adapter will pick up this .xml file and write
    in to an EDI structure;
    the header of the IDOC will have the vendor
    name and all the IDOC's under a particular .xml.
    All Idoc's under a file will belong to the same vendor.
    Can you please explain to me:
    How we could use a value mapping for the above scenario to route the EDI to the
    right receiver(vendor party) in my configuration.....As, the vendor name would be in
    the header of the IDOC in the .xml file...I might be missing
    something here...would like to get an understanding as
    how I can link the value mapping to the IDOC of a particular vendor?
    Your help is greatly appreciated!!
    Regards,
    Patrick

  • Conditional routing - 1 sender to 1 receiver but with multiple locations

    Hello Experts,
    I have a scenario where i am trying to post ALEAUD Idocs (acknowledgement Idocs) from ECC - PI - MDM.
    I need these acknowledgement statuses to get updated in MDM (receiver system) for MATMAS, CREMAS and DEBMAS.
    I am through till receiving  the acknowledgemnts in PI. I am stuck at a point wherein I need to route MATMAS related messages to a different folder in the receiver system (MDM) wheraes messages realted to CREMAS should be routed to another folder in the same receiver system (MDM) and similar is the case with DEBMAS.
    ALEAUD Idoc has an element <MESTYP> which identifies whether the acknowledment belongs to MATMAS, CREMAS or DEBMAS, but i cannot use Reciever determination for conditional routing in this case.
    Will BPM help in this case? If not, kindly advice the appropriate solution.
    Thanks in advance,
    Elizabeth.

    Have you tried using Enhanced Receiver Determination? You need to define a mapping first
    ALEAUD -> ReceiverDetermiation and use this mapping in your receiver determination step
    in the Integration Directory. Its fairly flexible.
    SAP ABA software component version, http://sap.com/xi/XI/System, ReceiverDetermination
    Edited by: Sven Buttler on Sep 14, 2010 2:38 PM

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

  • Sample "REST" service for context based routing in OSB

    Hi All,
    We have a requirement where we have to do context based routing in OSB.For that, we need to have a Rest Service which should do context based routing.In the payload there will be Action tag, based on the Action tag we need to invoke corresponding Business service, if you have any sample service like this please send it to me.
    As I am quite new to Rest services.It will be helpful if I get a sample service.
    Thanks In Advance

    http://prsync.com/oracle/restful-services-with-oracle-service-bus-6243/
    http://blogs.oracle.com/jamesbayer/2008/07/using_rest_with_oracle_service.html
    http://blogs.oracle.com/jeffdavies/2009/06/restful_services_with_oracle_s_1.html
    Regards,
    Anuj
    Edited by: Anuj Dwivedi, TCS on Aug 17, 2010 3:02 PM

  • What is Conditional Routing In XI?

    What is Conditional Routing In XI?Give me Breif Description

    hi,
    it means that you can specify in the condition editor
    that your message needs to go to one or another service (receiver)
    by using values from the payload of your message
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Conditional Route Advertisement - VRF Address Family?

    I would like to do conditional route advertisement within an IPv4 vrf address family but the "neighbor x advertise-map" command is not available within the vrf address family (at least in the code version I have). It is available in non-vrf address families.
    Command/Config reference guides do not show any limitations regarding the command. Before I upgrade code (which may not be possible with my current platform) I wanted to see if anyone is doing this or if there is another way to accomplish the same task.
    Thanks
    -Ed-

    Hi,
    are you talking about PE->CE or PE->PE/RR ?

  • Dynamic routing in OSB

    Environment: OSB 10.3.1
    To avoid manual configuring all published services one-by-one (eg. alter logging), I'd like to implement a generic proxy pattern in OSB. Assume that I have business services at /bs1, /bs2, etc, proxy services at /ps1, /ps2, etc.
    What I'd like to achieve is to publish proxy services which routes to the generic proxy first and then reroute to the original proxy service. For this I published eg. /pps1, /pps2, etc all with an Insert action which saves $inbound/ctx:transport/ctx:uri to . in $header and then route to the genericproxy proxy service.
    Generic proxy starts by executing common logic in the pipeline (log, etc), then should fetch the original routing information from the header and use dynamic routing to direct the message to the right proxy service (/ps1, /ps2, etc).
    Now the questions:
    1. is this the right approach to solve the problem of generic configuration of multiple published services in OSB?
    2. appearently the uri itself is not enough for dynamic routing - what else do I need to save from the original message?
    3. can I construct a <ctx:route><ctx:service..><ctx:operation..> construct with only Insert actions? I'd need a concrete example here accomplishing this.
    Thanks.

    Well you have to add Route Node to your proxy pipeline and inside it add a Dynamic Routing action.
    If you select the Dynamic Routing action you'll see in the Properties view something like:
    Service: <Expression>
    Here is where you have to define the <ctx:route> element. You can basically paste the text here.
    You could also create an XQuery transformation (so you can reuse it later) and invoke it here (with the XQuery Resources tab). But if you're not very familiar with XQuery I'd advise to start with the first option just to see it working.
    At first you could also omit the {$proxy} variable and statically specify the service you want to route to. Or you could use an Assign action to define the $proxy (or any name you want to give it) variable. And then once that's working see if you can get the service path from the headers.
    Hope that helps

  • Receiver determination(or Interface determination) and conditional routing

    I have a flat file to flat file scenario. Based on the input file content, I want to route data to the receiver.
    My source flat file contains several IDOC details. Assume two fields FIELD1 and FIELD2 in different segments of the IDOC. My requirement is if FIELD1 of an IDOC = "US" and FIELD2 of the same IDOC = "CA", then that IDOC's details needs to be passed to the receiver.
    I have implemented the above condition at interface determination.
    But the problem is:
    Assume there are 3 idocs in the input file.
    FIELD1 of IDOC[1] = 'US' and FIELD2 of IDOC[1] = 'GL'
    FIELD1 of IDOC[2] = 'UK' and FIELD2 of IDOC[2] = 'EN'
    FIELD1 of IDOC[3] = 'BR' and FIELD2 of IDOC[3] = 'CA' .
    Now none of the IDOCs in the input satisfy my requirement and hence the message mapping should not be called at all. But in my case its failing because FIELD1 of IDOC[1] and FIELD2 of IDOC[3] together are satisfying the condition and hence the message mapping is called.
    But I need to check this condition IDOCwise. Both the conditions to be satisfies in the same IDOC.
    I am thinking that contexts are not being taken care.. It just see the whole file together and not IDOCwise.
    Can someone help me on the same. Please let me know if more information is required.
    Thanks,
    Shobha

    >
    Shobha HB wrote:
    > I have a flat file to flat file scenario. Based on the input file content, I want to route data to the receiver.
    >
    > My source flat file contains several IDOC details. Assume two fields FIELD1 and FIELD2 in different segments of the IDOC. My requirement is if FIELD1 of an IDOC = "US" and FIELD2 of the same IDOC = "CA", then that IDOC's details needs to be passed to the receiver.
    >
    > I have implemented the above condition at interface determination.
    >
    > But the problem is:
    > Assume there are 3 idocs in the input file.
    > FIELD1 of IDOC[1] = 'US' and FIELD2 of IDOC[1] = 'GL'
    > FIELD1 of IDOC[2] = 'UK' and FIELD2 of IDOC[2] = 'EN'
    > FIELD1 of IDOC[3] = 'BR' and FIELD2 of IDOC[3] = 'CA' .
    >
    > Now none of the IDOCs in the input satisfy my requirement and hence the message mapping should not be called at all. But in my case its failing because FIELD1 of IDOC[1] and FIELD2 of IDOC[3] together are satisfying the condition and hence the message mapping is called.
    >
    > But I need to check this condition IDOCwise. Both the conditions to be satisfies in the same IDOC.
    >
    > I am thinking that contexts are not being taken care.. It just see the whole file together and not IDOCwise.
    >
    > Can someone help me on the same. Please let me know if more information is required.
    >
    > Thanks,
    > Shobha
    The ideal solution to your scenario is to redesign the interface as below;
    1. Receive the file.
    2. Do a 1: N mapping (this should split your message into multiple Messages)
    3. On this message you can do the required check. Now only the required field for the particular IDoc will be part of the check and it will not mix with other Idocs.
    Will this do? Else please provide more details

  • Dynamic Routing in OSB 10gR3

    Hello All,
    I am trying to do a POC of our use-case and wanted to use the Dynamic Routing feature of OSB 10gR3 -
    - Create a Proxy which will accept service_id, version, operation and generic input request
    - Proxy should do lookup in the Routing Table (XQuery Resource) and based on the service_id as key will provide the service endpoint as -
    <ctx:route>
    <ctx:service isProxy="true"> {$routingtable/row[logical/text()=$body/ServiceRequest/ServiceId/text()]/physical/text()}</ctx:service>
    <ctx:operation>{$body/ServiceRequest/OperationName/text()}</ctx:operation>
    </ctx:route>
    - Proxy should also carry out the transformation from generic input request to specific as per the operation.
    - Proxy should then be able to call the other proxy services (as per endpoint in the routing table) and the specified operation.
    Questions -
    Is this possible in OSB 10gR3? What service type (WSDL, AnySOAP, AnyXML, messaging) should the generic proxy be? Any alternative to this approach.
    So far, I have used ALSB/OSB for simple use-cases and this is more complex so I am seeking information and feedback on this use-case and how to move forward with this use-case.
    Thanks,

    Thanks mneelapu.
    I started this use-case on baby-steps and I tried use the dynamic routing to call the operation on a proxy services
    Generic Proxy (using dynamic routing) -----> Proxy ---> Business <----WSDL (Target Service)
    Here are the steps in my code -
    (1) Created the Proxy ---> Business <----WSDL (Target Service) and tested using the test console.. all works fine.
    (2) Created Generic proxy (Messaging Type with xml as input) and I am passing the xml as
    <ServiceRequest>
    <ServiceId>TestWS</ServiceId>
    <OperationName>getStatus</OperationName>
    </ServiceRequest>
    (3) Created the pipeline pair and in the request pipeline added the stage and -
    - assign the Routing Table (as XQuery Resource) to the $routingtable varible
    (Routing Table XML looks like - <routing><row><logical>TestWS</logical><physical>/TestSB/TestPS_1</physical></row></routing>)
    - assign the XQuery expression
    <ctx:route>
    <ctx:service isProxy="true"> {$routingtable/row[logical/text()=$body/ServiceRequest/ServiceId]/physical/text()}</ctx:service>
    <ctx:operation>{$body/ServiceRequest/OperationName}</ctx:operation>
    </ctx:route>
    to $routeresult variable
    (4) Added the Route Node with dyanmic routing action added the $routeresult in the expression.
    I am getting BEA-382612 (Error preparing message for dispatch). I followed the steps as mentioned on e-docs, what am I missing here?
    -J
    Thanks,

  • Error in dynamic Routing in OSB

    I am doing dynamic routing in the proxy service by setting the URL in the Routing Options component in OSB. It's throwing Null Pointer Exception when I am using a URL like this:
    http://hqcsas095:8080/ShowImage/servlet/DisplayImage?dlNumber=1114
    The desination machine is even not getting a request.
    If I remove ?dlNumber=1114 from the URL, then destination machine is getting request. Looks like something is wrong with ? character in the URL but I cannot avoid that. I have to pass paramters.
    Thanks for your help.

    As Hisaak mentioned, try routing option if you want to set URI dynamically. To use the dynamic route action, you need the fully qualified name of the service in Oracle Service Bus as described in http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html#wp1081507
    Thanks
    Manoj

  • Doubts in Route node OSB

    Hi all,
    Service callout creates two variables for Request and Response , so when I use a Service callout I do a Xquery transform and assign it to the Request
    variable. Now how do I do this in a route node
    when I tried to assign using x query transform i get an error +"BEA-382040: Failed to set the value of context variable "body". Value must be an instance of+
    +{http://schemas.xmlsoap.org/soap/envelope/}Body".+ Do I have to manually type the xml and use replace activity and replace the body ?
    Thank You
    Arun

    Hi all,
    Actually i am also getting the same error and i have changed the node entire body to node contents, but it is not working for me..
    Scenario :
    Proxy build on my local WSDL, then Pipeline with 2 stages on request side,
    1st stage : I am doing transformation to change the request,which i am getting from the portal into the format understandable by the System, i will call in 2nd Stage, I am doing this by using Replace action XPath ( ./* ) in body with my Xquery.
    2nd Stage : I am assigning the same Xquery to a varable SAOPRequest and then I am calling the External Service using Service Callout and configuring SOAP Body, In that i am passing SOAPRequest variable which i created earlier as a SOAP Request Body and Response as a SOAP Response.
    Save all and when i test it it gives me the error +"BEA-382040: Failed to set the value of context variable "body". Value must be an instance of+ {http://schemas.xmlsoap.org/soap/envelope/}Body"
    Waiting for your valuable suggestion
    Thanks and Regards
    Piyush
    Edited by: user13140590 on Jun 3, 2010 6:30 AM

  • BGP Conditional Route Filtering

    Hi All,
    I have router with 2 Connection.
    1) IP Transit from Tier 2 Provider
    2) IX - Local Internet Exchange for local peering
    I'm receiving full internet route nearly 500k+ entries. I also have few local peering through IX connection to local telco. Now that , Im receiving more specific route from IP Transit link compared to local peering . Eg
    Local Peer A( ASN YYYY)  send route : a.a.0.0/16
    IP Transit send route : a.a.1.0/24
    With this , My traffic to a.a.1.0/24 end up routed over IP transit link. But we need the traffic routed via IX Peering, since its direct peering and have low latency and high bandwidth capacity. 
    Im thinking, to filter AS-PATH YYYY from IP Transit link, so that anyy traffic to ASN YYYY will now routed over local IX Peering. But, this will cause traffic get dropped if My Port to IX or Peering Partner Port to IX is went down.  The traffic then should routed over IP transit link if local peering is down. Meaning to say , AS-Path filtering should be removed if local peering to that ASN is down.
    Any Idea how to accomplish this ?

    Hello
    You dont say if this is just one router with two perrings or two routers with ibgp between them each with a isp peering?
    However i for outbound traffic you can use  either Weight or local Prefeance path selection for your local traffic to be go over your selected link.
    For inbound As-Path prepending would be apllcable I think
    Outbound:
    Weight (Is locally significant - Just one router)
    access-list 10 permit x.x.x.x y.y.y.y
    route-map Weight permit 10
    match ip address 1
    set weight 400000
    route-map Weight permit 99
    router bgp xx
    neigbour x.x.x.x route-map Weight out (to ebgp perring for your prefered choice path)
    or
    route-map Local-Pref permit 10 ( for IBGP routers)
    match ip address 1
    set local-preferance 200
    route-map Local-Pref permit 99
    router bgp xx
    neigbour x.x.x.x route-map Local-Pref in (to ebgp perring for your prefered choice path)
    Inbound
    AS=PAth prepend
    route-map AS-Path permit 10
    match ip address 10
    set as-path prepend ASN ASN ASN
    route-map AS-Path permit 99
    router bgp xx
    neigbour x.x.x.x route-map AS-Path out ( to the least preffered ISP)
    res
    Paul

Maybe you are looking for