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 (optional, defaults to
"1"
)- Parameters:
- wfName (required)
- vars (optional)
- Partial Call Graph (max 5 caller/called nodes):
- 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