"Message Rejection Handler" for the file/ftp adapter using fault policy

Hi guys,
We are trying to implement "Message Rejection Handler" for the file/ftp adapter using following fault policy configuration.
Fault Policy:
`````````````
<?xml version='1.0' encoding='UTF-8'?>
<faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
<faultPolicy version="2.0.1" id="ProcessNameGenericPolicy"
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:remoteFault">
<condition>
<action ref="ora-retry"/>
</condition>
</faultName>
<faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
name="bpelx:bindingFault">
<condition>
<action ref="ora-rethrow-fault"/>
</condition>
</faultName>
</Conditions>
<Actions>
<Action id="ora-retry">
<retry>
<retryCount>3</retryCount>
<retryInterval>1</retryInterval>
<retryFailureAction ref="ora-rethrow-fault"/>
</retry>
</Action>
<Action id="ora-rethrow-fault">
<rethrowFault/>
</Action>
<Action id="ora-human-intervention">
<humanIntervention/>
</Action>
<Action id="ora-terminate">
<abort/>
</Action>
</Actions>
</faultPolicy>
<faultPolicy version="2.0.1" id="ProcessNameHumanInterventionPolicy"
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:medns="http://schemas.oracle.com/mediator/faults"
name="medns:mediatorFault">
<condition>
<test>contains($fault.mediatorErrorCode, "TYPE_TRANSIENT")</test>
<action ref="ora-retry-with-intervention"/>
</condition>
</faultName>
<faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
name="bpelx:remoteFault">
<condition>
<action ref="ora-retry-with-intervention"/>
</condition>
</faultName>
<faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
name="bpelx:bindingFault">
<condition>
<action ref="ora-rethrow-fault"/>
<!--<action ref="ora-retry-with-intervention"/>-->
</condition>
</faultName>
</Conditions>
<Actions>
<Action id="ora-retry-with-intervention">
<retry>
<retryCount>3</retryCount>
<retryInterval>1</retryInterval>
<retryFailureAction ref="ora-human-intervention"/>
</retry>
</Action>
<Action id="ora-retry">
<retry>
<retryCount>3</retryCount>
<retryInterval>1</retryInterval>
<retryFailureAction ref="ora-rethrow-fault"/>
</retry>
</Action>
<Action id="ora-rethrow-fault">
<rethrowFault/>
</Action>
<Action id="ora-human-intervention">
<humanIntervention/>
</Action>
<Action id="ora-terminate">
<abort/>
</Action>
</Actions>
</faultPolicy>
<faultPolicy version="2.0.1" id="RejectedMessages">
<Conditions> <!-- All the fault conditions are defined here -->
<faultName xmlns:rjm="http://schemas.oracle.com/sca/rejectedmessages" name="rjm:PartnerLinkName">
<!-- local part of fault name should be the service name-->
<condition>
<action ref="writeToFile"/> <!-- action to be taken, refer to Actions section for the details of the action -->
</condition>
</faultName>
</Conditions>
<Actions> <!-- All the actions are defined here -->
<Action id="writeToFile">
<fileAction>
<location>Server/Loc/path</location>
<fileName>Rejected_AJBFile_%ID%_%TIMESTAMP%.xml</fileName>
</fileAction>
</Action>
</Actions>
</faultPolicy>
</faultPolicies>
Fault Binding:
``````````````
<?xml version='1.0' encoding='UTF-8'?>
<faultPolicyBindings version="2.0.1"
xmlns="http://schemas.oracle.com/bpel/faultpolicy"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<composite faultPolicy="ProcessNameGenericPolicy"/>
<service faultPolicy="RejectedMessages">
<name>PartnerLinkName</name>
</service>
<reference faultPolicy="RejectedMessages">
<name>PartnerLinkName</name>
</reference>
</faultPolicyBindings>
We have SyncFileRead partner link.
The expectation is: when the message read by SyncFileRead partner link is rejected,
that rejected message should come to particular directory in the server.
Could you please help us fixing this.
TIA.

HI..
Have a look at this blog :
3) Error: HTTP_RESP_STATUS_CODE_NOT_OK 401 Unauthorized
Description: The request requires user authentication
Possible Tips:
u2022 Check XIAPPLUSER is having this Role -SAP_XI_APPL_SERV_USER
u2022 If the error is in XI Adapter, then your port entry should J2EE port 5<System no>
u2022 If the error is in Adapter Engine
u2013then have a look into SAP note- 821026, Delete the Adapter Engine cache in transaction SXI_CACHE Goto --> Cache.
u2022 May be wrong password for user XIISUSER
u2022 May be wrong password for user XIAFUSER
u2013 for this Check the Exchange Profile and transaction SU01, try to reset the password -Restart the J2EE Engine to activate changes in the Exchange Profile After doing this, you can restart the message
Http* Errors in XI
Thanks,
Pooja

Similar Messages

  • Using relative path for in file/ftp adapter

    Hi All,
    How to have a relative path for file/ ftp adapter's inbound/outbound operation?
    Example: Consider $ORA_HOME = /home/oracle --> This environment variable can be different on different machines
    i want to drop a file in to $ORA_HOME/folder1/folder2 (Or poll for a file).
    <partnerLinkBinding name="FTP">
    <property name="wsdlLocation">FTP.wsdl</property>
    <property name="out_dir" type="LogicalDirectory">What do i write here???</property>
    <property name="retryInterval">60</property>
    </partnerLinkBinding>
    if i cant configure this in partner link section or in activation agent sction, how else do i achieve this?
    i am using 10.1.3.* version.
    Thanks in advance.
    Roshan.

    You can achive it using the deployment scripts if the directory is changing on the basis of the environment
    If you want to change at run time than you can use the jca properties to set using the variables at runtime.
    Regards,
    Ajay

  • How to give a dynamic File Name for Receiver File/FTP Adapter.

    Hi Experts,
        I have one scenario in which we are creating a flat file of IDOC which is coming from R/3 & sending it to FTP location. For this we have configured Receiver FTP adapter with File Name Scheme as "NT.out"  & in File Consturction mode i have given as "Add Time Stamp".
        therfore while creating a file it is creating as NTyyyyMMdd-HHmmss-SSS.out
    where as my requirement is only to to add Time & not the Date. (NThhmmss.out)
        How to do this ?
        for your info we are using ABAP Mapping.
        Pl help me
    Regards,
    Umesh

    Hi Umesh,
          Add one more field to your target structure for your file name and populate that field as per your requirement like NTyyyyMMdd.out. In receiver communication channel use Variable subtiution option and give the refrence of Payload and file construction mode set as create.
    And refer the below weblogs for Variable Subtiutuion File Name Scheme
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i - Dynamic File Name Part 1
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii - Dynamic File Name Part 2
    Hope this way would be solve u r problem.
    Cheers
    Veera
    >>>Reward points, if it is needful

  • How to rename a XML file using the file/FTP adapter

    Dear All,
    I am trying to rename a file using VARIABLE NAME SUBSTITUTION.
    My structure:
    <ns1:MSg xmlns:ns1="http://www.mycomp.inf.br/msr">
      <ns1:MSgVal type="A" Id="188549">
        <ns1:cab>
          <ns1:PO>4500000000</ns1:cPO>
          <ns1:BI>90000000011</ns1:cBI>
        </ns1:cab>
      </ns1:MSgVal>
    </ns1:MSg>
    How do I do to get the value 188549 from the field Id that is into the tag MSgVal?
    I created a variable var1 and my reference is:
    var1 --> payload:ns1:MSg,1,ns1:MSgVal,1,Id@,1
    I am getting the error:
    Could not process due to error: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: var1
    Regards,
    Fernando

    Hi,
    Like pinted by Michal, use Adapter Specific Identifers.
    In your mapping set the file name using the code in this link and then in your Receivr File Adapter select the Adapter Specific Identifiers --> FileName .
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
    Regards
    Bhavesh

  • Configuring the Receiver File/FTP Adapter !!

    Hi
    I am trying to configure the Receiver file adapter using the J2SE adapter engine(Please note , NOT the J2EE adapter engine).I see a prerequisite for configuring as below
    "The address (HTTP port and URL) where the adapter can be contacted from the Integration Engine".
    What values are to be specified and how can they be validated ?
    I could see an example given in the Docs saying below,
    If i specify , say for example,
    "XI.httpPort=1234 and
    XI.httpService=/file/Receiver, the end point address of the file/FTP adapter in the Integration Engine must be specified as follows:
    http://<fileadapterhost>:1234/file/Receiver"
    Can anyone explain what exactly is this endpoint address and where should it be specified/referred to ?
    Thanks
    Saravana

    Hi,
    "http://<fileadapterhost>:1234/file/Receiver"
    this adress refers to an end point with the end point type "xi-connectivity" in the integration directory (ID)which refers to the settings in the file adapter (httpPort=1234 and XI.httpService=/file/Receiver)
    1. you specify these adress in the file adapter (outbound)
    2. you refer to these adress in the ID (Receiver System End points)
    every file adapter should have an own port, because you can not specify two identical ports in two fileadapters.
    hope I could help you,
    michele
    Message was edited by: Michele Mangieri
    Message was edited by: Michele Mangieri

  • Quality of service in Receiver file/ftp adapter (SAP PI 7.1)?

    Hi,
        We are building an IDoc to File scenario in SAP PI 7.1, where a single incoming idoc will create three different output files. Also files must be created in target server in a specific order.
        Our first idea to ensure that files would be created following a specific order was that Message mapping (in Java) build target payload with all three files following expected sequence.
        In addition, receiver file/ftp adapter is setup with a dynamic variable to create each file with a different filename adding also timestamp.
        Testing the scenario, we see that three files are created in target server but when we sort them by creation date, it seems they don't follow always same sequence.
        Sometimes adapter creates File1, File2, File3; next time it created File2, File1, File3 and so on.
        Our problem is that files must be created always with a specific order and we cannot use BPM. Does anyone know if a receiver file/ftp adapter can be setup to create files following specific sequence (EOIO)?
        I know that sender file/ftp adapter can be setup with a quality of service, but I didn't find anything similar for Receiver file/ftp adapter.
        Suggestions will be welcome.
    Kind Regards,
    Aitor

    Hi,
         First, thanks all of you for your quick answers. They were helpful because we learnt a new configuration setting.
         We tried your suggestions but they didn't really fix our problem.
         Finally interface has been re-designed and we will not have to apply this logic, so no issue from our side.
         However, let me continue with this topic in case that somebody else will have the same issue, then it will be able to review this thread.
         When adapter created the files in the target directory (windows server), files had the expected timestamp in each filename. However, if we sorted windows directory contents by "Date Creation", files were sorted different that timestamp shows in the filename.
         For example, adapter created following files:
    File1_20090325-115117-169
    File2_20090325-115117-174
    File3_20090325-115117-180
         But when we sorted windows folder contents, files were sorted as follows:
    File2_20090325-115117-174
    File1_20090325-115117-169
    File3_20090325-115117-180
         It seems that timestamp was pre-assigned by the adapter, but when adapter created the files, it did it with a temporary name and finally assigns the filename. If a file size was bigger than other, maybe it takes more time and windows creation date is higher.
         If so, it means that adapter is not following same instructions as itu2019s indicated in "maintain order at runtime" checkbox.
         Do you know if there is any way where we can push also the order in the adapter as we did in interface determination?
    Regards,
    Aitor

  • File/FTP adapter, outbound channel, content conversion, UTF-8 (Unicode)?

    We would like to send "delimited" files to another application (tab-delimited, CSV, ... - the other application does not support XML-based interfaces). Obviously we will have an outbound channel that uses the file/FTP adapter and the data will be subjected to "content conversion".
    The data contains names in many languages; not all of this can be represented in ISO Latin-1, much less in US-ASCII. I suppose UTF-8 would work. The question is: how is this handled by the FTP protocol? (considering that the FTP client is part of the SAP PI file/FTP adapter and the FTP server is something on the "other" machine)

    Hi Peter,
    you can maintain the file encoding in the outbound adapter. See [Configuring the Receiver File/FTP Adapter|http://help.sap.com/saphelp_nw2004s/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm]
    For your requirements "utf-8" sounds pretty fitting.
    Regards,
    Udo

  • Performance File/FTP adapter

    Hello all,
    I've got the following problem.
    For a lot of interfaces I use the file/ftp adapter.
    One of them processes periodically a lot of files in a short time period, for example 3000 files in 20 minutes.
    This interfaces consists of 6 message types. Each message type has it's own communication channel (ftp).
    The messages are appended into one file (plain text) on the FTP server with a fixed file naam. One file for each message type.
    The processing of a lot of these files takes a lot of time, for example 90 minutes for one message.
    They are waiting a lot of time in the adapter queue (messaging system) before they are processed by the ftp adapter..
    I think this is caused by the 'append step' wthin ftp.
    Question (problem) is how I can increase the performance.
    I already know you can change (raise) the parameter 'Maximum Concurrency' in the communication channel. For example value 2 in stead of 1. Only I'm afraid this causes locking problems because the files have to be appended one by one. But I'm not sure about this.
    My questions are:
    - can I use the parameter Maximum Concurrency in this case? If yes, what value should it have to increase the performance substantially?
    - what other options do I have to increase the performance of the file/ftp adapter? (adding an extra server node is no option)
    I hope anyone can help me with this.
    Thanks
    Regards,
    Marco

    Hi Ivan,
    Sorry for my late reply I had to leave yesterday.
    Thanks a lot for your help so far!!
    I still have a question about the Maximum Concurrecy parameter in the communication channel.
    The interface appends file to one file on the FTP server.
    When I  raise this parameter (1->2) to 'activate' parallel processing then I'm afraid theere will be a locking problem, because in one interface there are now two parallel  FTP connections that append to the same file on the FTP server.
    Is this a risk or not?
    Other question: are there any guidelines on how to set the parameter Maximum Concurrency? For example technical limitations.
    Regards,
    Marco

  • Process TIFF file from FTP server using File/FTP adapter

    Hi,
    I have a requirement to process a scanned document TIFF file from a directory on an FTP server using the File/FTP adapter and process through XI into a Web Service via a receiver SOAP adapter.
    My question is can the file/FTP adapter be used to process the TIFF file into XI from an FTP server ? Also, what settings need to be made on the file adapter to allow this file to be processed into XI ?
    Thanks in advance
    Colin

    hi colin,
    TIFF is type of image file, it can be converted to binary using java mapping
    refer this pdf
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee56c0b
    regards
    Ramesh P

  • How to handle flat file with variable delimiters in the file sender adapter

    Hi friends,
    I have some flat files in the ftp server and hope to poll them into XI, but before processing in XI, I hope to do some content conversion in the file sender adapter, according to the general solution, I just need to specify the field names, field seperator, end seperator, etc. But the questions is:
    The fileds in the test data may have different amount of delimiters (,), for example:
    ORD01,,,Z4XS,6100001746,,,,,2,1
    OBJ01,,,,,,,,,,4,3     
    Some fileds only have 1 ',' as the delimiter, but some of them have multiple ','.
    How can I handle it in the content conversion?
    Regards,
    Bean

    Hi Bing,
    Plz do refer the following blogs u will get an idea:
    File content conversion Blogs
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    Regards,
    Vinod.

  • Sender File/FTP Adapter - Matching Input to Message Type

    Hi,
    I have a sender file/ftp adapter which is using content conversion to generate an XML document from the contents of a text file. This works fine and when I go into the SXI Monitor I can see the XML document I expect:
    <ns:DN_360BalanceExtract xmlns:ns="http://xxx">
    <ns:RN_360BalanceExtract xmlns:ns="http://xxx">
    <BalanceRecord>
       <SerialNo>xx10000780</SerialNo>
       <RegNo>A1</RegNo>
       <LocationTicketIssued>ALBERT ROAD SOUTH</LocationTicketIssued>
       <DateOfOffence>2008-02-15</DateOfOffence>
       <TimeOfOffence>13:38</TimeOfOffence>
       <OffenceDescription>xxx</OffenceDescription>
       <CurrentStateOfCase>RE-OPENED; CLOSED IN ERROR</CurrentStateOfCase>
       <OutstandingBalance>70.00</OutstandingBalance>
       </BalanceRecord
    <BalanceRecord>
       <SerialNo>xx90001245</SerialNo>
       <RegNo>S849KMR</RegNo>
       <LocationTicketIssued>ALBION PLACE</LocationTicketIssued>
       <DateOfOffence>2011-03-01</DateOfOffence>
       <TimeOfOffence>10:59</TimeOfOffence>
       <OffenceDescription>xxx1</OffenceDescription>
       <CurrentStateOfCase>xxx</CurrentStateOfCase>
       <OutstandingBalance>60.00</OutstandingBalance>
    </BalanceRecord>
    </ns:RN_360BalanceExtract>
    </ns:DN_360BalanceExtract>
    Having created the XML document from a text file I now wish to use the XML as input to a web service. This will of course involve mapping the XML document to a message in the inbound interface. Question is how do  associate the XML generated with a Message Type in the outbound interface. Do I need to make sure the Document or Recordset names match that of a Message Type ?
    Cheers,
    PaulC.

    Hi Paul
    The content conversion will create a document like that if you insert DN_360BalanceExtract as Document name, "http://xxx" as namespace.
    RN_360BalanceExtract will probably be your recordset, with its namespace.
    More information about content conversion on sender file adapter:
    http://help.sap.com/saphelp_nw04/helpdata/EN/ae/d03341771b4c0de10000000a1550b0/frameset.htm
    I'm not sure what you mean by bound. If you mean that PI has to execute mapping you created for that DN_360BalanceExtract message type, you need to associate DN_360BalanceExtract to a message interface and then create all configuration objects and choose that message mapping when you create the interface determination object.
    Regards,
    Giuseppe

  • In my SOA Composite, Can I use file/FTP adapter to get the EDI X12 850

    Our requirement is to build a SOA Composite to dump all the details in a EDI X12 850 ( Purchase order ) document in to a database table. In my SOA Composite, Can I use file/FTP adapter to get the EDI X12 850 element details to map them to a base base columns.

    Drop the File Adapter to the left lane of the composite i.e., Services lane...
    Go to Step 2, give a meaningful name....
    Step 3, select "define from operation and schema"
    Step 4, select the operation type as "read"
    Step 5, select physical path and give the folder path in the "Directory for incoming files" field.,
    Step 6, select wildcards and give the expression depending on the file name it would be at run time...
    Step 7, select the polling frequency as required....
    Step 8, in the URL field, adjacent to that , select "browse for schema file" and select the XSD which you have exported from B2B Editor.
    say next and finish, you will be good to go.
    Hope this helps,
    Thanks,
    N

  • Sender file adapter - Can I use *.xml for the file name

    Hi Gurus,
    I have some interfaces where I need to pick the file from a directory. The name of the file will have Data<i>time stamp</i> as the naming convention. Can I use *.xml to pick up my files from this directory?
    The help.sap.com documentation says that we can use this naming convention.
    <b>
    &#9679;      File Name
    Specify the name of the file that you want to process. The name can contain placeholders (*, ? (placeholders for exactly one character)) so that you can select a list of files for processing.
    </b>
    I tried using *.xml for my file name in the communication channel, XI is not picking up this file.
    Please let me know if you have the solution.
    Thanks
    Kalyan

    Murthy,
    Thanks for the reply.
    I am using GuildFTP tool as my FTP server. In this tool, all the permissions were given for the file to pick up.
    The status of the file is good.
    Where in the file adapter configuration I have to select 'Read-only'?
    The file adapter is working perfect with the exact name of the file.
    Thanks
    Kalyan

  • File Adapter going into infinite mode while polling for the file

    Hi,
    I am facing an issue while the file adapter is reading the data from the file.
    If the file from which it is reading has been deleted it keeps on polling for it infinite number of times and also doesn't pops out with any error message. Is there any method that after polling for some time period we can pop out a message that the particular file is not available and then the file adapter should stop polling for the file.Anyone has some ideas about this. Any pointers will be of great help.
    Thanks
    Vinay
    Message was edited by:
    soachd

    Hi soachd,
    As far as I understand polling is infinite process. You need to adopt this strategy if you are expecting some thing to happen all the time or may be when you want to be ready when ever an expected event happens. This provides a real time solution but with the downside of infinite execution.
    Hope it helps.
    Kalyan.

  • How to get the owner name for the file in ftp using abap ?

    Hi folks ,
    How to get the owner name for the file in ftp using abap ? please help me very ugernt . I tried with all standard FTP commands
    but doest work out me . Helping in this regard highly appreciated ...
    Thanks and regards,
    Swarupa Vanarchi

    Hi
    dont you  have used the os user while calling the FTP_CONNECT FM?
    Hope you are not talking about the user executing the FTP program.
    Else If you are talking about the FTP file creator then its not related to abap as you can handle it by maintaining the user in file name itself.
    May be i am going too far with if and elses here as your question possesses no  clarity.
    Plz elaborate your requirement  before anybody can help.
    Regards
    sateesh

Maybe you are looking for