Class TagScriptManager

  • Direct Known Subclasses:
    ProjectTagManager.ClientTagScriptManager

    public class TagScriptManager
    extends java.lang.Object
    The TagScriptManager handles the compilation and execution of tag event scripts. A set of scripts is defined by a TagEventScripts object, and is compiled into a TagScriptEvaluator. The tag then invokes events against the evaluator, and the corresponding defined scripts are executed.

    Execution occurs asynchronously. There is a thread pool of 3 threads available to execute tag scripts, though events per tag will occur sequentially. Each tag may only have up to 5 outstanding events queued for execution at a time.

    • Method Detail

      • compile

        public TagScriptEvaluator compile​(TagEventScripts scripts,
                                          TagScriptMonitor status)
        Compiles the code in scripts into a TagScriptEvaluator that can be used to invoke events. The underlying code objects may be shared across multiple evaluators produced by this manager.
      • maybeRunCompiledCacheMaintenance

        protected void maybeRunCompiledCacheMaintenance​(java.util.UUID cacheId)
      • rawCompile

        protected com.inductiveautomation.ignition.common.sqltags.scripts.TagScriptManager.SourcePyObject rawCompile​(ScriptManager sm,
                                                                                                                     java.lang.String code,
                                                                                                                     CommonTagScripts.EventDescriptor ed,
                                                                                                                     boolean forceUpdate)
                                                                                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • cleanupCode

        protected static java.lang.String cleanupCode​(java.lang.String code)
        This is necessary due to BugzId 4523, where for a period of time we tried to insert blank lines into the script to get the line numbers correct.