Preventing XI from consuming a file before it is time

Hi all,
I wish I could prevent XI from consuming a file in the outbound directory before it is time.
There are two business aspects :
<b>1</b>- a new file with the same name could be sent in the outbound directory and the old file should be erased by the new one
<b>2</b>- the message(s) extracted from the file should be sent to the receiver only during a certain period when the receiving application is ready for it.
As this problem is common to many scenarii, I am looking for some reusable solution.
I thought of (or was proposed) the following solutions :
- <b>event-driven messages</b> : the condition 2 is OK, but the file is consumed, so if a new file arrives, it is also consumed  and both sets of data are sent to the receiver. Therefore, condition 1 is not correct.
- <b>BPM</b> : I am not yet familiar with this part of XI,  and I wonder whether it could work.
- <b>module adapter</b> : as a Java developer, it was nearly piece of cake to say whether it was time or not to send the message(s) . But the module is executed after the file was processed, so condition 1 isn't fulfilled because the incoming file has been moved to archive directory before the authorized period. I tried to change the Processing mode from "archive" to "test" in order to avoid the file being moved and it works fine, except I'm not keen doing that in a production environment.
Moreover, when it is not time, how to  cleanly" stop the process? I figured out I could sweep all data from xmlpayload so the process would carry one, but with no data. I don't know why, but it produces some mapping error and a red flag in monitoring. I also thought about throwing Exceptions, but I have no monitoring.
It's quite a long blog, but I wanted to explain what the problem was and what ways I tried.
Has anybody some advice to give me (except suicide, my boss wants his problem solved first ) ?
Regards
Yann

Hi,
>>>Isn't there any solution only using XI and Java (for functions, modules...)?
yes but a littble bit more difficult:
instead of the ABAP report you can send ANY
scheduled message to the XI (using any adapter)
and this will invoke the java proxy
that will move the file to the correct folder
so it can picked by the file adapter
at that correct time
BTW
it's that with ABAP you have nice SAP scheduler
that you can use
Regards,
michal

