Class ::xowf::WorkflowConstruct (public)
::xotcl::Class ::xowf::WorkflowConstruct
- Testcases:
- No testcase defined.
Source code: namespace eval ::xowf {} ::nsf::object::alloc ::xotcl::Class ::xowf::WorkflowConstruct {set :__default_metaclass ::xotcl::Class set :__default_superclass ::xotcl::Object} ::xowf::WorkflowConstruct instproc get_cond_values values { if {[lindex $values 0] eq "?"} { return [lrange $values 1 end] } elseif {$values eq ""} { return "" } else { if {[regexp {^(.+):([^ ]+) } $values _ cond value]} { :msg "switch '$values' to new syntax: ? $cond $value ..." } return [list "" $values] } } ::xowf::WorkflowConstruct instproc init args { # # Warn about potentially dangerous names, shadowing global # commands. Not sure, this is the best place (or whether this # should be always executed), since this method might be executed # several hundreds of times for a view instantiating a high number # of workflow instances. Maybe we should define a developer-mode # defining this and more other calls via mxin classes. # if {[nsf::is object ::${:name}]} { set ctx [:wf_context] if {[nsf::is object $ctx]} { set obj [$ctx object] set wfName [[$obj page_template] name] if {$wfName ne "en:Workflow.form"} { ns_log warning "Workflow $wfName defines [namespace tail [:info class]] with name '${:name}' potentially shadowing global commands" } } } next } ::xowf::WorkflowConstruct instproc get_value_set values { set result [list] foreach {cond value} [:get_cond_values $values] { foreach v $value {lappend result $v} } return [lsort -unique $result] } ::xowf::WorkflowConstruct instproc in_role {role configuration} { set ctx [:wf_context] set obj [$ctx object] #:msg parent=$obj,cl=[$obj info class],name=[$obj name] if {[$ctx exists in_role]} { set success [expr {[$ctx in_role] eq $role}] } else { set success [$obj check_role $role] } #:msg role-$role->$success lappend :handled_roles $role $ctx set handled_roles($role) 1 if {$success} { :configure {*}$configuration } } ::xowf::WorkflowConstruct instproc get_value values { foreach {cond value} [:get_cond_values $values] { if {$cond eq "" || $cond eq "default" || $cond eq "else" || $cond == "true"} { return $value } elseif {[:$cond]} { return $value } } } ::xowf::WorkflowConstruct instforward property {%[:wf_context] object} %proc ::xowf::WorkflowConstruct instforward object %:wf_context object ::xowf::WorkflowConstruct instforward set_property {%[:wf_context] object} %proc ::xowf::WorkflowConstruct instforward set_new_property {%[:wf_context] object} set_property -new 1 ::xowf::WorkflowConstruct instparametercmd label ::xowf::WorkflowConstruct instparametercmd name ::xowf::WorkflowConstruct instparametercmd handled_roles ::nsf::relation::set ::xowf::WorkflowConstruct superclass ::xowf::WorkflowObject ::nx::slotObj -container slot ::xowf::WorkflowConstruct ::xowf::WorkflowConstruct::slot eval {set :__parameter { {handled_roles [list]} {label "[namespace tail [self]]"} {name "[namespace tail [self]]"} }} ::nsf::object::alloc ::xotcl::Attribute ::xowf::WorkflowConstruct::slot::label {set :accessor public set :configurable true set :convert false set :default {[namespace tail [self]]} set :defaultmethods {} set :disposition alias set :domain ::xowf::WorkflowConstruct set :incremental 0 set :manager ::xowf::WorkflowConstruct::slot::label set :methodname label set :multiplicity 1..1 set :name label set :parameterSpec {-label:substdefault {[namespace tail [self]]}} set :per-object false set :position 0 set :required false set :substdefault 0b111 set :trace none : init} ::nsf::object::alloc ::xotcl::Attribute ::xowf::WorkflowConstruct::slot::handled_roles {set :accessor public set :configurable true set :convert false set :default {[list]} set :defaultmethods {} set :disposition alias set :domain ::xowf::WorkflowConstruct set :incremental 0 set :manager ::xowf::WorkflowConstruct::slot::handled_roles set :methodname handled_roles set :multiplicity 1..1 set :name handled_roles set :parameterSpec {-handled_roles:substdefault {[list]}} set :per-object false set :position 0 set :required false set :substdefault 0b111 set :trace none : init} ::nsf::object::alloc ::xotcl::Attribute ::xowf::WorkflowConstruct::slot::name {set :accessor public set :configurable true set :convert false set :default {[namespace tail [self]]} set :defaultmethods {} set :disposition alias set :domain ::xowf::WorkflowConstruct set :incremental 0 set :manager ::xowf::WorkflowConstruct::slot::name set :methodname name set :multiplicity 1..1 set :name name set :parameterSpec {-name:substdefault {[namespace tail [self]]}} set :per-object false set :position 0 set :required false set :substdefault 0b111 set :trace none : init}XQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)