BPM Scenario how to wait til file deleted in Target Directory
Hi Frnds,
I am working on one JMS to File scenario,my requirement is i am sending JMS message to File Directory,when i placed meg in target directory some vent wil read the message it wil process in to SAP.
When i receive once again mesage in JMS scenario will start execute , is previous message still in File Directory i have to wait to event occured,after procesing only i have to place next message.
How many different ways i can achieve this.
many thanks,
RAJ
Hi,
you can create a java proxy in your BPM that would check the file and if so wait for some time
and check once more
Regards,
Michal Krawczyk
Similar Messages
-
Unable to convert the file name in Target directory
Dear Experts,
Currently iam facing a problem with some files.my interface is a File to file .As per the interface the sender will pick the flatfiles from source directory which the file name was BNP_NE201.txt once my file reached to target directory the name of the file willrenamed as VENDOR_Payment.NE201 automatically for this they have done some OS level script in receiver communication channel of the first interface which we have added "un operating system command after message processing" in processing parameters tab.again one more sender comm channel wil pick the file from first target directory which is having naming convesion of "VENDOR_Payment.NE201 " and post it to target. all the two interfaces are file to file (NFS) . for a parctuclar day files has been posted to 1 st target directory and the receiver communication channel is not yet convert the file names bcz of that the second communication channel can't able to pick the files from target directory. for some times that is working fine and some times it is unable to convert.
from our side i check every thing .could you please suggest me the way to approch
Reagrs,
Kiran tanuku>> for a parctuclar day files has been posted to 1 st target directory and the receiver communication channel is not yet convert the file names bcz of that the second communication channel can't able to pick the files from target directory. for some times that is working fine and some times it is unable to convert.
You need to wait until the file is converted. After when it is converted then the second interface sender communication channel will pick the files.
What do u mean by unable to convert?
Is it unable to do the content conversion? if so then check the data as you said that it sometimes it works fine.
> The best approach is to change the name of the file in the receiver communciation channel instead of using a script.
Thanks, -
BPM scenario - How to check it?
Hi Experts,
I couldn't see any difference between in wsdl file which was created for BPM scenario and non-BPM scenario.
How to make sure that the BPM process worked fine? I couldn't get anything for SXMB_MONI_BPE. Am I missed out any steps?
Regards
SaraHi,
Refer to the guide: 'How to Monitor Integration Processes' at https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e7bc3a5a-0501-0010-1095-eb47159e169c.
Regards
Manish -
BPM Scenario : How to Proceed ?
hi folks,
I am working on a BPM scenario .
Scenario goes like this : I want to pick the data from a file and post the data into SAP using a RFC and get some data in response .now data which came back as a response from RFC response should be written in a XML file whose name should be dynamically generate and then the name of the dynamically generated XML file should go into a table.
My BPM is like this
Step 1 : Receive ( For collecting the data from file)
Step 2 : Sync Call to RFC ( For making a sync call to RFc and then sending back the resp data)
Step 3 : Send Step ( For sending the response data to XML file , name should be dynamically generated)
Step 4 : Send step ( For sending the dynamic file name of XML file to Table)
Till step 3 i have worked fine and getting the desired output also ( as i am getting the dynamic file name in the output xml file) but after that not sure how to proceed...
how to push the dynamic file name from XML file to Table.
Now my doubts...
Is design of my BPM is right...? if not please correct me...and also if there is any other way to get the same functionality ?
Regards,Hi Latika,
-->hw r u generating the filename? is it thru a field in ur structure that u are capturing by setting adapter specific attributes in receiver file adapter config?
Yes
-->if yes, then use that field only to get the file name. in ur last send step u can use a mapping to trasfer this field into the target structure for oracle database.
even i also want todo this...but how..this is the question..
My BPM is like this
Step 1 : Receive ( For collecting the data from file)
Step 2 : Sync Call to RFC ( For making a sync call to RFc and then sending back the resp data)
Step 3 : Send Step ( For sending the response data to XML file , name should be dynamically generated)
Step 4 : Send step ( For sending the dynamic file name of XML file to Table)
I step 3 data to file(dynamic file name) is send.
Now how can i send the data from dynamic file generated just now to JDBC.....?
Kindly help by step by steps..explanation..
Regards, -
hi forum experts,
i have a file to file scceanrio....without BPM....
there is only one mapping ...in the receiver determination......
the problem is........
when in the receiver communication channel....in the <target directory>....i give something absurd.....e.g. '-', the file cant be put to the desired directory...
and the file is lost.............moreover nowhere in the rwb i can see what the error is.......in rwb it shows file delivered successfully........
now how can i retrive the lost messgae.....how can i resend the message from rwb or MDT............
is it possible from MDT to resend the message payload again????
pls helpDhar,
Is this is development or production? Also why you have given the target direcotry as '-' ? Is this your requirement?
Anyway you can post the same message once again from RWB. Since it is file to file scenario you can post from RWB.
Go to sxmb_moni and open your message. From the source payload right click and select view source. Then copy this payload and go to RWD ---> Adapter Engine ---> Test Message ---> Here you give your Source business system, Target business sytem and all the parameters. Also you paste the payload here. Also give your user name and password and select Quality of service BE. Then send the message. You will see a new message in sxmb_moni.
Also would recommend to give a name for target directory.
Check this weblog for some help on this:
/people/michal.krawczyk2/blog/2005/08/25/xi-sending-a-message-without-the-use-of-an-adapter-not-possible
/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
---Satish -
How to view the file content from the directory? getting Error:ORA-21560
SQL> create directory READ_LOB_DIR as 'D:\Prj\Comm\Data';
CREATE OR REPLACE Procedure READ_FILE_LOB IS
-- Input Directory as specified in create directory
l_dir CONSTANT VARCHAR2(30) := 'READ_LOB_DIR';
-- Input File which is read word by word
l_fil CONSTANT VARCHAR2(30) := 'testfile.txt';
-- Separator Character between words is a BLANK (ascii = 32)
l_seb CONSTANT RAW(100) := UTL_RAW.CAST_TO_RAW(CHR(32));
-- Character at the end of the file is NEWLINE (ascii = 10)
l_sen CONSTANT RAW(100) := UTL_RAW.CAST_TO_RAW(CHR(10));
-- Pointer to the BFILE
l_loc BFILE;
-- Current position in the file (file begins at position 1)
l_pos NUMBER := 1;
-- Amount of characters have been read
l_sum BINARY_INTEGER := 0;
-- Read Buffer
l_buf VARCHAR2(500);
-- End of the current word which will be read
l_end NUMBER;
-- Return value
l_ret BOOLEAN := FALSE;
BEGIN
-- Mapping the physical file with the pointer to the BFILE
l_loc := BFILENAME(l_dir, l_fil);
-- Check if the file exists
l_ret := DBMS_LOB.FILEEXISTS(l_loc) = 1;
IF (l_ret) THEN
dbms_output.put_line('File ' || l_fil || ' in Directory ' || l_dir ||
' exists');
-- Open the file in READ_ONLY mode
DBMS_LOB.OPEN(l_loc, DBMS_LOB.LOB_READONLY);
LOOP
-- Calculate the end of the current word
l_end := DBMS_LOB.INSTR(l_loc, l_seb, l_pos, 1);
-- Process end-of-file
IF (l_end = 0) THEN
l_end := DBMS_LOB.INSTR(l_loc, l_sen, l_pos, 1);
l_sum := l_end - l_pos - 1;
DBMS_LOB.READ(l_loc, l_sum, l_pos, l_buf);
dbms_output.put_line(UTL_RAW.CAST_TO_VARCHAR2(l_buf));
EXIT;
END IF;
-- Read until end-of-file
l_sum := l_end - l_pos;
DBMS_LOB.READ(l_loc, l_sum, l_pos, l_buf);
dbms_output.put_line(UTL_RAW.CAST_TO_VARCHAR2(l_buf));
l_pos := l_pos + l_sum + 1;
END LOOP;
DBMS_LOB.CLOSE(l_loc);
ELSE
dbms_output.put_line('File ' || l_fil || ' in Directory ' || l_dir ||
' does not exist');
END IF;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Error:' || SQLERRM);
DBMS_LOB.CLOSE(l_loc);
END;
The Text file content is...
Copyright 1996,2001 Oracle Corporation. All Rights Reserved
This file contains installation instructions for installing the
Oracle8 ODBC Driver software.
It is divided into four parts:
o Part I: Summary of systems supported by Oracle8 ODBC client
software
Lists the platforms on which the Oracle8 ODBC Client software can
be installed.
o Part II: Oracle8 ODBC Driver software.
Describes the files, and installation prerequisites for the Oracle8
ODBC driver software.
o Part III: Exploding the kit onto your system
Describes how to explode the kit onto your system hard drive.
o Part IV: Installation Instructions
Describes how to install the Oracle8 ODBC driver.
Part I: Systems supported by the Oracle8 client software
You can install the ODBC client software on any of the following systems:
o Windows 2000
o Windows NT X86
o Windows 95
o Windows 98
The Oracle8 ODBC Driver provides support for ODBC connections
from Windows 2000, Windows NT, Windows 95, and Windows 98 systems
to Oracle databases.
o Part II: Oracle8 ODBC Driver software.
Refer to the following files for information about the Oracle8 ODBC Driver:
LICENSE.TXT - Oracle8 ODBC Driver License Agreement. Read carefully
before installing and/or using this product. Enclosed in
your software distribution kit.
SQORA.HLP - A Window's Help file which is the primary reference
manual for the Oracle8 ODBC Driver.
ODBCRelnotes.WRI - The release notes for the Oracle8 ODBC Driver
which contains information which may have not been
included in the Help file.
Installation Prerequisites
See the Oracle8 ODBC Driver release notes (ODBCRelnotes.WRI),
for a complete list of software products required and their versions.
Time Required
The installation of the Oracle8 ODBC Driver takes approximately 5
minutes. The actual time may be shorter or longer, depending upon
your hardware configuration.
Disk Space Required
The Oracle8 ODBC driver installation requires approximately 2
megabytes of available storage space. The space required depends upon
what files you already have installed. The installation procedure
checks to see if you have enough available disk space. If you do not,
the installation fails.
Part III: Exploding the Kit onto your system
Expand the self-extracting archive file onto your hard drive.
C:\> ORA8174.EXE
Part IV: Installation Instructions
Oracle8 ODBC Driver 8.1.7.4.0
This section assumes the following:
1. MS Windows 2000, Windows NT, Windows 95 or Windows 98 is running.
2. Oracle Universal Installer shipping with 8.1.7 has already been
installed on your system.
3. Part III has been completed.
Software fixes:
Refer to release notes (ODBCRelnotes.wri) for a complete list of
Software fixes.
Installation Instructions
Once the self-extracting archive file ORA8174.EXE has been
exploded it will create an installable directory structure
onto your hard drive. Run the Oracle Universal Installer from
your local drive.
1. On the screen "File Locations" use the "Browse" button of
the source path to choose the file 'products.jar' from the
folder that ORA8174.EXE was extracted to. Choose 'Next'.
2. You will receive a warning that some of the dependencies of
this product are not found in the staging area. This warning
is OK. The ODBC driver depends on the Net8 Client being already
installed on the system. Answer 'Yes' to continue.
Oracle is a registered trademark of Oracle Corporation.
Microsoft, MS are registered trademarks of Microsoft Corporation.
Microsoft Windows, Windows NT, Windows 95, Windows 98 and Open Database
Connectivity are trademarks of Microsoft Corporation.
All other trademarks and registered trademarks are the property
of their respective owners.
The output was...
File testfile.txt in Directory READ_LOB_DIR exists
Copyright
1996,2001
Oracle
Corporation.
All
Rights
Reserved
This
file
contains
installation
instructions
for
installing
the
Oracle8
ODBC
Driver
software.
It
is
divided
into
four
parts:
o
Part
I:
Summary
of
systems
supported
by
Oracle8
ODBC
client
Error:ORA-21560: argument 2 is null, invalid, or out of range
I want to diplay/view as per file content format from the file under that specified directory.
Have any other method / any help or suggestions would be really appreciated.I changed the code like...
CREATE OR REPLACE Procedure READ_FILE_LOB_tmp IS
-- Input Directory as specified in create directory
l_dir CONSTANT VARCHAR2(30) := 'READ_LOB_DIR';
-- Input File which is read word by word
l_fil CONSTANT VARCHAR2(30) := 'testfile.txt';
-- Separator Character between words is a BLANK (ascii = 32)
l_seb CONSTANT RAW(100) := UTL_RAW.CAST_TO_RAW(CHR(32));
-- Character at the end of the file is NEWLINE (ascii = 10)
l_sen CONSTANT RAW(100) := UTL_RAW.CAST_TO_RAW(CHR(10));
-- Pointer to the BFILE
l_loc BFILE;
-- Current position in the file (file begins at position 1)
l_pos NUMBER := 1;
-- Amount of characters have been read
l_sum BINARY_INTEGER := 0;
-- Read Buffer
l_buf VARCHAR2(4000);
-- End of the current word which will be read
l_end NUMBER;
-- Return value
l_ret BOOLEAN := FALSE;
BEGIN
-- Mapping the physical file with the pointer to the BFILE
l_loc := BFILENAME(l_dir, l_fil);
-- Check if the file exists
l_ret := DBMS_LOB.FILEEXISTS(l_loc) = 1;
IF (l_ret) THEN
dbms_output.put_line('File ' || l_fil || ' in Directory ' || l_dir ||
' exists');
-- Open the file in READ_ONLY mode
DBMS_LOB.OPEN(l_loc, DBMS_LOB.LOB_READONLY);
LOOP
-- Calculate the end of the current word
l_end := DBMS_LOB.INSTR(l_loc, l_sen, l_pos, 1);
-- Process end-of-file
IF (l_end = 0) THEN
EXIT;
END IF;
-- Read until end-of-file
l_sum := l_end - l_pos;
DBMS_LOB.READ(l_loc, l_sum, l_pos, l_buf);
dbms_output.put_line(UTL_RAW.CAST_TO_VARCHAR2(l_buf));
l_pos := l_pos + l_sum + 1;
END LOOP;
DBMS_LOB.CLOSE(l_loc);
ELSE
dbms_output.put_line('File ' || l_fil || ' in Directory ' || l_dir ||
' does not exist');
END IF;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Error:' || SQLERRM);
DBMS_LOB.CLOSE(l_loc);
END;
Now its working fine with one addtional line...
The file content is...
This is My Content
This is My Content
This is My Content
This is My Content
This is My Content
But The output was...
File testfile.txt in Directory READ_LOB_DIR exists
This is My Content
This is My Content
This is My Content
This is My Content
This is My Content
here, i want to delete that additonal line...? -
How to download a file to a predefined directory...
Hi,
I would like to download a file to a predefined directory, ie, instead of the prompt of asking the user, the directory to which he should download the file I would like to the temp folder of windows or any other directory...
Can anyone please tell me how to do this....
Thanks in advance...hi,
Due to security issues you can not get programmatic access to local folders with flex web based applications. With Air you can do this as it behaves as a normal desktop application. One workaround which is only of value if the file you want to save is specifically going to be used by the app is to use shared Objects, even this will require user interaction the first time as the shared objects have a fairly small allowable space for saving and the user will be prompted to update that value if required.
David. -
How to list all files in a given directory?
How to list all the files in a given directory?
A possible recursive algorithm for printing all the files in a directory and its subdirectories is:
Print the name of the directory
for each file in the directory:
if the file is a directory:
Print its contents recursively
else
Print the name of the file.
Directory "games"
blackbox
Directory "CardGames"
cribbage
euchre
tetris
The Solution
This program lists the contents of a directory specified by
the user. The contents of subdirectories are also listed,
up to any level of nesting. Indentation is used to show
the level of nesting.
The user is asked to type in a directory name.
If the name entered by the user is not a directory, a
message is printed and the program ends.
import java.io.*;
public class RecursiveDirectoryList {
public static void main(String[] args) {
String directoryName; // Directory name entered by the user.
File directory; // File object referring to the directory.
TextIO.put("Enter a directory name: ");
directoryName = TextIO.getln().trim();
directory = new File(directoryName);
if (directory.isDirectory() == false) {
// Program needs a directory name. Print an error message.
if (directory.exists() == false)
TextIO.putln("There is no such directory!");
else
TextIO.putln("That file is not a directory.");
else {
// List the contents of directory, with no indentation
// at the top level.
listContents( directory, "" );
} // end main()
static void listContents(File dir, String indent) {
// A recursive subroutine that lists the contents of
// the directory dir, including the contents of its
// subdirectories to any level of nesting. It is assumed
// that dir is in fact a directory. The indent parameter
// is a string of blanks that is prepended to each item in
// the listing. It grows in length with each increase in
// the level of directory nesting.
String[] files; // List of names of files in the directory.
TextIO.putln(indent + "Directory \"" + dir.getName() + "\":");
indent += " "; // Increase the indentation for listing the contents.
files = dir.list();
for (int i = 0; i < files.length; i++) {
// If the file is a directory, list its contents
// recursively. Otherwise, just print its name.
File f = new File(dir, files);
if (f.isDirectory())
listContents(f, indent);
else
TextIO.putln(indent + files[i]);
} // end listContents()
} // end class RecursiveDirectoryList
Cheers,
Kosh! -
How to retrieve all files in a given directory?
Hi all,
I am a newbie to Java. I have to retrieve all files in a given directory. The names of the files are not known to me. Only the name of the directory is known. How can I retrieve and read all those files?
GaryCheck out the list and listFiles method: http://java.sun.com/j2se/1.3/docs/api/java/io/File.html
-
[SOLVED] C : How to block opening files "above" a specified directory?
SOLVED: Used
man 3 realpath
Hello Archers,
I have this one problem I've been struggling with. I kind of solved it but the solution's hackish.
My question is how do you prevent the opening of files "above" a specified directory? The reason behind this is that I'm writing a simple sharing server, something like Xyne's quickserve, but in C and with a GTK GUI. I'm using the libmicrohttpd library.
The program works this way: the user selects a port and a directory to be "served", and then he can access the files under the directory he chose. However, there obviously needs to be a way to prevent the user from opening files above the directory by using ".."'s for example.
For now, I simply plan on rejecting all queries containing ".." (http://github.com/houbysoft/quickshare/ … hare.c#L59), but that's obviously very imperfect -- and you could get around it if there is a symlink in the directory for example.
Any pointers will be very appreciated, thanks.
Last edited by y27 (2010-03-17 02:59:14)tavianator wrote:
man realpath wrote:BUGS
The POSIX.1-2001 standard version of this function is broken by design, since it is impossible to
determine a suitable size for the output buffer, resolved_path. According to POSIX.1-2001 a buffer
of size PATH_MAX suffices, but PATH_MAX need not be a defined constant, and may have to be obtained
using pathconf(3). And asking pathconf(3) does not really help, since, on the one hand POSIX warns
that the result of pathconf(3) may be huge and unsuitable for mallocing memory, and on the other
hand pathconf(3) may return -1 to signify that PATH_MAX is not bounded. The resolved_path == NULL
feature, not standardized in POSIX.1-2001, but standardized in POSIX.1-2008, allows this design
problem to be avoided.
So be careful to either pass resolved_path as NULL and bite the potential unportablilty bullet, or copy canonicalize_file_name or canonicalize_filename_mode from gnulib.
Yeah, I am passing NULL. -
How to read all files under a folder directory in FTP site
Hi Experts,
I use this SQL to read data from a file in FTP site. utl_file.fopen('ORALOAD', file_name,'r');
But this need to fixed file name in a directory. However, client generate output file with auto finename.
SO do we have any way to read all file by utl_file.fopen('ORALOAD', file_name,'r');
We need to read all file info. because client claim for security issue and does not to overwirte output file name,
we must find a way to read all file in output directory.
Thanks for help!!!
JimIf you use Chris Poole's XUTL_FTL package, I believe that contains functions that allows you to query the directory contents.
http://www.chrispoole.co.uk/apps/xutlftp.htm
Edited by: BluShadow on Jan 13, 2009 1:54 PM
misread the original post -
How do you add files to a target of an Xcode project from the terminal?
Hi friends.
I am building a tool to build projects in an automated way. So far it is working great but I can't find a command to add files to a target from the command line.
Basically what I want to do is the following:
I have a directory with the XCode project, something like:
- Classes
- Images
- Configuration
- Etc
I want to add some files to the folder Images that will be included in the build output.
Is this possible?
Thanks!!Is this helpful?
http://www.askdavetaylor.com/fancymac_os_x_command_linetricks.html -
I'm using Adobe Air 3 for IOS offline app, and I want to implement a download updates (html files + js,css) feature from within the application. The files would be displayed in a StageWebView component.
Since Apple doesn't allow saving files inside the installation directory, I must use ApplicationStorageDirectory instead to download files into.
I want those download html files to link to .js / .css files already installed within the main application directory (e.g. at myApp.app).
The reason for that is I want to minimize the number of the downloaded (shared) files as much as possible. Is this possible?
Thank you.I think this doesn't work in StageWebView:
http://help.adobe.com/en_US/air/build/WSfffb011ac560372f7e64a7f12cd2dd1867-8000.html#WS901 d38e593cd1bac354f4f7b12e260e3e67-8000
"Note: Links in a StageWebView instance cannot open URLs that use a custom URI scheme."
So I can't for example do this:
<link rel="stylesheet" href="app:/CSS/Templates.css" type="text/css" media="screen, mobile" title="main" charset="utf-8">
What I need is something like the following:
Inside ApplicationStoarageDirectory (/Library/Application Support/):
test.html
I need it to link to a css file located inside ApplicationDirectory (installation directory), something like:
<link rel="stylesheet" href="../../MyApp.app/CSS/Templates.css" type="text/css" media="screen, mobile" title="main" charset="utf-8"> -
How to read all files' name in a directory and store in a string array?
as title
One possibility is to use the listFiles() method, using recursion if you want the files in the sub-directory also. Check API documentation for java.io.File.
-
File Adapter : Dynamic Target Directory
Hi EveryBody,
I have an IDOC to File Scenario in which based on some field value X in IDOC i need to send the file to Different locations under the same FTP Server.
For Example : if X = 01 then Target folder T1
X = 02 then Target folder T2.
Can somebody help me out on the same.Possibly this can be done by Dynamic Configuration.Can somebody send me some links.
Regards,
ZabiullaHi,
First of all I would suggest to avoid the mail communications for the query.
Its against the SDN rules.
please read [Rules of Engagement|/thread/117188 [original link is broken];.
About Solution, you need not have to go for Dynamic Target Directory
You can use the Variable substitution concept here.
In the Target directory pass the %Var1%
and use Var1 ---> payload:<fieldName>
Refer to the last part of this link to understand this better,
http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
For dynamic configuration you can also refer below link
Dynamic configuration of Receiver FTP File channel
Thanks
Swarup
Maybe you are looking for
-
How can I hide a button with javascript in Captivate 8?
I need to run some javascript in my project and at the same time I want to hide a button, so I can't use advanced actions.
-
URGENT HELP NEEDED PLEASE - z10
Hi all, I'm new to these forums because this is the first time my BB Z10 has played up on me Bascially, my WiFi connection is strong and connected but my device always reverts to using my Mobile Network for data. Also, if it does use WiFi it is slow
-
We created a limit map variable using a OLAP DML program and refer it via a view as follows. While the view got created all columns show up as undefined type. This probably means it is not finding the limit map definition? Any clues as to what needs
-
I am having situation in my project in which I need to transpose the data, means need to display all rows to column. Please asap help me on this. Thanks in advance Anup
-
I can't reset my PXI-6713.
I can't reset my PXI-6713. My os is Windows 2000 , LV 6.1 , Nidaq 6.8.0 . I have another card in the pxi chassis , a 6704 wich I can reset. Im using the Reset vi located in Daq AO . I know I have the right dev number as I can set the analog outputs t