%3 ::xowf::Condition ::xowf::Condition defaultmethod init ::xowf::WorkflowConstruct ::xowf::WorkflowConstruct get_cond_values get_value get_value_set in_role init object property set_new_property set_property ::xowf::Condition->::xowf::WorkflowConstruct ::xowf::State ::xowf::State get_actions get_all_actions ::xowf::State->::xowf::WorkflowConstruct ::xowf::Action ::xowf::Action activate get_next_state invoke ::xowf::Action->::xowf::WorkflowConstruct ::xowf::WorkflowObject ::xowf::WorkflowObject wf_context ::xowf::WorkflowConstruct->::xowf::WorkflowObject ::xotcl::Object ::xotcl::Object ::xowf::WorkflowObject->::xotcl::Object

Class ::xowf::Action

::xowf::Action[i] 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

  • class: ::xotcl::Class[i]
  • superclass: ::xowf::WorkflowConstruct[i]
::xotcl::Class create ::xowf::Action \
     -superclass ::xowf::WorkflowConstruct

Methods (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)