Mark Thompson

Forum Replies Created

Viewing 15 replies – 1 through 15 (of 187 total)
  • Author
    Replies
  • Mark Thompson
    Participant

      In 6.2.2 we are seeing failures of FTP with an absolute path.  Did you report this to Infor support?

      – Mark Thompson
      HealthPartners

      in reply to: how do I run a tcl from another tcl? #86635
      Mark Thompson
      Participant

        Hello Gene,

        Once you have “indexed” a Tcl proc (using mktclindex) you can call it by name from any other proc.

        You can view the output of mktclindex in $HCISITEDIR/tclprocs/tclIndex  That will show you the proc name and the file to “source” (load into memory) when the proc is first called.

        That said, there are several different structures for Tcl procs used by Cloverleaf.  Usually you will only call a proc of type “Other” from your proc.  Procs types like tps, trx or xltp are designed to be called directly from the engine (or testing tool).  You probably don’t want to try calling them from your proc.

        – Mark Thompson
        HealthPartners

        in reply to: SMAT DB Message History #86571
        Mark Thompson
        Participant

          You can enable SmatHistory in site options to keep multiple versions of old SMATDB files.  Setting the Maximum Age of SMAT Files on that same panel will clean up old files when they age out.  The search tool allows the option of searching in the SmatHistory directory located in the process directory.

          There is no built-in option to cycle SMATDB files on a regular schedule.  Might be coming in 6.3?  Many people do that by cycling SMAT files using a script that runs from cron or a UPOC timer.

          – Mark Thompson
          HealthPartners

          in reply to: Persistent variable between messages #86329
          Mark Thompson
          Participant

            Hello Jerry,

            It depends.  Does the keyed list need to survive a restart of your Cloverleaf process or thread?

            If not, you can use a global variable to store the keyed list.

            Code:

            global myKL

            Or even better, put it in a namespace.

            Code:

            # Initialize the variable during startup
            namespace eval ::myNamespace {variable myKL}

            # Set a value
            keylset ::myNamespace::myKL SOMEKEY $someValue

            # Retrieve a value
            set variableName [keylget ::myNamespace::myKL SOMEKEY]

            or more robust

            Code:

            if { ![keylget ::myNamespace::myKL SOMEKEY variableName] } {
             # Error processing here – key not found
             # puts “my stuff couldn’t retrieve SOMEKEY in ::myNamespace::myKL”
            }

            or even more robust

            Code:

            if { [catch {keylget ::myNamespace::myKL SOMEKEY variableName} errTxt] } {
             # Error processing here – covers all kinds of errors
             puts “my stuff failed because $errText”
            }

            If you need to persist through a restart use a file or database.

            – Mark Thompson
            HealthPartners

            in reply to: cron for hcisitedoc #85442
            Mark Thompson
            Participant

              Hello Ron,

              Based on ‘#!/hci/bin/bash’ I’m guessing you are running on Linux.  Correct?

              Can you provide any detail on the ifactive script that gets called from cron before running hcisitedoc?

              – Mark Thompson
              HealthPartners

              in reply to: Opinions on change mgmnt #86179
              Mark Thompson
              Participant

                I understand it is consistent with ITIL policy to pre-denfine a “Standard” change (like Cloverleaf table move, Communication parameter change, etc) that allows you to streamline the Change Management process.  That was a huge productivity booster for our team.

                – Mark Thompson
                HealthPartners

                in reply to: Use of new SMAT db #86063
                Mark Thompson
                Participant

                  Cloverleaf 6.2 allows you to specify your own encryption key for SMATDB.  This means you can choose to synchronize the encryption key across all sites and use a more secure key than site name.  Excellent enhancement!

                  – Mark Thompson
                  HealthPartners

                  in reply to: hcitbllookup -> Database Lookup #86118
                  Mark Thompson
                  Participant

                    Try the Tcl dblookup command for database tables.

                    – Mark Thompson
                    HealthPartners

                    in reply to: Access to global.ini variables #86012
                    Mark Thompson
                    Participant

                      Thanks Rob – very helpful.

                      Is there a way to directly access the hash map (possibly as an array or dict)?  Or do I need to parse gvprint to see the entire list of available gv’s?

                      – Mark Thompson
                      HealthPartners

                      in reply to: Metadata Report for SmatDB #85973
                      Mark Thompson
                      Participant

                        The smatdb2nl script does not work on encrypted files unless you add that functionality.

                        You can test sqlite from an command line like this.  Count the number of records in the smatdb, where smatdbname is the full file name, encryptionKey is your encryption key.

                        Code:

                        >sqlite smatdbname
                        sqlite> PRAGMA KEY=”encryptionKey”;
                        sqlite> select count(*) from smat_msgs;

                        If you send me a PM, we can arrange a time to look at this offline.

                        – Mark Thompson
                        HealthPartners

                        in reply to: Metadata Report for SmatDB #85970
                        Mark Thompson
                        Participant

                          Adding this line before the SELECT in the code above will apply your encryption key.

                          Warning:  Using this on an unencrypted database immediately encrypts the database.  See Charlie Bursell’s hcismatdb for a great example of how to cautiously open encrypted smatdb’s.

                          Code:

                          smatdb eval “PRAGMA KEY=’yourEncryptionKeyHere'”

                          – Mark Thompson
                          HealthPartners

                          in reply to: Reading an entire table from Tcl #84689
                          Mark Thompson
                          Participant

                            Excellent!  Thanks Rob.

                            – Mark Thompson
                            HealthPartners

                            in reply to: Metadata Report for SmatDB #85968
                            Mark Thompson
                            Participant

                              If you are using smatdb, an sqlite query can gather information for you.

                              This script (written for AIX) uses Tcl sqlite library routines to display MessageContent.  The SELECT statement could be altered to whatever metadata fields you want to view.  See https://www.sqlite.org/tclsqlite.html

                              Code:


                              #!/usr/bin/env hcitcl
                              #
                              ######################################################################
                              # Name:      smatdb2nl
                              # Purpose:   Dump smatdb files to nl-delimited messages
                              # UPoC type: script
                              # Args:      smatdb1 … smatdbN
                              #
                              # Returns:   Newline delimited messages
                              #
                              # Notes:
                              # It will be difficult to find message boundaries in the output for messages containing NL characters.
                              # Script does not work with encrypted smatdb files – see hcismatdb for help.
                              #
                              # History:
                              # Internal documentation notes here …

                              proc smatdb2nl {argv} {
                              foreach smatfile $argv {
                              sqlite smatdb $smatfile
                              smatdb eval {SELECT MessageContent FROM smat_msgs} {
                              puts [string map [list n r] $MessageContent]
                              }
                              }
                              }
                              smatdb2nl $argv

                              – Mark Thompson
                              HealthPartners

                              in reply to: Reading an entire table from Tcl #84687
                              Mark Thompson
                              Participant

                                The Cloverleaf 6.2 documentation provides 1 example of how to use Cloverleaf API calls.  (The example gets a list of Alert files available for a site.)

                                Is anyone aware of documentation that details how to use these announced features?

                                Quote:


                                RESTful API

                                With this API, you can create, edit, delete, and view Cloverleaf objects programmatically using the JSON format. The minimum required objects exposed through the API are:

                                – Mark Thompson
                                HealthPartners

                                in reply to: Error when using hcismatconvert #85943
                                Mark Thompson
                                Participant

                                  Hello Avy,

                                  Is your .smatdb encrypted?  That might be the issue with not finding the smat_msgs table.

                                  Once you solve the encryption issue you may want to use something like:

                                  Code:


                                  echo ‘select count(*) from smat_msgs;’ | sqlite filename.smatdb

                                  – Mark Thompson
                                  HealthPartners

                                Viewing 15 replies – 1 through 15 (of 187 total)