SFTP on a Windows Deployment

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf SFTP on a Windows Deployment

  • Creator
    Topic
  • #54511
    Danny Wheeler
    Participant

    I have written a TCL script utilizing Putty PSCP to make the transfer.  What is the best way to implement this script in Cloverleaf?  We are trying to do away with random stored procedures and would like to get all of these types of transactions done in Cloverleaf.  

    I was thinking maybe a UPOC thread?  I really only need this interface to watch a directory for new files, then run this script.  I do not need Cloverleaf to inbound the file into the engine as all the manipulations will be done in the TCL script.  I do not know how to create a thread that does not try to bring the file into the engine and that only runs a TCL script based on criteria.

    If there is a far superior way to handle this I would like to hear about those as well.

    Thank you for your time!

    Current Production Version of Cloverleaf 5.8.5.0.

Viewing 10 reply threads
  • Author
    Replies
    • #81777
      David Barr
      Participant

      Cloverleaf isn’t designed for this type of task. You can get it to work, but in my opinion you’re much better off using a managed file transfer (MFT) product.

    • #81778

      A UPoC thread would do the trick. The thread is scheduled to run on a timer, your code would go into the time mode of the TPS proc.

      -- Max Drown (Infor)

    • #81779
      Peter Heggie
      Participant

      The advantages of using Cloverleaf include having the inbound file contents stored in SMAT files and available for viewing, automated archiving and simplified reprocessing, as well as having all of the activity logged in (managed) Cloverleaf process log files.

      You can always KILL the message in the Inbound proc to prevent the data from being processed further.

      I would love to see just a few (~small~) changes made in Cloverleaf to make it more like a ESB server, so that we can use threads as stand-alone ‘nodes’, and snap them together (more than two) to perform whatever we want (like performing file transfers and database updates as protocols, instead of picking one of them to implement in tcl).

      Peter

      Peter Heggie

    • #81780
      David Barr
      Participant

      The big problem with Cloverleaf is that even on a file interface it treats each message as a message and not a file. There’s no easy way to see a list of source and destination files that went through an interface. You can’t click on a line of this type of a report and see the details of the transfer.

      Training someone to set up and monitor a file transfer in Cloverleaf probably requires at least level 1 certification. Training someone to use an MFT tool can be done in house and in a much shorter time.

      With Cloverleaf you have to write or call TCL code to specify a wildcard for which files you want to pick up. This should be a field in NetConfig. Last time I checked you have to call code to copy the name of the inbound file to the outbound file or to add a suffix to a filename. This should also be a configuration option.

      When you’re setting up an FTP interface, Cloverleaf doesn’t let you browse to the folder that you want to use. You have to type in the path.

      Archiving and reprocessing with an MFT utility is simple; I wouldn’t give Cloverleaf an advantage there. I would say that it’s pretty inconvenient that Cloverleaf stores multiple messages/files in one SMAT file and SMAT files are usually rotated daily, so searching for a file on an unknown date can be tricky. The MFT tool that we use doesn’t have this issue. On the other hand, the MFT tool I use can’t search the contents of archived files. You have to do that using other tools.

      Cloverleaf has improved somewhat between versions regarding file interfaces. One major improvement was to include message metadata in SMAT files. It is still not my preferred tool for setting up a file based interface.

    • #81781

      Please send your improvement suggestions in as enhancement requests via Infor Xtreme! R&D and Product Development do listen and do what they can to improve and modernize Cloverleaf. Customer feedback is very valuable to us.

      Yes, using TPS to interact with Cloverleaf does take training, but it is a very powerful and impressive tool that opens the door to being able to do whatever needs to be done for a particular interface.

      In recent versions of Cloverleaf, the filename (including the full path) is included in the msg metadata.

      Once you have your TPS procs written and in place, it’s a relatively simple process to teach someone how to plug in the arguments such as search patterns.

      Here are some examples.

      proc xltp_get_filename {} {
      [code]proc xltp_get_filename {} {

      -- Max Drown (Infor)

    • #81782

      Updated my post to describe the dirparse “List Full Directory” option.

      -- Max Drown (Infor)

    • #81783
      Jim Kosloskey
      Participant

      An additional note:

      Since this is a stack at dirparse, it may be desirable to returnn either the file namess only list or the extended list so the next stacked proc can perform as desired.

      We stack dirparse procs here and how we take care of that is we use an argument to each of the procs indiicating whether an extended list is to be returned.

      The last proc in the stack then has to indcate not to return an extended list (or Cloverleaf may panic).

      Also the same effect when using ‘list’ instead of ‘nlst’ in a Fileset/FTP protocol (that is an extended list is returned).

      I consider there to be 2 bugs here:

      1. the structure of the enhanced list is overly complicated and thus will break existing code unless it is changed. A more useful construct would be : {filename {length date}} {filename {length date}} in my opinion.

      2. the engine shoulld take back whatever list structure it provided. So if you asked for an extended list and did not need to change anything you cold just give the list back. Right now you need to massage the list to onlly give back the file names. That does not seem fair.

      At some point if I ever get the time I will submit the above for official consideration.

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

    • #81784
      Mark Thompson
      Participant

      Hi Max,

      I just pulled down the PDF and didn’t see anything about “List Full Directory” option.  Since Jim offered some excellent enhancement suggestions, I’m even more curious about the full directory options.

      - Mark Thompson
      HealthPartners

    • #81785

      See my post above where I added some notes on “List Full Directory”, if you haven’t already.

      I’ll submit Jim’s suggestions to R&D, but I would highly encourage you to submit the request through Infor Xtreme. Customer feedback is very valuable.

      -- Max Drown (Infor)

    • #81786

      The AR has been submitted to R&D. I simply requested that the feature send a keyed list into the TPS instead of the {{…} {…} {…}} format.

      I updated my post above with a sample proc for the “List Full Directory” feature and updated the notes attachment.

      -- Max Drown (Infor)

    • #81787

      From R&D, Submitted AR12412 to change the dirparse TPS parameters to keyed list as your example indicated. There will be no change for return list(filename list).

      Note that this change will cause the incompatible to older version which means customers need change their TPS after CL upgrade.

      -- Max Drown (Infor)

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

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,293
Replies
34,435
Topic Tags
286
Empty Topic Tags
10