on 08-02-2011 4:47 PM
Hello,
We have a file to file interface which is running in PROD from long time. But now the problem is customer is asking us to create Alerts if the sender file channel is not finding the input file in between the availability time. If folder is empty...then we need to raise alert.
So my sender channel will be active every day 6.00 PM - 6.15 PM EST. if file not generated to the source folder in that 15min. of time then PI should trigger alert.
I searched SDN and find that the suggested solutions are BPM, Scripts, UDF, Timeout parameter (not works)......
So can any one help on suggesting best solution and provide the code sample for SCRIPTS or UDF.
Best regards, SARAN
Hi SARAN,
I think you can create a simple new ABAP program to check whether the directory has any fills and then raise alert by calling the relevant function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
There is no normal method by which you can achieve this.
Some have previously suggested scripts but issue with a pre or post processing script is that it will only be triggered when a file is found in the directory.
One solution can be to put a dummy file in the directory to trigger the interface. Then from java mapping, using file i\o operation of java, search the directory for the actual file. If found, retrive it and pass it as the output of the java map. Else, throw an exception, which will trigger an alert.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shiladitya Sarkar ,
Thanks for your quick reply.
could you please provide indetail steps on "Then from java mapping, using file i\o operation of java, search the directory for the actual file."As i am not having much idea on Java codes, it would be great if you can provide some code samples...
Best Regards....SARAN
Hi Saran,
I am not sure what other meant by the options UDF, scripts etc.
AFAIK, UDF will be triggered only after the file is picked up. So, i do not think it is an option that you can consider.
Also, using UDFs is essentially a change to your design, which you are not ready.
The scripting option is completely a NON PI option. You have to search for a FILE WATCHER Utility which runs on the OS layer.
Best Regards,
Ravikanth Talagana
Hi,
Refer these links for Java i\o operations.
http://www.java2s.com/Code/Java/File-Input-Output/CatalogFile-Input-Output.htm
http://download.oracle.com/javase/tutorial/essential/io/check.html
http://www.roseindia.net/java/example/java/io/
For java mapping help, pls search in sdn, you will find lots of helpful blogs
Regards
I agree with Shiladitya's solution.
1- You can use a dummy file to start Integration Scenario.
2- At mapping step, with Java mapping, search for file in sorce directory.
3a- If Files are found, read file and continue with scenario
3b- If Files aren't found, raise alert
For Java Mapping, you can do something like this example:
http://wiki.sdn.sap.com/wiki/display/NWTech/JavaMappingtoReadComplexCSVFile
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.