workflow::action::get_from_request_cache (private)

 workflow::action::get_from_request_cache action_id [ element ]

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

This provides some abstraction for the Workflow API cache and also some optimization - we only convert lists to arrays once per request. Should be used internally by the workflow API only.

Parameters:
action_id
element (optional)
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::fsm::get_new_state workflow::action::fsm::get_new_state (public) workflow::action::get_from_request_cache workflow::action::get_from_request_cache workflow::action::fsm::get_new_state->workflow::action::get_from_request_cache workflow::action::get workflow::action::get (public) workflow::action::get->workflow::action::get_from_request_cache workflow::action::get_allowed_roles workflow::action::get_allowed_roles (public) workflow::action::get_allowed_roles->workflow::action::get_from_request_cache workflow::action::get_assigned_role workflow::action::get_assigned_role (public) workflow::action::get_assigned_role->workflow::action::get_from_request_cache workflow::action::get_callbacks workflow::action::get_callbacks (private) workflow::action::get_callbacks->workflow::action::get_from_request_cache workflow::action::get_all_info workflow::action::get_all_info (private) workflow::action::get_from_request_cache->workflow::action::get_all_info workflow::action::get_workflow_id workflow::action::get_workflow_id (public) workflow::action::get_from_request_cache->workflow::action::get_workflow_id workflow::action::refresh_request_cache workflow::action::refresh_request_cache (private) workflow::action::get_from_request_cache->workflow::action::refresh_request_cache

Testcases:
No testcase defined.
Source code:
    # Get the cache with all actions
    set workflow_id [workflow::action::get_workflow_id -action_id $action_id]
    refresh_request_cache $workflow_id
    global __workflow_action_data,${workflow_id}

    array set workflow_data [workflow::action::get_all_info -workflow_id $workflow_id]

    # A single action
    set action_var_name __workflow_one_action,${action_id}
    global $action_var_name

    if { ![info exists $action_var_name] } {
        array set $action_var_name [set __workflow_action_data,${workflow_id}($action_id)]
    }

    if { $element eq "" } {
        return [array get $action_var_name]
    } else {
        return [set "${action_var_name}($element)"]
    }
Generic XQL file:
packages/workflow/tcl/action-procs.xql

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

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

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