Root Tcl Procs via GUI…

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Root Tcl Procs via GUI…

  • Creator
    Topic
  • #48019
    Rob Lindsey
    Participant

      5.3 rev 3 on AIX 5.1

      I must admit that this is the first time that I have tried to edit Root Tcl Procs via the GUI.  I know that it can be done via a Telnet session but I am trying to train some new personal.  They are wanting to do use the GUI for everything.  Has anyone fiugred out a good way to do this?  I know that I can create links for each proc in each site but that would be creating 135 links for 22 sites.  What a nightmare for supporting.

      Rob

    Viewing 16 reply threads
    • Author
      Replies
      • #57330
        John Stafford
        Participant

          Gonna bump this ancient thread to see if there exists any way to edit root tcl procs via the Script Editor in 6.0.

          I currently FTP from the server to my PC, editing in Notepad++, and FTP it back to the server. Being able to access it via the Script Editor would cut out some steps.

        • #57331
          Charlie Bursell
          Participant

            If you were to use the Script Editor you would still have to import, edit, then export the file.

            I would recommend you download the Komodo Editor from Active State. It will allow you to edit via FTP but it will take care of the import/export so when you save the file it is saved on the server

            There are others but Komodo is designed as a Tcl Editor

          • #57332
            Rob Lindsey
            Participant

              Notepad++ can do the same as Komodo with the correct add on.

            • #57333
              Russ Ross
              Participant

                We have been using Ultra-Edit for transparent back end FTP open/edit/save.

                Ultra-Edit is not free so it costs a little money.

                Ultra-Edit has an nice add-on product for a bit more money call Ultra-Compare that is nice when looking for complex difference between files.

                Russ Ross
                RussRoss318@gmail.com

              • #57334
                David Barr
                Participant

                  Notepad++ should work. Here’s how to get FTP working with Notepad++:

                  <a href="http://www.inmotionhosting.com/support/website/ftp-client-setup/connect-ftp-notepad-plus&#8221; class=”bbcode_url”>http://www.inmotionhosting.com/support/website/ftp-client-setup/connect-ftp-notepad-plus

                  You should also consider moving your root tcl procs to the master site TCL procs. This would let you edit them through the GUI and avoid having duplicate procs in different sites.

                • #57335
                  Steve Williams
                  Participant

                    John,

                     As mentioned by others, there are better ways to use FTP/Editors than the manual method you are using. The real trick here is to avoid using the HCI GUI Script Editor all together. The main reason is syntax highlighting which helps to reduce coding bugs and errors while speeding up code development.

                    The GUI Editor is a last resort tool that is only in the Cloverleaf GUI “for completeness.” Like Windows Notepad, it has never been developed to be a truly useful editor compared to most other GUI editors available on the market whether free (Notepad++) or purchased (Komodo, UltraEdit).

                    For quick and simple edits, I use vi directly on the Unix server.

                    Also as mentioned, if you are using a recent version of Cloverleaf, placing your root/global scripts in the Master Site is now the preferred method of making TCL scripts available to all sites on your server.

                  • #57336
                    John Stafford
                    Participant

                      Steve Williams wrote:

                      John,

                    • #57337
                      Jim Kosloskey
                      Participant

                        John,

                        I would make your Master Site its own site with that being its only purpose.

                        In other words, no integrations defined or running in it.

                        For Tcl, what i would do is to make sure the candidates to be ‘global’ (in the Master Site) are writtten such that they are usable in any site.

                        Any procs which are not written that way should be left where they are until they can be re-written if that is your intent.

                        You can move Procs one at a time, a few at a time, or all at once.

                        Obviously you will want to test this out in your Test environment first to get your procedures down.

                        After the move, you will need to do a mktclindex on both the site(s) tclprocs directory that contributed the Tcl procs as well as the Master Site.

                        Then you can either reindex and reload from the NetMonitor (can only do one at a time so maybe not for the en mass approach) at either the thread or process level – or – stop/start the processes which should now pick up the procs which have been moved (picked up from the Master Site).

                        So the most important step might be making sure the procs to be moved are good candidatees to be global.

                        Something to be aware of – you cannot ‘see’ the Tcl procs which reside in the Master Site from another site GUI – you need to be in the Master Site. You can reference the procs from the NetConfig or an Xlate for example but not to edit or even see in the GUI Directory tree.

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

                      • #57338
                        John Stafford
                        Participant

                          Excellent information, as always, Jim.

                          One more question: If a site has an HL7 variant or tcl proc with the same name, will it override the master site, or will the master site override it?

                        • #57339
                          James Cobane
                          Participant

                            site level supercedes master site level.

                            Jim Cobane

                            Henry Ford Health

                          • #57340

                            There will be a new tcl script editor released in CIS 6.1.1! It is awesome!! Syntax highlighting, brace matching, command auto-completion, etc.

                            To echo the words above, you should avoid touching the root files at all cost but instead put globally-accessible objects in the master site. When you first configure the master site, the daemons and processes must be bounced.

                            -- Max Drown (Infor)

                          • #57341
                            Russ Ross
                            Participant

                              Max:

                              Does the new awsome tcl script editor released in CIS 6.1.1 allow you to increase the font size in the editor window without having to biggy size the entire windows environment?

                              Russ Ross
                              RussRoss318@gmail.com

                            • #57342

                              Yes it does, Russ!

                              -- Max Drown (Infor)

                            • #57343
                              John Stafford
                              Participant

                                Having moved the tcl procs from root to master site in our Test environment, I now get tcl errors when the script is called.

                                Command Issued: hcitpstest -r run -x ASCII -f len10 -c sms_ib_data /qvdxdev/qdx6.0/cis6.0/integrator/test01/adt_a01_sample.txt “filter_msgs_continue3 {SEGFLD {PV1-2 PV1-10}} {VLIST {{I E S} {CVE CVI CVR END HBC IRP IVT LTH OSP OWC PAP PMG SDS SUR VAS}}}  {OP {OR}}”

                                Command output:

                                [0:TEST] Tcl error:

                                msgId = message0

                                proc = ‘filter_msgs_continue3’

                                args = ‘{SEGFLD {PV1-2 PV1-10}} {VLIST {{I E S} {CVE CVI CVR END HBC IRP IVT LTH OSP OWC PAP PMG SDS SUR VAS}}} {OP {OR}}’

                                result = ”

                                errorInfo: ‘

                                invalid command name “filter_msgs_continue3”

                                   while executing

                                “filter_msgs_continue3 {MSGID message0} {CONTEXT sms_ib_data} {ARGS {{SEGFLD {PV1-2 PV1-10}} {VLIST {{I E S} {CVE CVI CVR END HBC IRP IVT LTH OSP OWC P…”‘

                                I have run mktclindex in all of the tclprocs directories, including root. I have cycled the daemons in the master site and the test site that I am using. I have checked file permissions on the script.

                                Does anything special need to take place since this script was previously in ‘root’? What am I missing?[/b]

                              • #57344

                                Did you declare a master site under Root Option? Once you do that, you’ll need to bounce everything (daemons, process, etc.). It’s a one time thing. Then, yes, mktclindex, etc. as normal.

                                -- Max Drown (Infor)

                              • #57345
                                Russ Ross
                                Participant

                                  ehco $HCIMASTERSITEDIR

                                  to be sure it is defined properly, for example in my case it looks like this

                                  /cloverleaf/cis6.0/integrator/mda_global

                                  you can also run showroot to check it is set to the site you want

                                  I’m going to spell out the steps I would perfom to do what you said you did, in case there is a variation to explain the unexpected outcome:

                                  Code:

                                  cd   $HCIROOT/tclprocs
                                  mv   filter_msgs_continue3.tcl   $HCIMASTERSITEDIR/tclprocs
                                  mktclindex
                                  grep   filter_msgs_conitnue3   tclIndex ; # there should be no entry found
                                  cd   $HCIMASTERSITEDIR/tclprocs
                                  mktclindex
                                  grep   filter_msgs_conitnue3   tclIndex ; # should be exactly one entry found
                                  # stop/start cloverleaf process that contians the interface that calls filter_msgs_continue3
                                  # proceed to test

                                  Russ Ross
                                  RussRoss318@gmail.com

                                • #57346
                                  John Stafford
                                  Participant

                                    Thanks for your help, guys. I walked through the steps, and I still get errors on the script, even when using the testing tool.

                                    I jumped over to try the testing tool on the Master site, and it worked as expected (since the proc is local, there). Running the testing tool on one of the non-master sites produces the error. I tried cycling the daemons, running mktclindex on all of the sites, bouncing all of the processes.

                                    Finally, I cycled the host server. I feel like I already tried it, but it seems to have fixed it. Maybe the root proc was still there until the host server was cycled?

                                    In any event, thanks again. Master Site should be good to go.

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