xowf::include_get (private)

 xowf::include_get [ -level level ] wfName [ vars ]

Defined in packages/xowf/tcl/xowf-procs.tcl

Implement inclusion of workflow definitions.

Switches:
-level
(defaults to "1") (optional)
Parameters:
wfName
vars (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 ad_file ad_file (public) xowf::include_get xowf::include_get xowf::include_get->ad_file

Testcases:
No testcase defined.
Source code:
    if {![string match "/packages/*/lib/*" $wfName]} {
      error "path leading to workflow name must look like /packages/*/lib/*"
    }
    set fname $::acs::rootdir/$wfName

    if {![ad_file readable $fname]} {
      error "file '$fname' not found"
    }

    #
    # Tell the caller, what files were included in the thread
    # invocation. It would be nicer to have this more OO, such we can
    # avoid the global variable ::__xowf_depends.
    #
    lappend ::__xowf_depends $fname [ad_file mtime $fname]

    set f [open $fname]; set wfDefinition [read $f]; close $f
    #::xotcl::Object log "INCLUDE $wfName [list $vars]"
    if {[llength $vars] > 0} {
      foreach var $vars {
        lappend substMap @$var@ [uplevel $level [list set $var]]
      }
      set wfDefinition [string map $substMap $wfDefinition]
    }
    #::xotcl::Object log "AFTER SUBST $wfName [list $vars]\n$wfDefinition"
    return [list eval $wfDefinition]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ]
Show another procedure: