How can ftp-adapter override the name rules

I have a ftp adaptor, which generate filenames with the following rule NA<%time%>.txt, but I would rather have it be stamped with a more meaninful filename ex NA<accountnumber>.txt.
I am new to Interconnect, IStudio and ftp adaptors...so I have no experience in this. I
I have done some research, and I realise that I might have to overwrite the The FileSenderCustomizer Interface more specifically the generateFilename method.
The question is really, where and how do I do this?
Thanks
Edited by: olona on Mar 3, 2010 4:54 AM
Edited by: olona on Mar 5, 2010 4:53 AM
Move to Integration - Adapters => Integration - Adapters

An example of a ftp-adapter that will generate a filename based on a value in the file. The file contains CustomerListRecord which again contains multiple Records of Customers, which then contains the actual values.
import java.util.Date;
import java.util.ListIterator;
import java.util.Vector;
import oracle.oai.agent.adapter.sdk.Agent;
import oracle.oai.agent.adapter.sdk.AttributeObject;
import oracle.oai.agent.adapter.sdk.MessageObject;
import oracle.oai.agent.adapter.transport.TransportMessage;
public class SlfNaskCustFileSender {
     private final static String objectName = "SLFCustFileSenderStripped";
     private final String fileNameExtension = ".c15";
     private final String keyMasterRecord = "CustomerListRecord";
     private final String keyRecords = "Records";
     private final String keyRecordField = "apar_id";
     public static void main(String args[]) {
          System.out.println("Its alive: " + objectName);
     public String generateFileName(Agent agent, String rule, String app, String partitition, Date time,
               MessageObject mobj, AttributeObject aobj) {
          // Default filename. Add random element just in case.
          String fileName = "NAC" + (Math.random() * 100) + fileNameExtension;
          // Picking up the buntnumber.
          AttributeObject aoCustListRecords = (AttributeObject) mobj.get(keyMasterRecord);
          Object o = aoCustListRecords.get(keyRecords);
          if (o instanceof Vector) {
               Vector v = (Vector) o;
               ListIterator iter = v.listIterator();
               while (iter.hasNext()) {
                    Object x = iter.next();
                    if (x instanceof AttributeObject) {
                         AttributeObject aoX = (AttributeObject) x;
                         fileName = aoX.get(keyRecordField) + fileNameExtension;
          return fileName;
     public void customizeTransportMessage(Agent agent, TransportMessage transportMessage, MessageObject mobj,
               AttributeObject aobj) {
}

Similar Messages

  • How can you find out if another VI running on the same computer and how can you find out the name of that VI?

    Suppose that several VIs running simultaneously on the same computer. How can I find out the names of the running VIs, from another VI?
    If the already running VIs are clones of the same basic VI, open and run with the option "Prepare to call and forget", how can I find out the names and index of each clone? 

    I had an application where I spawned (= ran with Start Asynchronous Call) multiple (reentrant) copies of VIs, and would occasionally "lose control" of them.  I needed a way to find all VIs that were running "Top Level" and stop them (so I didn't have to log off from Windows).
    I used the Application Property "All VIs in Memory" to get an array of (wait for it ...) All VIs in Memory.  I took each name, opened a VI reference to it (simply wire the name string in, as the VI is, by definition, "in memory"), looked at its VI Execution State, and if it was Run Top Level, Invoked the FP.Close and Abort VI Methods.  [To prevent the VI that did all this from "committing Suicide", I compared the name string with the current Call Chain, and did nothing if there was a match].
    I think you could adopt this idea to do what you need.
    BS

  • When sending e-mails, how can I show only the name and not include the e-mail address?

    When sending e-mails, how can I show only the name of the recipient and not include their full e-mail address?

    Hi beverlyfromnull,
    Have you added the recipients to your address book?

  • How can ftp-adapter overwrite an existing file

    Hi,
    I have an ftp-adapter that I want to overwrite an existing file when publishing a new message. I want the receiving application to handle only the latest file (==state of an export)
    now my ftp-adapter logs an error if the file it wants to put already exists.
    Is there a parameter that can set this??
    thanks,
    Ton

    You can use the file.sender_customizer_class property in the adapter.ini to hook in your implemented FileSenderCustomizer class where you can use your own logic in the GenerateFileName method. This is a possibility to create a unique file name per run.
    Kind regards, hope it helps

  • How can I view/edit the CSS rules that apply to an Order Registration Layout ?

    *Note: I am new to web design and I did not create the site that I am working on. I am also very VERY clumsy with CSS at the moment *
    I have just begun using Dreamweaver to work on a Business Catalyst site. I am attempting to edit the CSS of the layout for the Order Registration Form. The CSS is applied from the site-wide template that is assigned to the Order Registration Layout. When viewing the layout in Dreamweaver, it does not display any CSS info for the page. However, when viewing the live page for the Order Registration, it is clear that CSS is adversely affecting the layout.
    Is there a way to link the css rules from the site-wide template to the Order Registration Layout? Or should I just add a new CSS rule directly to the Order Registration Layout (possibly overriding the site-wide template's CSS)?
    Thanks!
    Nate

    I've used Firebug as well as the Webkit developer tools in Chrome and Safari which have surpassed Firebug in my opinion.  But they all suffer from the fact that the changes you make in them have to later be applied to your code which means you have to take the extra steps of trying to remember what all changes you made in Firebug and copying and pasting them back into your files.  Whereas in Dreamweaver you can Inspect, make changes directly to the code in your file, and you're done.    Not happy with the last few changes?  Undo.  Want to start completely over? File > Revert. 
    Dreamweaver has excellent tools for determining what css is being applied to an element and by what means.  And it's a more streamlined and direct workflow where you work directly in your code.   I still use Firebug and the others from time to time though.  But only for very basic "spur of the moment" testing.  And usually only when I don't have immediate access to the raw files.

  • How can I find out the name of the folder my java program is in?

    Hi, I'm trying to make a little utitlity that makes a bunch of url shortcuts based on the name of the folder I run the java from.
    i.e.
    I have my executable jar in C:/Someplace/My Folder Name/
    I'd like to be able to double click on the jar and it creates the url shortcuts for me using "My Folder Name" as a parameter.
    I've done the shortcuts bit but can't figure out (=find a tut) how to read the folder name.
    Thanks to anyone who can help!

    import java.io.*;
    import java.net.*;
    import java.security.*;
    public class Attempt {
        public static void main(String[] args) throws IOException {
            System.out.println(new Attempt().getFolder());
        public File getFolder() throws IOException {
            ProtectionDomain domain = getClass().getProtectionDomain();
            CodeSource source = domain.getCodeSource();
            URL url = source.getLocation();
            if (!"file".equals(url.getProtocol())){
                throw new IOException("Code source location not a file:" + url);
            String path = url.getPath();
            //remove xxx.jar from path:
            return new File(path.substring(0, path.lastIndexOf('/')));
    }

  • How can I find out the name of an artist in the download library?

    Yesterday my friend configured his iPod nano. At the end of the setup, a library of some 30 songs was downloaded to his iPod. He told me he loved one of the songs called Sons and Daughters, but the album/artist displayed as Anonymous. It's a moving antiwar song about the Iraq War. I listened and loved it too.
    How can we find out who the artist is? Also, how does Apple select the tunes to include in the free download? It's possible that lots of people have heard this song and would like to find out more about it as well.

    It was downloaded automatically from itunes at the end of the setup.
    Okay, but how did the music get into iTunes?
    You had to get the music from somewhere...

  • Pages---how can I look up the name of a document in pages

    I have pages on the new air iPad.  Is there a way to find a document by name without scanning thru all your documents?

    There is no search, but you can put your documents in alphabetical order by touching 'Name', rather than 'Date' at the top of documents page.

  • How can I find out the name of the table by knowing the type_id #

    Is that possible though? I know the type_id from viewResults.jsp page, but, it doesn't say which table it belongs to though! I have to know the table name to copy over updated data.

    right, which is a column... so no, I don't think you can get the table name from that... Maybe from ResultSet itself... I'd have to look at the API docs to be sure, and I'm sure you can do that just as easily.
    But as I said, you have a ResultSet, that must've come from a query, which must've had the table name(s) in it...

  • How do I find out the name of an area menu?

    I can see a report with a specific t-code in an area menu, how can i find out the name of the area menu, when i need to edit it in se43?

    Do a where used list for the tcode in SE93. select area menu in the list.
    Regards
    Sridhar

  • How do i find out the name of my out going server?

    Trying to set up an email account. It's asking , "what's the name of you out going server?" I don't know the name of my outgoing server. How can I find out the name of my "out going server?" Thanks in advance for any help on my question.

    Your provider names their servers. You need to ask them or do a search for email settings for your provider.

  • How can I turn off the phone saying "Call from" #/name when getting incoming call.

    How can I turn off the phone saying "Call from" #/name when getting incoming call before the ring tone starts?  I have a LG accolade

    I recommend checking your  prompts and alerts to turn this feature off. This may be you "Call Connect" or "Readout" alerts. Listed below are steps to update this feature. 
    With the flip open, press the Voice Command Key (on the left side of the phone).The Voice Commands feature has several settings which allow you to customize how you want to use it. Access Voice Commands, then press the Right Soft Key[Settings]. Your choices are below:
    -Confirm Choices--- Automatic/Always Confirm/ Never Confirm
    -Sensitivity--- Control the sensitivity as More Sensitive/ Automatic/Less Sensitive
    -Adapt Voice ---If the phone often asks you to repeat voice command,train the phone to recognize your voice patterns.Train Words/ Train Digits
    Prompts ---Mode/ Audio Playback/Timeout
    * For Mode, set Prompts/ Readout+ Alerts/ Readout/ Tones Only.
    * For Audio Playback, set Speakerphone or Earpiece.
    * For Timeout, set 5 seconds or 10seconds.

  • My macbook pro no longer connects to my TV with the mini dvi to hdmi adapter. A while ago the computer fell down and hit the cable. How can I tell if the computer is working ok. Doesn't show mirroring any more.

    My macbook pro no longer connects to my TV with the mini dvi to hdmi adapter. A while ago the computer fell down and hit the cable. How can I tell if the computer is working ok. Doesn't show mirroring any more. Was working while watching a movie but when I pulled it out from the computer and put it back in the system would no longer mirrorr the screen on the TV.

    The best option is an appointment at an Apple store genius bar.  The evaluation will be for FREE!
    Ciao.

  • My friend bought an ipad mini and gave me his old iPad. how can i re-register the iPad in my name so that i can sync it with my macbook air?

    My friend bought an ipad mini and gave me his old iPad. how can i re-register the iPad in my name so that i can sync it with my macbook air?

    Setup as new
    Settings>General>Reset>Erase all content and settings

  • How-can-i-remove-my-skype-name-from-the-sign-in-sc...

    Guys this is absolute rubbish feature of the login application where people's login names get recorded in the dropdown menu. Is there any more permanent way of getting rid of this annoying privacy intrusive "feature"? I would like to have a profile with a username that is not going to appear at airports and my grandma's laptop after I log out of skype and no I do not want to go digging for app files to remove my entire history on each and every machine I use as suggested by your help files. Could you please advise if I'm missing something here?
    https://support.skype.com/en-gb/faq/FA11070/how-can-i-remove-my-skype-name-from-the-sign-in-screen-i...

    Unfortunately, the option to remove that feature is not available.  
    IF YOU FOUND OUR POST USEFUL THEN PLEASE GIVE "KUDOS". IF IT HELPED TO FIX YOUR ISSUE PLEASE MARK IT AS A "SOLUTION" TO HELP OTHERS. THANKS!
    ALTERNATIVE SKYPE DOWNLOAD LINKS | HOW TO RECORD SKYPE VIDEO CALLS | HOW TO HANDLE SUSPICIOS CALLS AND MESSAGES
    SEE MORE TIPS, TRICKS, TUTORIALS AND UPDATES in
    | skypefordummies.blogspot.com | 

Maybe you are looking for

  • Unable to Install Adobe IllustratorCS4 Trial Version

    My computer is an HP Pavilion a6300f Running Windows Vista SP1 Home Premium 32-bit RAM: 2GB Processor: Intel(R) Pentium(R) Dual CPU E2180 @ 2.00GHz I am unable to install Adobe Illustrator CS4 Trial Version. I receive a Windows Error that stops the i

  • PLEASE PLEASE PLEASE HELP!!!!!!!! itune 7 problem!!!

    I had itunes 6.0.5....I never thought about upgrading until I got some gift cards that could only be used if you have itunes 7!!! So I tried to upgrade to itunes 7.0.x and all the installation went great. But when I try to open up the actually itunes

  • Full content not installed ? It is !

    Recently when I start PE 10, I get this warning that not all content is installed. Actually, it , so why do I get this warning ? Isn't it installed then and does it only seem to be installed ? Am I missing something here ? Your advice is appreciated.

  • MB31 - Posting field

    Hi, How to capture the content of "Posting date" in MB31 transaction. Since Parameter ID is not there I am unable to use get parameter and I have not able to use DYNP_VALUES_READ function also since it's giving run time dump. Regards, Balaji Viswanat

  • Ios 6.1.3 apps not installing

    Chose to update installed apps but my phone is not doing anything. It says 'INSTALLING' but appears to be frozen. My apple ID is correct  Can anyone please help ? Many thanks