Similar Messages

  • How can SAP be configured to prevent users from consuming locks?

    How can SAP be configured to prevent users from consuming locks?
    The issue is that we want to prevent users to use upto maximum locks and so that we will not get lock table overflow issue. I know that we can assign parameter "enque/table_size" a good amount of value. But it is not for any specific user.
    Also want to alert in CCMS if any user reaches to its maximum speficified limit of locks.
    Thanks
    Gopesh

    You cannot set a limit of locks per user. There are two ways to reduce/control the number of locks:
    - change fewer records within one transaction
    - cover more records with one lock using wildcards
    Basically it is an application / development issue.
    Best regards, Michael

  • So what can I do to prevent webstart from caching my files?

    Hi
    I have installed java jre-7u7-windows-i586.exe on windows 7.
    and this pseudo code running within webstart:
    HttpURLConnection conn = (HttpURLConnection) resource.openConnection();
    File cached.......
    conn.setIfModifiedSince(cached.lastModified());
    conn.connect();
    int code = ((HttpURLConnection) conn).getResponseCode();
    Now my problem is that I always get 200 for the int code back.
    But it should be 304 (not modified)
    This happens because webstart is serving the file from ist cache as I can see in the following trace log entry
    network: Cache entry found [URL: https://server.com/wanted.jar, Version: null] prevalidated=false/0
    but this is not good for me....
    In the jsp serving the file I have a
    ((HttpServletResponse) response).setHeader("Cache-Control", "no-cache");
    So what can I do to prevent webstart from caching my files?
    Edited by: 962394 on 11.10.2012 10:11
    Edited by: 962394 on 11.10.2012 10:12

    i just found the solution
    Java 7 JWS URLConnection caching
    I need todo
    conn.setUseCaches(false);

  • I want to remove the rental movie from my apple tv before its expiring time. Help?

    I want to remove the rental movie from my apple tv before its expiring time. Can someone help me?

    Put it in DFU and do an update. This will not only update it, but it will remove all settings. DFU =  hold menu+play while plugging it in.

  • How do I prevent AE from saving .AEP files in the wrong folders?

    I've been using AE heavily for about 6 months, and it has this really pesky basic Windows UI problem that makes life quite frustrating. I work on lots of projects that I maintain sequentially numbered in their respective folders. Typically in Windows when you choose "Save As" windows defaults to the folder the current file resides in.  For some reason After Effects defaults to the last folder I saved a file in, which often times is not the folder I am in. So I end up with project files from projectA stored in the projectB folder.  This leads to version control problems when members of the team can't find the most recent version of projectA and so they start working on the previous version of ProjectA and later on ask me where all my changes are.  I want to believe that AE has a checkbox in preferences somewhere that says "make save-as feature operate like every other windows program" - but I haven't found it yet.  Does anyone have any advice on this topic?

    I want to believe that AE has a checkbox in preferences somewhere that says "make save-as feature operate like every other windows program" - but I haven't found it yet.  Does anyone have any advice on this topic?
    I think you are operating on wrong assumptions - a project is just a reference to other files plus some internal data, so it doesn't exactly make sense to maintain endless lists of absolute paths, given that you can import things back and forth in a million ways. What happens as soon as you import a project into another one? What, when you collect files? What happens when you re-import pre-rendered files? A "same origin" policy would be riddled with tons of issues to figure out the logic as to what the user actually wants to do and which path is the correct one.... I've never missed any such feature.
    Mylenium

  • Preventing root from overwriting a file

    Is there any way to keep pacman (or other package managers that run as root) from overwriting a file in a directory where it would normally be overwritten? Without using the immutable flag (which only works on ext* filesystems)? I know this should strictly never be necessary, but if there is any way to render things read-only for root, I think it would be useful to know.

    Pacman creates .pacnew files for the files in backup array:
    [karol@black ~]$ sp -Qii initscripts
    Name : initscripts
    Version : 2011.07.3-1
    URL : http://www.archlinux.org
    Licenses : GPL2
    Groups : base
    Provides : None
    Depends On : glibc bash grep coreutils udev>=171 iproute2 ncurses kbd findutils
    sysvinit
    Optional Deps : bridge-utils: Network bridging support
    dhcpcd: DHCP network configuration
    net-tools: legacy network support
    wireless_tools: Wireless networking
    Required By : None
    Conflicts With : None
    Replaces : None
    Installed Size : 112,00 K
    Packager : Tom Gundersen <[email protected]>
    Architecture : i686
    Build Date : czw, 28 lip 2011, 14:42:30
    Install Date : nie, 31 lip 2011, 09:14:39
    Install Reason : Explicitly installed
    Install Script : Yes
    Description : System initialization/bootup scripts
    Backup Files:
    MODIFIED /etc/inittab
    MODIFIED /etc/rc.conf
    MODIFIED /etc/rc.local
    UNMODIFIED /etc/rc.local.shutdown
    UNMODIFIED /etc/conf.d/wireless

  • How can I prevent Firefox from opening the file I create when I print a page with PDF Create! 5

    After I print a web page using PDF Create! 5, Firefox opens the file so i can view it. Before I print, I select print properties and disable "view resulting pdf". However, the file is always opened in Adobe Acrobat, although I believe I have Adobe Reader set as default. I do not want any file to open. This happens on my non-privileged accounts. On my privileged account, the file is not opened. I have removed Firefox profiles, re-installed Firefox, Reset Firefox in Help-Troubleshooting. PDF Create!5 print screen can only be viewed in a host program such as Firefox, Libre-office Writer, or any other program that prints. They do not open the file either.

    Thanks for your help. This is the Scansoft (Nuance) program. What I do not understand is why when I tell the print driver not to open the file with a privileged account, it obeys me. I am not sure where in the registry I would look for the information. I do not want to, but perhaps I should remove the Adobe Acrobat program (temporarily?) - then what would it do? Again, when I print from other programs - browsers, wordprocessors, etc - the file is not opened after printing, just with FireFox. I guess I can live with it, I have spent too much time already.

  • [Solved] Way to prevent acroread from opening pdf files in firefox?

    Hi,
    I recently installed acroread from aur and now everytime when I click on a link to a pdf-file in firefox, the acroread plugin opens the file in the browser.
    Before I installed acroread I got a dialog, where I could choose what to do with the pdf-file.
    Under Preferences->Applications I selected "Always ask" for the application type "pdf" but obviously this option is not considered.
    Thanks for any ideas.
    Last edited by otti (2008-11-04 18:57:56)

    Try disabling Adobe Reader plugin in Firefox.  Edit>Pref>Manage Add-ons>Plugins.
    Last edited by jo3 (2008-11-04 17:07:35)

  • Obtaining a rowcount from a csv file before bulk insert

    I have a group of csv files that i am bulk inserting into my sql table.  They are varying lengths, but the last seven lines of every file are not lines of data that comply with the format of my table and are causing insert errors.  I know i can
    specify a "lastrow" value for the bulk insert, but my problem is that i need a rowcount before running the statement and I can't seem to figure out a way of getting it with how im accessing the file.  (example below of what i'm doing without
    checking for the qty of rows):
    CREATE TABLE ALLFILENAMES(WHICHPATH VARCHAR(255),WHICHFILE varchar(255))
        --some variables
        declare @filename varchar(255),
                @path     varchar(255),
                @sql      varchar(8000),
                @cmd      varchar(1000),
    @lastrow  integer
        --get the list of files to process:
    SET @path = '\\chewbacca\PlantFloorData\RLData\'
        SET @cmd = 'dir ' + @path + '*.csv /b'
    print @path
    print @cmd
        INSERT INTO  ALLFILENAMES(WHICHFILE)
        EXEC Master..xp_cmdShell @cmd
        UPDATE ALLFILENAMES SET WHICHPATH = @path where WHICHPATH is null
        --cursor loop
        declare c1 cursor for SELECT WHICHPATH,WHICHFILE FROM ALLFILENAMES where WHICHFILE like '%.csv%'
        open c1
        fetch next from c1 into @path,@filename
        While @@fetch_status <> -1
          begin
      set @lastrow = 3 -- for now just to make sure logic below works
      print @lastrow
     --bulk insert won't take a variable name, so make a sql and execute it instead:
           set @sql = 'BULK INSERT HMIDATA.dbo.RawData FROM ''' + @path + @filename + ''' '
               + '     WITH ( 
                       FIELDTERMINATOR = '','', 
                       ROWTERMINATOR = ''\n'', 
                       FIRSTROW = 2 ,
       LASTROW = ' + STR(@lastrow) + '
        print @sql
        exec (@sql)
          fetch next from c1 into @path,@filename
          end
        close c1
        deallocate c1
        --Extras
        --delete from ALLFILENAMES where WHICHFILE is NULL
        --select * from ALLFILENAMES
        drop table ALLFILENAMES

    You could do a SELECT COUNT(*) FROM OPENROWSET(BULK), but you would need a format file that specifies a single-field record format with \r\n as the terminator. With the COUNT(*) you could determine the correct value for LASTROW.
    You could also load the entire file into a two-column table where one column is an IDENTITY column and the other is the raw data from the line in the file. And then you could crack the good rows.
    ...or you could write a client-side program or a SSIS package for the task.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How do I prevent Spotlight from categorizing 'JAR' files as 'Application'

    I'm a java developer and consequently I have a lot of JAR files on the filesystem. The JAR file format is a standard archive format for java, and is used mostly to package library code - the java equivalent of a DLL. They can also be created as 'executable JAR's, but this is (very) infrequent compared to the library usage.
    Spotlight seems to think every JAR file is an application, and because I have a lot of java applications and development stuff installed, I can no longer reliably use Spotlight to find actual applications because the search results are overflowing with useless JAR file entries.
    Is there any way to configure spotlight to not classify JARS as applications? Or, alternately, can I make Spotlight ignore JARs completely? Either would save me a lot of time..
    /Bill

    There are several things in the current version of Spotlight that are either broken or just plain wrong. It looks like you have found another. When I look at the metadata for a jar file I see that its type is, well, a java jar file, and its content tree declares it to be a com.sun.java-archive. Finder gets this right: if you do GetInfo on such a jar file its kind is shown as "Java JAR file"--as it should be.
    When I made a saved search, using the Kind drop-down menu to get the pre-defined Application, and then looked to see what criteria Spotlight was using to define "application" (and yes, the search included jar files in its results), I discovered Spotlight was NOT using the simple, straightforward "kMDItemKind=Application" as one would expect. Instead it is using something I had never heard of to define an Application, to wit "_kMDItemGroupId = 8"--furthermore, I believe characterizing applications that way has been deprecated. Be that as it may, it doesn't work to find the things you want, and exclude the things you don't.
    There is no way for a user to fix this. The only thing you can do is not let Spotlight define the kind. Thus, if you bring up a search window do not use the Kind drop-down menu to select Application. Instead select Other from the menu and then type Application. You then get only things whose type declaration is Application, and you don't get jar files or widgets.
    The other option is to exclude jar files by typing
    NOT jar
    in the search for box (you'll still get widgets though). You can also add that boolean restriction if you are using the menu bar Spotlight search.
    Francine
    Francine
    Schwieder

  • Prevent children from deleting important files?

    My family is going to be purchasing a new iMac soon, to be used by four children, including a 12-year old. The problem is that he is known for "screwing up" computers.
    The computer we have now suffers from a lack of printer drivers and system profiler, both which were "accidentally" deleted by him.
    My question is, is there a way to set up parental controls that allow him to access all of the regular programs on the computer, but not be allowed to delete any files without an administrator's password? I really do not feel like digging out the startup disks every time he makes a boo-boo on the computer.

    Believe me, this kid has been taught by a former Apple salesperson. He normally knows what he's doing on there, but sometimes goes a little too far when doing "Spring cleaning" when told to get rid of his junk files.
    The other children are just fine on the computer, and fortunately not as curious or destructive. We've owned Macs for 13 years and never would I have thought that we'd need to do any troubleshooting like this at all! One account has always been plenty for our family of six, I guess until now. We'll see how things go after individual accounts have been created, then maybe once the trust is gained back, go back to the single user account.
    Thanks to everyone for the help!

  • Why does IE 11 prevent me from downloading PDF files. Security Settings are set at MIN. Pop Ups & Cookies are ALLOWED

    I get the following pop-up displayed on my screen:
    YOUR CURRENT SECURITY SETTINGS DO NOT ALLOW THIS FILE TO BE DOWNLOADED.

    See if anything in here helps: http://windows.microsoft.com/en-us/windows/change-internet-explorer-security-settings#1TC= windows-7

  • How do I prevent CS4 from creating HTML files on export of an image?

    Everytime I export an image i am getting a html file created too.  It is annoying having to delete them manually every time, and there seems to be no option to turn this feature off.
    Generally I dislike CS4 compared to Macromedia Fireworks v8. 

    You need to select "images only" in the dialogue box when you choose Export
    Nadia
    Adobe® Community Expert : Dreamweaver
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    Book: Ultimate CSS Reference
    http://www.sitepoint.com/launch/005dfd4/3/133
    http://twitter.com/nadiap

  • Reading and Writing from a text file at the same time

    I know who to use the Scanner and PrintWriter to read from and write to a .txt file. But these are limited. How can I read and write at the same time? Such as open a file and change every third character or change every second word to something else and then write it back. I found this [http://java.sun.com/docs/books/tutorial/essential/io/|http://java.sun.com/docs/books/tutorial/essential/io/] but its a little over my head. Is this the only way to do it?

    wrote:
    You are using buffered reads and writes I would assume, right? Also, how do you think most programs handle this sort of thing? I don't believe I'm using buffering.
    My code looks something like this
    //...necessary imports
    //then
    Scanner inFile = new Scanner (new file("filename1.txt"));
    PrintWriter outFile = new PrintWriter ("filename2.txt");
    //then stuff like
    int x = inFile.hasNextInt();
    outFile.println(x);
    camickr wrote:If you are changing the data "in place", that is none of the data in the file is shifted, then you can use a RandomAccessFile.
    Otherwise, you've been given the answer above.What is RandomAccessFile? Is it what I have a link to? Basically what I do is I write a bunch of numbers to a txt file and then change the numbers I don't need anymore to 0. So say I had 0 1 2 3 4 5 6 7 etc. I would like to to open the txt file and change every second one to 0 so then I'd have only odd numbers and 0s.
    I looked at the documentation for RandomAccessFile and it seems like it might be what I need.
    Thankyou both for your help so far. I took a java course in high school and they only taught me one way to get data from text files and that is what I just showed you. So maybe this questions are really stupid. lol
    Edited by: qw3n on Jun 13, 2009 7:46 PM

  • Read from binary measure file starting a specified time

    I have a write to measure VI running on a data acquisition. It's saving data in a binary format with XML headers from a channel.
    I want to have the capability of reading back in the data starting at a specified time. What's the best way to do it? In another words, I don't want to read in the entire file from the beginning. I want the ability to start a specified time. I know that t0 is saved. I have the sampling frequency.
    Thanks.

    I assume that you are writing to a TDM file. If you want to perform random reads, you can do so with the binary file that contains the raw data. I've attached a VI that writes
    a 100x1 array in a binary file and you can then read back the element you need without having to read all the data from the file. The Set File Position allows you to do so.
    Message Edited by KostasB on 03-07-2008 05:23 AM
    Attachments:
    Read_Write_Binary.PNG ‏24 KB
    Write_Read_BinaryData.vi ‏18 KB

Maybe you are looking for