- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowf::WorkflowConstruct
::xowf::WorkflowConstruct create ... \
[ -handled_roles (default "[list]") ] \
[ -label (default "[namespace tail [self]]") ] \
[ -name (default "[namespace tail [self]]") ]
Defined in
Class Relations
- class: ::xotcl::Class
- superclass: ::xowf::WorkflowObject
- subclass: ::xowf::Condition, ::xowf::State, ::xowf::Action
::xotcl::Class create ::xowf::WorkflowConstruct \ -superclass ::xowf::WorkflowObjectMethods (to be applied on instances)
get_cond_values (scripted)
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] }get_value (scripted)
<instance of xowf::WorkflowConstruct> get_value
- Testcases:
- workflow_constructs, xowf
foreach {cond value} [:get_cond_values $values] { if {$cond eq "" || $cond eq "default" || $cond eq "else" || $cond == "true"} { return $value } elseif {[:$cond]} { return $value } }get_value_set (scripted)
set result [list] foreach {cond value} [:get_cond_values $values] { foreach v $value {lappend result $v} } return [lsort -unique $result]handled_roles (setter)
in_role (scripted)
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 }init (scripted)
# # 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" } } } nextlabel (setter)
name (setter)
object (forward)
property (forward)
set_new_property (forward)
set_property (forward)
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables