- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowf::Action
::xowf::Action create ... \
[ -extra_css_class (default "") ] \
[ -label_noquote (default "false") ] \
[ -next_state (default "") ] \
[ -payload (default "") ] \
[ -roles (default "all") ] \
[ -state_safe (default "false") ] \
[ -title title ] \
[ -wrapper_CSSclass (default "") ]
Class Relations
::xotcl::Class create ::xowf::Action \ -superclass ::xowf::WorkflowConstructMethods (to be applied on instances)
activate (scripted)
;extra_css_class (setter)
get_next_state (scripted)
return [:get_value [:next_state]]invoke (scripted)
set action_name [namespace tail [self]] set object [[:wf_context] object] set package_id [$object package_id] set package ::$package_id :log "--xowf invoke action [self]" # We fake a work request with the given instance attributes set last_context [expr {[$package exists context] ? [$package context] : "::xo::cc"}] set last_object [$package set object] set cc [::xo::ConnectionContext new -user_id [$last_context user_id]] $package context $cc $cc array set form_parameter [list __object_name [::security::parameter::signed [$object name]] _name [$object name] _nls_language [$last_context locale] __form_action save-form-data __form_redirect_method __none __action_$action_name $action_name] #ns_log notice "call_action pushed form_param to $cc: [$cc array get form_parameter]" $cc load_form_parameter_from_values $attributes $package set object "[$package folder_path -parent_id [$object parent_id]][$object name]" #:log "call_action calls: $package invoke -method edit -batch_mode 1 // obj=[$package set object]" ad_try { $package invoke -method edit -batch_mode 1 } on error {errorMsg} { ns_log error "$errorMsg\n$::errorInfo" error $errorMsg } #:log "RESETTING package_id object" $package set object $last_object $package context $last_context $cc destroy #:log "CHECK batch mode: [$package exists __batch_mode]" if {[$package exists __batch_mode]} { #:msg "RESETTING BATCH MODE" :log "RESETTING BATCH MODE" $package unset __batch_mode } return "OK"label_noquote (setter)
next_state (setter)
payload (setter)
roles (setter)
state_safe (setter)
title (setter)
wrapper_CSSclass (setter)
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables