Reg:File adapter archive Directory

Dear team,
Our requirement is to read a csv file from a directory and archive the file in archive folder specified in the file adapter.
If any exception is caught,then we need to read the archieve file from archive directory rename the archive file with source file name and place it in source directory.
On the receive activity we are able to get the source file name and source file directory.
<receive name="Receive1" createInstance="yes"
variable="Receive1_Read_InputVariable" partnerLink="fileRead"
portType="ns1:Read_ptt" operation="Read">
<bpelx:property name="jca.file.FileName" variable="srcFileName"/>
<bpelx:property name="jca.file.Directory" variable="srcDrFolder"/>
How to get the archive file name and archive file directory from the receive activity so that we can store in local variables.
Pls do help.
Thanks

Hi,
Another way you can accomplish your scenario. Instead of deleting or archiving in beginning just move the file from inbound to archive location after business flow completion.
In case of error, the file will remain at original position as moving operation is at the end.
First read the file using read operation, then at the end create a file adapter with sync read operation. Change the entries in .jca generated with below sample.
Sample jca file.
<endpoint-interaction portType="SynchRead_ptt" operation="SynchRead">
<interaction-spec className="oracle.tip.adapter.file.outbound.FileIoInteractionSpec">
<!-- Below properties are dummy except Type , it will be changed in runtime -->
<property name="SourcePhysicalDirectory"
value="srcdir"/>
<property name="SourceFileName" value="abc.txt"/>
<property name="TargetPhysicalDirectory"
value="targetdir"/>
<property name="TargetFileName" value="abc.txt"/>
<property name="Type" value="MOVE"/>
</interaction-spec>
Then,in you bpel flow at the invoke for sync read add these two properties.
<bpelx:inputProperty name="jca.file.SourceFileName"
variable="varInputFileName"/>
<bpelx:inputProperty name="jca.file.TargetFileName"
variable="varArchiveFileName"/>
<bpelx:inputProperty name="jca.file.SourceDirectory"
variable="varInputDirectory"/>
<bpelx:inputProperty name="jca.file.TargetDirectory"
variable="varArchiveDirectory"/>
- It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
Thanks,
Durga

Similar Messages

  • Receiver file adapter archiving

    Is there any mechanisam to archive the files at receiver file adapter?

    Hi Praveen,
    Use file adapter to put the file into the archive directory and use the above mentioned OS commands in "Execute OS commands after message processing" section of Receiver file adapter.. so your file will be placed in archive folder and then copied to actual folder.
    This process is followed so as to make sure that you have the receiver file archived.. suppose you have a receiver process which will read the output of PI and delete the file .. then just to make sure we have a copy in the archive location we are first putting the file in archive directory and then copying it to the correct location
    Regards
    Suraj

  • File Adapter Archiving Issue

    Hi,
    THe file adapter archives the file, it doesn't save the entire contents of the file in the archive folder, but saves the first recordset (row) only in XML format. Did any body face similar issue, and what's the resolution to archive the contents of the file, the way it was sent.
    Thanks
    Pandari

    Hi Anil,
    Refer Archiving concepts in below links.
    http://help.sap.com/saphelp_nw73/helpdata/en/44/682bcd7f2a6d12e10000000a1553f6/content.htm?frameset=/en/44/6830e67f2a6d12e10000000a1553f6/frameset.htm
    http://scn.sap.com/docs/DOC-35572
    Warm Regards,
    DNK Siddhardha.

  • Date and Time in Sender File Adapter Target Directory

    Hi there,
    is there a way of using Date and Time from XI to the Target Directory naming? To use variable substitution some fields of the message had to contain that date and time information, which is not our case.
    For filename you can use "add time stamp" option, but and for target directory?
    Thanks and regards,
    Henrique.

    > <i>Do you have further information on how to perform
    > this with shell commands?</i>
    > >> You need to write a shell script. This script will
    > add the date/time stamp into the folder in the target
    > system. This shell script is executed from the File
    > adapter. So once the file is written into the target
    > directory, then it will rename the directory.
    Hi there, Moorthy
    We've tried to write that shell script that you mentioned, but now we have a few doubts on how to make it create the proper directory.
    In the file adapter, my target directory is "/%var1%/%var2%/", where %var1% and %var2% are variable substitutions, referencing data which comes from the payload. Now, I need the shell script to append "/<Year>/<Month>/" in the target directory. But where to archive the script? If it stays in the root directory, than how to make it create "/<Year>/<Month>/" folders inside a directory which is variable (/%var1%/%var2%/)?
    Is there a way of passing %var1% and %var2% as parameters for the shell script?
    Thanks a lot,
    Henrique.

  • File Adapter - Archive Source Files with Errors.

    Hi All,
    Could you kindly give the steps as to how to configure sender File Adapter to archive source file which result in error ?.
    Cheers,
    Kushi

    Hi Kushi,
    To configure Sender File Adapter what you can do is:
    1. Create one Communication and select the adapter as File.
    2. Select the radio button Sender.
    3. Enter the source directory e.g. /temp
    4.Enter File name e.g. xi_test.xml
    5. Under Processing parameters Chose the processing mode as "Archive" from
    drop down box.
    6. Enter the path where you wnant to archive your file.
    7. Do not forget to enter the poll intervells. e.g. 60 & Quailty of service "Exactly Once".
    8. Enter file type "Binary" if your source file is XML.
    9. Check if Adapter status as "Active".
    Note: Archiving the file is regardless of erorr in file.
    It will archive all the source file.
    Regards,
    Sarvesh
    ****Reward Points, if found helpfull.

  • Problem in Placing the file in  Archive directory

    Hi,
    I am trying to read a file and after processing , I want to archive and place in other directory. Though i am able to read and insert the data succesfully into database but not able to place in 'Archive' Directory.
    What might be the reason any idea???
    I heard there is a bug in 10.1.3.3.0 version... Is this true???
    Any help in this regard would be appreciated.
    Thanks,
    Pallavi
    Message was edited by:
    user614169
    Message was edited by:
    user614169

    I don't think there is a bug related to this in 10.1.3.3
    I am using SOA and JDeveloper 10.1.3.3 and its working fine
    Are u checking the archive option in file adapter?( Check wsdl for entry)
    Also are you giving the physical location or logical one?
    try with physical path if u are not doing it already.
    And also, i don't think files get archived after processing, they get archived at the same time the file adapter is in action.
    Regards
    Ketan

  • File adapter archive on error?

    Hello,
    I have a flat file scenario: flat -> XI -> flat.
    I have configured the sender channel for archiving messages after processing and it work fine.
    But what i want to do is :
    if the message is processed succesfully i want to archive the send file in the directory "c:/sucess" and if the message is processed on error (for example due to a mapping error) i want to archive the send file in the directory "c:/error". For the moment i don't see if it's possible, all the file successfull and on error are archived in the same directory.... Is it possible to use 2 directories for archiving ? One for success, second for error ?
    Thanks in advance.

    for Archive mode, please check these things in Sender Communication Channel :
    1.  Processing Mode is Archive
    2.  Archive Directory path is correct.
    3.  In Advance Tab : Set Adapter-Sepcific Message Attribute is Checked.
          Filename, direcotry, filetype are also Checked.
    You have one option on Processing Tab : Archive Faulty Source File, Please use the same.
    Sandeep

  • File Adapter archiving mode....

    Putting message into send queue failed, due to: com.sap.aii.af.ra.ms.api.DuplicateMessageException: Message ID a7cbcf00-4e00-11db-bd7f-0018717400ed(OUTBOUND) already exists in database: com.sap.sql.DuplicateKeyException: ORA-00001: unique constraint (SAPSR3DB.SYS_C00135467) violated.
    2006-09-27 17:17:47 Error Returning to application. Exception: com.sap.aii.af.ra.ms.api.DuplicateMessageException: Message ID a7cbcf00-4e00-11db-bd7f-0018717400ed(OUTBOUND) already exists in database: com.sap.sql.DuplicateKeyException: ORA-00001: unique constraint (SAPSR3DB.SYS_C00135467) violated
    2006-09-27 17:17:47 Error Attempt to archive file "D:\SSNEDI\test\in\queue\20060926070906359.txt" after processing failed. Retry
    source directory : D:\SSNEDI\test\in\queue
    target directory : D:\SSNEDI\test\in\queue\FB
    But, source directory not deleted 20060926070906359.txt.
    Target directory exist file too.
    what's the matter?

    Hi Kim,
    If it is in test mode,the file wont get deleted in your source direcory.  So the adpater will keep polling the file and the server will be flooded with messages.  If it is in the delete mode file will be deleted,archive mode it will be moved in to the archived directory but in the test mode file will not be deleted from your source directory and will be polled continously by the adapter.
    Also go thro' this link:-
    Re: Archiving ftp files
    Hope this provides a solution.
    Regards.
    Praveen

  • Error in sender file adapter: source directory does not exist

    Hi,
    The PI system is 7.11
    I've created sender file adapter with following details:
    Transport Protocol : File System
    Source directory: /interfaces/In
    I checked in AL11 that this path really exists and it does. (I can even see the .txt file that should be processed.)
    But still i get in Communication Channel Monitoring the following error:
    "Configured Source directory "/interfaces/In" does not exist.
    (i also tried to give the source directory as "interfaces/In" and as "//interfaces/In" but still the same error.
    Any suggestions as to what is wrong?
    kr
    Robert

    Actually, Need to use forward slash (/) to separate directory names in accordance with the Java specification.
    But wanted to try if that works..
    Also check directory name , path again as this is case sensitive...
    --Divyesh

  • File Adapter Source Directory

    I have set up a File Adapter comms channel that should be picking up a file from the XI SAP system directory path F:\usr\sap\temp.
    I place a file in that directory and can see it via SAP transx AL11.
    However my comms channel is not picking up the file so my process does not start.  I had previously been using a FTP File Adapter and that was working fine. So I know my other configuration is correct.  I now needed to testing something use just the plain File Adapter.
    The RunTime Cache has been refreshed and I can see my CC via SXI_CACHE.
    Here is what I have entered into the File Sender Adapter
    Transport Protocol : File
    Message Protocol : File
    Adapter Engine : Integration Server
    Source directory : F:\usr\sap\temp
    File Name         : MYFILE.XML
    Processing Options :
    QAS : EO
    Poll Interval 60s
    Processing Mode : Delete
    Processing Seq : By Name
    File Type : Binary
    Adapter Status : ACTIVE

    Hi
    check the following things
    first select ur message protocol as "NFS". save the changes and activate the channel.
    if still not work go to the communication channel monitoring using the path
    runtime work bench->compnent monitoring->dispaly->adapter ebngine->communication channel monitoring--->enter ur channel name and click on use filer button.
    and check whether the channel is started or stopped.
    if stopped start the channel and the try.
    if u still face the problem please reply me back.
    Thanks
    Rinku

  • File Adapter: Target directory does not exist

    Hi All,
    Using RFC to File Scenario.
    While processing in File adapter, i get following error for the target directory.
    Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Target directory '
    *********************\Out' does not exist and cannot be created.
    Although I am able to use the same target directory on my local machine.

    I think FTP user didnt have suffiecinet otherrization to create directory in FTP, check once again Directory format entered is correct.
    if you have phycial access to FTP then create one folder and enter the same in File channel and push one message and let us know the result.
    Regards,
    Raj

  • Changing File Adapter target directory - container bounce required?

    I edited USPSshipment.wsdl in the FulfillmentESB project to reflect my desired target directory (/home/oracle/usps_ship instead of C:\temp) and then re-registered the project with ESB.
    The registration completed normally, and I verified that the edited USPSshipment.wsdl file exists in the deploy and content directories in the ESB home. Also, checking the WSDL file from the ESB console showed the new value.
    However, until I bounced the OC4J_soa container, order submissions continued to use the C:\Temp target. After I bounced the container, the next order submission went to the desired /home/oracle/usps_ship.
    What is the expected cacheing behavior here? Is there a programmatic way to clear the cache after an ESB deploy. It is too restrictive if I have to bounce the whole container serving ESB and BPEL (perhaps many processes and ESB adapters) just to make a change in one particular project.
    Thanks.

    Using the SOA Demo, FulfillementESB project ~
    Example: Immediate reflection of change w/o further action
    If I change the Shipment router filter criteria (Fulfillment_Shipment.esbsvc) to cut at say $750 instead of $500, then re-register FulfillmentESB with OrderBookingIS, JDeveloper reports:
    Registration of Services Successful
    Fulfillment Shipment Updates
    The next submitted order follows the new criteria (e.g. a $600 order goes out USPS).
    Example: Change not reflected in runtime, until OC4J container restarted
    If I change the target physical directory of the USPS Shipment file adapter (USPSShipment.wsdl), then re-register FulfillmentESB with OrderBookingIS, JDeveloper reports:
    Registration of Services Successful
    However, the next submitted orders continue to be written to the previous target physical directory. Checking the value of the re-deployed USPSShipment.wsdl at the ESB host filesystem and through the ESB console shows the updated value, but the old copy is being actually used to process the message.
    Restarting the OC4J container, causes the updated USPSShipment.wsdl to be referenced for messages submitted thereafter.
    -Todd
    Message was edited by:
    tbeets

  • Error: File adapter dynamic directory not safe with subdirectories

    Hi,
    I'm using variable substitution to determine the destination directory for my RFC->File scenario
    In my RFC I have a tag called <PATH> that contains the full target path. If that path doesn't have subdirectories the variable substitution works perfect, for example:
    <PATH>directory1</PATH>
    Then in File adapter I have %var1% with the value of PATH and it works.
    But if I want to add subdirectories on the path, for example <PATH>directory1/subd2/subd5</PATH> the solution doesn't work.
    That's the error that I get:
    Could not process due to error: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: java.text.ParseException: Security violation encountered during variable substitution: Content of variable var1 is not safe: directory1/subd2/subd5
    How can I access to that directory?

    Hi Marshal,
    From help.sap:
    To disable the check the adapter performs for the element data, set the Disable Security Checks indicator.
    Otherwise, the adapter checks whether the element data contains characters that could lead to security risks in the file system environment. The check includes the characters u201C/u201C, u201C\u201C, and u201C..u201C.
    Carlos

  • Exception handling in File adapter when directory structure is incorrect

    hi,
    How can exception handling part be done in File adapter in cases where directory structure is incorrect, or directory
    we are referring to is not present.
    thanks
    Yatan

    If you are polling then there will be error message in log files.But i dont think we can do exception handling in such cases.
    Cheers

  • File adapter - archiving files after successful processing & errors

    Hi All
    In sender file adapter, I understand that we can archive files after processing them.
    After successful processing, we can archive the file, and if there are any errors, we can archive the file in a different folder (all files resulting in errors during processing are archived in a seperate folder).
    Now, see this scenario.
    My file is successfully picked up, processed and posted to receiving sap system thru proxy.
    But, if there is any application specific error (ex: duplicate id), because of which this data cannot be processed in the receiving system, how can i move the file which is archived in successful messages folder to the folder where we archive error messages?
    Is it possible?
    This is required because, when there are these kind of errors with incorrect data, we want the corresponding file to be archived in the folder where erred files are archived.
    Please let me know how we can achieve this.
    Many Thanks
    Chandra

    in file sender CC, thr is option to archive and error file store also..
    1)under processing mode - archive.. give the path thr..
    2) To archive source files where a permanent error occurred during processing, select Archive Faulty Source Files
    http://help.sap.com/saphelp_nwpi71/helpdata/en/44/658abd344a4de0e10000000a1553f7/frameset.htm

Maybe you are looking for

  • Custom rendering extensions not working in SSRS Report Designer (rsreportdesigner.config)

    My custom rendering extension is working in Report Builder (in RSReportServer.config), but not in Report Designer (in RSReportDesigner.config):  instead of adding a "TXT" export option, it's just adding a duplicate "CSV" option. SUMMARY:  Is there a

  • Letters when edited in MS Word and saved , saves to the local directory instead of saving to the database

    If you click on the "W" image, the letter opens up in MS Word. After I finish editing the document, when i try to save it it shows a save us dialog and tries to save it to the local machine instead of saving it directly to PCM. PCM Version is 13.1.3.

  • GPS (Lat Lng) Format Problem

    Hi, I'm having a problem with GPS coordinates being rounded. I'm working on an application that receives a set off lat lng coordinates and then uses the MkMapView control to display the placemark. Most of the time everything seemed ok, however I noti

  • Acrobat/Reader Enable for Commenting

    If I use Acrobat 9 to enable a document for commenting by users of Reader 9 I have a difference in behavior: In Acrobat I can check my preference to "automatically open comment pop-ups for comments other than notes" and to "copy selected text into Hi

  • Picked quantity in delivery docuement

    Hi, experts, I have created the sales order and try to create the delivery. However, in the delivery document and in its picking tab the column "picked quantity" allows no changes(default 0) with color blue instead of white. Only when I save it and t