Class ::xowf::WorkflowObject

::xowf::WorkflowObject[i] create ...

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xotcl::Object[i]
  • subclass: ::xowf::WorkflowContainer[i], ::xowf::WorkflowConstruct[i]
::xotcl::Class create ::xowf::WorkflowObject \
     -superclass ::xotcl::Object

Methods (to be applied on instances)

  • wf_context (scripted)

    #
    # Try to determine the workflow context via call-stack.
    #
    set max [info level]
    for {set i 0} {$i < $max} {incr i} {
      if {![catch {set s [uplevel $i self]} msg]} {
        set obj [lindex $s 0]
        if {[$obj istype ::xowf::Context]} {
          #:log "$obj [nsf::is object $obj] precedence: [$obj info precedence]"
          return $obj
        }
        if {[$obj hasclass ::xowf::WorkflowPage]} {
            return [$obj wf_context]
        }
      }
    }
    #
    # If everything fails, fall back to the old-style method, which is
    # incorrect for shared workflow definitions. This fallback is
    # just for transitional code.
    #
    ad_log warning "cannot determine wf_context from call-stack"
    return [:info parent]