3 Replies Latest reply on Apr 1, 2009 11:09 AM by Tom Fennelly

    ESB File Action Sample Question

    Shannon Lal Newbie

      I am new to ESB and I have been working through the examples that come with JBoss ESB. One of the examples (File Action) reads from an input directory and puts the contents onto the ESB to be processed. Once the contents have been put onto the ESB, it moves the file to an output directory. Does anyone know if you can configure the fs-provider so that it does not move the file to another directory(i.e. it leaves it in the same directory)? If it is possible to leave the file in the existing directory, how will JBoss ESB detect new files to be processed?

      Thanks

      Shannon

        • 1. Re: ESB File Action Sample Question
          Daniel Bevenius Master

           

          Does anyone know if you can configure the fs-provider so that it does not move the file to another directory(i.e. it leaves it in the same directory)?

          By setting 'post-delete' to false and not specifying a 'post-directory' should do the trick.
          <fs-message-filter
           directory="@INPUTDIR@"
           input-suffix=".dat"
           work-suffix=".esbWorking"
           post-delete="false"
           post-suffix=".sentToEsb"
           error-delete="false"
           error-suffix=".IN_ERROR"
          />
          


          If it is possible to leave the file in the existing directory, how will JBoss ESB detect new files to be processed?

          The file will be renamed with the 'post-suffix'.

          To see the full options the best source is the xsd:
          http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd

          Regards,

          /Daniel


          • 2. Re: ESB File Action Sample Question
            Shannon Lal Newbie

            Daniel,
            Thanks for the reply. What is the implication of leaving the file in the directory without changing the name (i.e. not performing any Post operations). Will the ESB continually try to pick up the document or does it rely on the time stamp of the file (last modified) as well.

            Thanks

            Shannon

            • 3. Re: ESB File Action Sample Question
              Tom Fennelly Master

               

              "shannonlal" wrote:
              Daniel,
              Thanks for the reply. What is the implication of leaving the file in the directory without changing the name (i.e. not performing any Post operations). Will the ESB continually try to pick up the document or does it rely on the time stamp of the file (last modified) as well.

              Thanks

              Shannon


              It will be picked up again and again....