workflow::case::get_actual_state (private)

 workflow::case::get_actual_state -case_id case_id \
    [ -parent_enabled_action_id parent_enabled_action_id ] \
    -array array

Defined in packages/workflow/tcl/case-procs.tcl

Flushes cache, gets actual state of case, and finds which actions should be enabled/assigned based on that actual state. This can then be used to manage the contents of workflow_case_enabled_actions table.

Switches:
-case_id (required)
-parent_enabled_action_id (optional)
-array (required)

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::case::state_changed_handler workflow::case::state_changed_handler (private) workflow::case::get_actual_state workflow::case::get_actual_state workflow::case::state_changed_handler->workflow::case::get_actual_state workflow::case::flush_cache workflow::case::flush_cache (private) workflow::case::get_actual_state->workflow::case::flush_cache workflow::case::fsm::get_state_info workflow::case::fsm::get_state_info (private) workflow::case::get_actual_state->workflow::case::fsm::get_state_info workflow::state::fsm::get workflow::state::fsm::get (public) workflow::case::get_actual_state->workflow::state::fsm::get

Testcases:
No testcase defined.
Source code:
    # TODO B: Make polymorphic -- this should go into a ::fsm:: namespace
    upvar 1 $array assigned_p
    
    workflow::case::flush_cache -case_id $case_id
    
    set state_id [workflow::case::fsm::get_state_info  -case_id $case_id  -parent_enabled_action_id $parent_enabled_action_id] 
    
    workflow::state::fsm::get -state_id $state_id -array state
    
    foreach action_id $state(enabled_action_ids) {
        set assigned_p($action_id) 0
    }
    
    foreach action_id $state(assigned_action_ids) {
        set assigned_p($action_id) 1
    }
Generic XQL file:
packages/workflow/tcl/case-procs.xql

PostgreSQL XQL file:
packages/workflow/tcl/case-procs-postgresql.xql

Oracle XQL file:
packages/workflow/tcl/case-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: