TCL Proc Not Available in Drop Down

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf TCL Proc Not Available in Drop Down

  • Creator
    Topic
  • #53084
    Greg Tataryn
    Participant

      I have had this heppen to me a couple of times.

      I’ll build and test a TCL proc on a test site. When it comes time to move to production I’ll move it to the production site to the tclprocs folder and run mktclindex. I then open the GUI to set it up on the rout or thread and I can see the proc in the folder tree for site manager but under any of the UPOCs I cannot see the proc in the drop down list. If I open the script editor, start a new proc and copy the code in (changing the name of the proc) and save it is then available to me. Does anyone have any explanation?

    Viewing 3 reply threads
    • Author
      Replies
      • #76489
        Vince Angulo
        Participant

          We’ve been bitten by this a couple of times…

          1) Sounds like you’ve already checked to make sure you’re using the tclprocs folder at the integrator//tclprocs and not the integrator/tclprocs folder.

          2) This might be unique to us, and not being a Unix guru, not exactly sure how it works, but we have soft-links to share all our procs across sites, so permissions have to be correct for the new .tcl file and indexed at the level as well.

          Hope this helps.

        • #76490
          Charlie Bursell
          Participant

            What version of CL?

            In prior versions if there is a space before you declare the proc like

             proc myproc {args} {

            mktclindex would not pick it up.  It is fixed in later versions but now we get complaints because we fixed it   😕  

            Some people were using that to write procs as subroutines so they did not show in the drop down.  For those people I say “Learn to use namespaces”

          • #76491
            Greg Tataryn
            Participant

              Vince, item 2 seems to be unique to you. Or at least it does not apply to us. We do have some global procs that we put in the $HCIROOT/tclprocs folder so that all sites on an engine can see them but in this case it was on a specific site.

              Charlie,

              Our test engine is on 5.8 but production is still on 5.7 however there was no space before the proc declaration. I have had this happen to me before in a situation where we had a single engine running 5.6 and just one production site and one test site and just copying from one site to the other would cause issues.

            • #76492
              Simone Heckmann
              Participant

                Hello,

                I encountered the same problem once. As I found out (after a very loooooong night of trial and error), the filtering of which tcl-proc is allowed in which context (tps, xltp, trxid…) is based on the “UPoC type:” line in the procedure’s header.

                If you delete this line or do not use cloverleaf templates to write your proc, you might find it missing in certain drop-down menues which filter the listed procedures by their UPoC type.

                Code:



                ######################################################################
                # Name: test
                # Purpose:
                # UPoC type: tps
                # Args: tps keyedlist containing the following keys:
                # MODE run mode (”start”, “run”, “time” or “shutdown”)
                # MSGID message handle
                # CONTEXT tps caller context
                # ARGS user-supplied arguments:

                Reinserting the UPoC type to the header information should solve the problem.

                Hope this helps,

                Simone

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