HOW READ A FLATFILE INSIDE A BPM

Hi All,
I have this scenario:
a Sender JDBC channel starts the flow and activates the BPM.
Then, I need to implement a Loop that reads single FlatFile from a directory until the directory is empty.
In this Loop the file, once it has been read, is sent via RFC to another system.
The questions are:
How can I read a file (FTP) inside the BPM?
Can I read a single file at time (one for loop)?
Thanks a lot
Daniele

This is not possible with standard PI features.
As work around  you could create an ABAP or Java proxy with reads the files on request.

Similar Messages

  • How to get ACK ID inside the BPM

    Hi,
    In my BPM Scenario,I want to update the database table as soon as the file is created in the destination system.So in the Send step I used Transport Acknowledgement option but I don't know how to get the ACK Id inside the BPM.Please help me.
    Regards,
    Sharmila

    There will be no Ack ID in the BPM.
    Read thru this blog to understand the file adapters ack better,
    /people/michal.krawczyk2/blog/2006/06/22/xi-playing-with-the-file-adapters-acknowledgments
    Regards
    Bhavesh

  • How to Read all files inside resource Folder inside Jar?

    I have a Jar file,,,, The program reads for resource files in the resource folder inside the Jar. I want my program to read all files inside this folder without knowing the names or the number of files in the folder.
    I am using this to make an Applet easy to be updated with spicific files. I just want to add a file inside the resource folder and Jar the program and automatically the program reads what ever is in there!!
    I used the File class to get all file names inside the resource folder. it works fine before Jarring the program. After I jar I recieve a URI not Herarichy Exception!!
    File fold=new java.io.File(getClass().getResource(folder).toURI());
    String[] files=fold.list();
    I hope the question is clear!!

    How to get the directory and jar file that you class resides in:
    // returns path and jarfile (ex: /home/mydir/my.jar)
    public String getJarfileName()
            // Get the location of the jar file and the jar file name
            java.net.URL outputURL = YourClass.class.getProtectionDomain().getCodeSource().getLocation();
            String outputString = outputURL.toString();
            String[] parseString;
            int index1 = outputString.indexOf(":");
            int index2 = outputString.lastIndexOf(":");
            if (index1!=index2) // Windows/DOS uses C: naming convention
               parseString = outputString.split("file:/");
            else
               parseString = outputString.split("file:");
            String jarFilename = parseString[1];
           return jarFilename;
    }If your my.jar was in /home/mydir, it will store "/home/mydir/my.jar" in jarFilename.
    note: getLocation returns "file:/C:/home/mydir/my.jar" for Windows/DOS and "file:/home/mydir/my.jar" for windows, thus why I look for the first and last index of the colon so I can correctly split the string.
    If you want to grab a file in the jar file and get an InputStream, do the following:
    import java.io.*;
    import java.util.Enumeration;
    // jar stuff
    import java.util.jar.*;
    import java.util.zip.ZipEntry;
    public class Jaris
       private JarFile jf;
       public Jaris(String jarFilename) throws Exception
           try
                           jf = new JarFile(jarFilename);
           catch (Exception e)
                jf=null;
                throw(e);
       public InputStream getInputStream(String matchString) throws Exception
           ZipEntry ze=null;
           try
              Enumeration resources = jf.entries();
              while ( resources.hasMoreElements() )
                 JarEntry je = (JarEntry) resources.nextElement();
                 // find a file that matches this string from anywhere in my jar file
                 if ( je.getName().matches(".*\\"+matchString) )
                    String filename=je.getName();
                    ze=jf.getEntry(filename);
          catch (Exception e)
             throw(e);
          InputStream is = jf.getInputStream(ze);
          return is;
       // for testing the Jaris methods
       public static void main(String[] args)
          try
               String jarFilename=getJarfileName();
               Jaris jis = new Jaris(jarFilename); // this is the string we got from the other method listed above
               InputStream is=jis.getInputStream("myfile.txt"); // can be used for xml, xsl, etc
          catch (Exception e)
             // this is just a test, so we'll ignore the exception
    }Happy coding! :)
    Doc

  • How to read, write file inside the JAR file?

    Hi all,
    I want to read the file inside the jar file, use following method:
    File file = new File("filename");
    It works if not in JAR file, but it doesn't work if it's in a JAR file.
    I found someone had the same problem, but no reply.
    http://forum.java.sun.com/thread.jsp?forum=22&thread=180618
    Can you help me ? I have tried this for all night !
    Thanks in advance
    Leo

    If you want to read a file from the JAR file that the
    application is packaged in (rather than a separate
    external JAR file) you do it like this ...
    InputStream is =
    ClassLoader.getSystemResourceAsStream("filename");Better to use
    this.getClass().getClassLoader().getResourceAsStream();
    From a class near to where the data is. This deals with multiple classloaders properly.

  • How to define a process level constant to be used inside a BPM Object?

    I need to define a constant with the name of the process of the instance that it is executing.
    I have a BPM Object that it is shared with multiple processes.
    Inside that BPM Object I have a method that needs the name of the process it is running.
    Is there any way to define a constant visible anywhere in the process? By anywhere I mean inside an BP-Method, not in an Automatic Activity.

    Not sure if this what you're looking for, but in a samples project named 'ExpenseReimbursement' there is a way to set and get global Process Options.
    It might not be suitable for your problem (and maybe not the cleanest solution), but such a setup might be used to construct a globally available variable.
    Kind regards,
    RL

  • How to Achieve Performance Tuning In BPM Studio

    Please Tell me how to achieve performance Tuning in BPm Project . let me know do have any documentation for this .
    Thanks in Advance .

    *5. Group Automatic Activities in a Single Transactional Boundary*
    When you have several automatic activities in a sequence, recognize this as a potential performance improvement opportunity. The default behavior of Oracle BPM is during each Automatic activity's execution:
    1. Initiate the transaction
    2. Read the work item instance's variable information from the Engine's database
    3. Execute the logic in the Automatic activity
    4. If no system exception occurs, commit the transaction and write the instance variable information back to the Engine's database
    Many times you'll instead want to speed execution when there are several Automatic activities in a sequence. If three Automatic activities are in a sequence, then the four items listed above will occur three times. By grouping these into a single transactional boundary, instead of 12 steps you would have:
    1. Initiate the transaction
    2. Read the work item instance's variable information from the Engine's database
    3. Execute the logic in the first Automatic activity
    4. Execute the logic in the second Automatic activity
    5. Execute the logic in the third Automatic activity
    6. If no system exception occurs, commit the transaction and write the instance variable information back to the Engine's database
    This grouping of Automatic activities into a single transactional boundary can be done in one of these three ways:
    1. Create a Group around the sequence of Automatic activities (lasso the three activities) -> right mouse click inside the dotted line -> click "Create a Group with Selection" -> click "Runtime" in the upper left corner -> click the checkbox "Is Atomic".
    2. Instead of placing the Automatic actiivities in the process, add them in a Procedure and then call the Procedure from a new Automatic activity in the process.
    3. In Oracle BPM 10g you can enable "Greedy" execution for the process by right mouse clicking the process's name in the Project Navigator tab -> click "Properties" -> click the "Advanced" tab -> click the "Enable Greedy Execution" radio button.
    Dan

  • I want to open a folder and see how many times theres inside like you could before...

    I want to open a folder and see how many items theres inside like you could before...
    How can you do that on maverick plz ?

    Open it and choose Show Status Bar from the Finder's View menu.
    (112378)

  • I can't see how to edit PDF inside Portfolio for Acrobat X. In Acrobat 9 Pro

    I can't see how to edit PDF inside Portfolio for Acrobat X. I can do this in Acrobat 9 Pro with the Document pull down menu. Did they take this away in Acrobat X?

    Whether it's maxed or not doesn't make any difference.
    The bottom part of the image/scroll bar is always under the Windows taskbar any time the URL is opened.
    It is always fixed by doing something, either switching to and back from another window, or turning on and off one or more toolbars.
    That shouldn't be necessary. The bottom part should be visible when the URL is opened.

  • How does Iterate work inside an Action

    I'm having trouble figuring out how does <Iterate > work inside an <Action> in a workflow. My <Action> is to call a subprocess that takes several arguments and initiates an approval. Since I need to fire-off several approvals at the same time instead of chaining them I use <Iterate> that loops over a list variable.
    Now the subprocess being an approval the workflow gets suspended and divided into multiple parallel paths. My question is that how do these parallel paths assimilate together after approval or they don't assimilate at all and process in separate parallel lines or otherwise whichever approval returns first takes precedence and proceeds with rest of the activities.
    TIA,
    AndyDev

    Thanks for the reply. But this doesn't answer my question completely.
    Say within <Iterate> I specify **for='var_name' in='list_name'** will it continue to run after it has run once for each element in the list. If yes, doesn't it trigger the sub-process multiple times, something I don't want. If no, what happens next ? (that was actually my original ques).
    Say if list_name had 5 elements, it triggers one sub-process (which is a multiapproval) for each of them. What happens next ? Does it transition to next activity? Does it wait for all approvals to finish approve/reject?

  • Reading All Files inside folder codeBase, Applet!

    I have an applet, placed in a Jar file.. everything is ok,,
    I have a resource folder outside the Jar, which has some files.
    how can I read what is inside the resource folder, which is located outisde the Jar, without having their addresses before hand!!
    in short, I would like the applet to open the resource folder, get an array of all files in the folder, and then reads them.
    I tried encapsulating the getCodeBase().toURI() with a File Object.
    But when I call the file.list() it throws an AccessControlException
    thank you.

    Here is a simple example of using ftp to obtain file list using Jakarta common net package.
    // ftp - related imports
    import org.apache.commons.net.ftp.FTPClient;
    import org.apache.commons.net.ftp.FTPReply;
    // main method
              FTPClient ftpClient = null;
              try {
                   ftpClient = new FTPClient();
                   ftpClient.connect("REMOTE_HOST", "remote port, use 21 in common case");
                   System.out.print(ftpClient.getReplyString());
                   int reply = ftpClient.getReplyCode();
                   if(!FTPReply.isPositiveCompletion(reply)) {
              ftpClient.disconnect();
              System.err.println("FTP server refused connection.");
              System.exit(1);
                   boolean isLoggedIn = ftpClient.login("your login", "your pass");
                   ftpClient.changeWorkingDirectory("/your remote dir/");
                   String[] fNames = ftpClient.listNames();
                   for (int i = 0; i < fNames.length; i++) {
                        System.out.println(fNames);
                   ftpClient.logout();
              } catch (IOException e) {
                   e.printStackTrace();
              } finally {
                   if(ftpClient.isConnected()) {
                        try {
                             ftpClient.disconnect();
                        } catch(IOException ioe) {
                             ioe.printStackTrace();
    System.exit(0);

  • How to center chars inside of cells of the comb field (text field)?

    Hello gurus,
    [Intro]
    I'm working on preparation of the legal form for tax return.  Due to sophisticated form structure and customer's demand to prepare return of enourmous size (more than thusand pages) I decided to remake obsolete form using "comb of" option in order to reduce size of the source and prevent memory allocation issues on customer side.
    [Issue details]
    Legal requirement is to have typeface Courier New 16pt-18pt and cells of the certain size.
    This is how the form provided by tax authorities looks like:
    Here you can see that chars are somehow centered inside of the cells but when I create comb in my livecycle designer it is not the case and I have different layout:
    Look how letters are placed inside of the cells. After some research I've found out that there is a left margin which always exists in every cell of the comb, most probably triggered by the border. Tried to edit XML source but didn't achieve any significant success. The issue is not caused by the narrowness of the cells and reproductible even with extra wide ones.
    Here is my current XML:            
              <field h="5.7mm" name="STR_230_TOT_TX" w="60mm" x="4.264278in" y="4.458417in" anchorType="middleCenter">
                   <ui>
                      <textEdit hScrollPolicy="off">
                         <border hand="right">
                            <edge stroke="dotted"/>
                            <corner stroke="dotted" thickness="0.176mm"/>
                         </border>
                         <margin bottomInset="0mm" leftInset="0mm" rightInset="0mm" topInset="0mm"/>
                         <para hAlign="left" vAlign="top"/>
                         <comb numberOfCells="15"/>
                      </textEdit>
                   </ui>
                   <font size="16pt" typeface="Courier New"/>
                   <margin bottomInset="0mm" leftInset="0mm" rightInset="0mm" topInset="0mm"/>
                   <bind match="dataRef" ref="N140_TAX_AMOUNT"/>
                   <assist>
                      <speak disable="1"/>
                   </assist>
                </field>
    This is how comb field is supposed to be rendered (screenshot from the documentation):
    Everything is centered and it is a behaviour I supposed to see.
    Are there any possible solutions how to place chars at center of the cells?

    Hi Igor,
    It's the font that you are using that causes the problem. 
    I found it weird, your problem, so I quickly made a form with a text field with a comb.  I did not have the problem.
    So I took your snippet and added it to my form, then I have the same problem.  You are using Courier New, a font that has the same width for all characters.  I don't know why the problem is there as for me it should be in the center as with all other fonts.  I would report this as a bug to support.
    I know it's not a solution for you, but that seems to be the root of the problem.  Maybe you can look for another font, similar to Courier New, but that does not have a fixed width.  I looked it up and it appears that there's a font called Hellschreiber, that uses the same letterforms, but is proportional.  The font is not freely downloadable, so I cannot test for the moment.  Another page says this: "There is a proportional font that kinda looks like Courier. It is called American Typewriter. "  Again, I have not tested.
    Hellschreiber Serif is a proportional typeface using Courier letterforms as a basis.
    http://en.wikipedia.org/wiki/Courier_(typeface)

  • How to manage data inside iCloud?

    How to manage date inside iCloud, like delete the apps I don't want in iCloud storage?

    Hi, thanks I solve this problem already 

  • Please help on how to use variables inside a method call

    Hello guys,
    How's it goin?
    Pardon me if you find my question silly, but I am relatively
    new in ActionScript 2.0 programming.
    I have here a simple problem. It seems I can't use a variable
    inside a method call of an object. Here's the code. Please note of
    the authParams string variable below.
    import AkamaiConnection;
    import mx.services.WebService;
    var GeneratedToken:String;
    var authParams:String;
    // Create a Web Service object
    var TokGenService:WebService = new WebService("
    http://webservice.asmx?wsdl");
    // Call the web service method
    var myToken:Object = TokGenService.GenerateToken();
    // Create an AkamaiConnection object
    var connection:AkamaiConnection = new AkamaiConnection();
    connection.addEventListener("onConnect", this);
    connection.addEventListener("onError", this);
    // If you get a result from the web service, save the result
    in a variable
    myToken.onResult = function(result)
    // If you get a result from the web service, save the result
    in a variable
    myToken.onResult = function(result)
    GeneratedToken = result;
    authParams = GeneratedToken +
    "&aifp=v001&slist=37414/test/Streaming/";
    //Call the Connect method of the AkamaiConnection class
    connection.connect("cp37414.edgefcs.net/ondemand",true,true,5,true,false,"443","rtmpt",
    authParams);
    But then, if I use a hard-coded string value in lieu of the
    variable, the method call works!
    connection.connect("cp37414.edgefcs.net/ondemand",true,true,5,true,false,"443","rtmpt",
    "testStringvalue");
    I don't know what I'm missing or what I'm doing wrong... Can
    somebody help me please? I am using a 30-day trial version of Adobe
    Flash CS3. Also, when I Trace output the variables, the values are
    there. It just that they can't be read or recognize inside the
    method call. Is this a ActionScript limitation?
    Thanks so much in advance!

    The result param is a returned, “Decoded ActionScript
    object version of the XML”. I am not exactly sure what that
    means but I have had issues of returned XML values and their
    datatype. When I did have these issues I had to cast or convert
    into the desired datatype. Try one of the following, assuming the
    problem is related to the code that you have bolded.
    GeneratedToken = result.toString();
    authParams = GeneratedToken +
    "&aifp=v001&slist=37414/test/Streaming/";
    Or
    GeneratedToken = String(result);
    authParams = GeneratedToken +
    "&aifp=v001&slist=37414/test/Streaming/";
    Or
    GeneratedToken = result.toString();
    authParams = String(GeneratedToken +
    "&aifp=v001&slist=37414/test/Streaming/");

  • Problem in reading an object inside another obj in C thru JNI

    Hi All,
    I am passing a java class object from Jave to C thru JNI.
    This object has many integer fields + one object of another class, which also has some fields.
    I am able to read integer fields from C but not able to read fields inside another object.
    Can anyone plz help me in reading the object inside another object from C.
    I m pasting class here for better understanding :
    public class ImageMergeInformation {
    public ImageInformation outputImageInfo;
    public ImageInformation[] inputImageInfo = new ImageInformation[8];
    public int topMargin;
    public int bottomMargin;
    I wanna read ImageInformation obj.
    Plz help me...
    Thanks in Advance,
    Regards,
    Sneha

    You have to get the field id (getFieldID) of the variable you want, e.g. outputImageInfo, then get the object (getObjectField) in that field. At this point, you can start over (get the class, get the field id, get the object).

  • Web service response processing inside a BPM

    Hi Experts,
    Please can you let me know if it is possible to achieve the following inside a BPM:
    u2022     Once you getting the web service  SOAP response, determine if itu2019s a SOAP fault or a normal web service response.
    u2022     If itu2019s a SOAP fault, create a retry loop with a wait step inside the BPM to try and retry the process (perhaps 5 times in 1 minute intervals).
    u2022     After the retry intervals, if the message is still in a failed step, force the BPM to go into an error state
    u2022     If the Web Service returns a normal response, log the response inside a database table and end the BPM
    If it is possible, please can you provide an example?
    Thank you,
    Brendon

    Hi
    Have you found the workaround?
    Sorry for refreshing topic. Flag mustUnderstand ='1' in response is unussual thing.
    BR

Maybe you are looking for

  • No posting possible in fiscal year 2015

    Hi I am getting below pasted error while performing AFAB (Depreciation Run). This is the first time we are running the depreciation in the production system. We did not encounter this error in quality or development. This is a gap implementation proj

  • Boot Camp for Windows 7 64 bit on 21.5" late 2009 iMac

    I've read much about installing Windows 7 64 bit on my 21.5" late 2009 iMacs - - nevertheless there is some lack of clarity about how to do it right. First I read "http://manuals.info.apple.com/enUS/Boot_Camp_Install-Setup10.6.pdf". That's all well a

  • How do i reduce the file size on a pdf document?

    How do i reduce the file size on a pdf document?

  • Data Import Wizard from Excel on DATE column

    I have exported data to a csv in Oracle SQL Developer and one of the columns are of an Oracle Date datatype. In opening up Excel I see the Date column represented as 15-MAY-01 12.00.00.000000000 AM. I am now going through the Data Import Wizard to cr

  • Price update on the Invoice Level

    Hello gurus,    If I want to update my pricing on the Invoice level, what are the steps that I need to follow to carry out the configuration? As of now, we have the pricing setup only for sales orders and the same prices are copied on to the Invoice,