File transfer on same server

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf File transfer on same server

  • Creator
    Topic
  • #52697
    Mohammed Muzammil
    Participant

      Dear CloverTechs,

      I am trying to achieve a very simple task and hope you could help.

      Transferring a file from one directory to another.

      After some days of search I came across the following post:

      https://usspvlclovertch2.infor.com/viewtopic.php?t=4830&highlight=transfer

      However was not able to accomplish my task. A new file is created in the outbound directory, however it is an empty file.

      Please see my netconfig attached. Have I missed something very basic?

      thanks

    Viewing 7 reply threads
    • Author
      Replies
      • #75159
        Jim Kosloskey
        Participant

          Mohammed,

          You will need 2 threads one inbound to read the file another outbound to write the file.

          You will need routing set up on the inbound thread to the outbound thread.

          Personally I would use the Fileset/Local protocol for both threads (assuming both the inbound and outbound are referenceable by the Cloverleaf platform.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #75160
          Robert Kersemakers
          Participant

            You can do this with one thread. I have a few threads myself that are only used to move a file (with only minor changes) from one directory to another.

            Like Jim I use the Fileset/Local protocol because I am always moving all files from one directory to another. What you need to do is to route the messages back to the same thread. Have you forgotten that?

            See the included screenprints. In my example I am even creating a copy of the original file, hence the 2 routes.

            Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

          • #75161
            Mohammed Muzammil
            Participant

              Thank you both for the prompt reply.

              Please find my netconfig file attached. I have created a new route rule to route to the same thread. The file is being picked up by the IB thread, however nothing is being written to the OB thread.

              I can see some TCL’s in your netconfigs:  

              I have a very basic question: Will a TCL script be required for this transfer process?

              At the moment, for test purposes, the only task I wanted to achieve was a simple file transfer for one dir to another. (no filename/data manipulation etc).

              Regards,

            • #75162
              Robert Kersemakers
              Participant

                Well, it depends on how you want the transfer to work.

                What you have configured right now is that all files from the inbound directory will be taken and their content will be appended to the file ‘test.txt’ in the outbound directory. I have tried this configuration myself and this works; see the included screenprints and test-files.

                But if you want the separate files to be copied to the outbound directory, you will need to use a specific TCL-proc called ‘gc_getIBFilesetNameForOB’ (it should be in your installation) and put it in the Directory Parse of the Fileset/Local Properties and in the TPS Inbound Data. This proc will take the filename of this file (= message) and put it in the metadata of this message. The outbound filename that you have put in (test.txt) will then be ignored.

                Some screenprints of this as well in the Word-document.

                Hope this helps.

                Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

              • #75163
                Jim Kosloskey
                Participant

                  One of the reasons I use two threads is so that it is easier for others monitoring the integration to see what is happening with just a cursory glance.

                  Either way will obviously work.

                  I have nearly always needed to deploy some Tcl when doing file transfers (not that Ido that many) although the procs Iuse are generic so I only need to provide the appropriate arguments.

                  email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

                • #75164
                  Robert Kersemakers
                  Participant

                    Only 3 attachments per post. This is the result-file.

                    Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

                  • #75165
                    Mohammed Muzammil
                    Participant

                      Thank you Robert,Jim:

                      I did one change to the thread configuration settings (as per your screenshot) and it got it working!

                       – Under the Route messages tab, the Route name was changed to _HCI_static_route_  (by default it was named ‘New Id’..).

                      Maybe this name/identifier is used internally by CL to route?

                      Anyways, thanks a lot for your help.

                      Regards,

                    • #75166
                      Robert Kersemakers
                      Participant

                        Ah! I missed that one.

                        You get the id ‘_HCI_static_route_’ by pushing the button ‘Set static route’. You do this when you want to route ALL messages, regardless of the trx id that was setup (or not) on the Inbound tab (‘Trx id determination Format’).

                        Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

                    Viewing 7 reply threads
                    • The forum ‘Cloverleaf’ is closed to new topics and replies.