workflow::case::get_available_actions (public, deprecated)

 workflow::case::get_available_actions -case_id case_id \
    [ -user_id user_id ]

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

Deprecated. Invoking this procedure generates a warning.

Get the actions which are enabled and which the current user have permission to execute.

Switches:
-case_id (required)
The ID of the case.
-user_id (optional)
Returns:
A list of ID's of the available actions.
Author:
Lars Pind <lars@collaboraid.biz>
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::test::assert_case_state workflow::test::assert_case_state (public) workflow::case::get_available_actions workflow::case::get_available_actions workflow::test::assert_case_state->workflow::case::get_available_actions workflow::test::assert_user_actions workflow::test::assert_user_actions (public) workflow::test::assert_user_actions->workflow::case::get_available_actions ad_conn ad_conn (public) workflow::case::get_available_actions->ad_conn ad_log_deprecated ad_log_deprecated (public) workflow::case::get_available_actions->ad_log_deprecated workflow::case::action::permission_p workflow::case::action::permission_p (public) workflow::case::get_available_actions->workflow::case::action::permission_p workflow::case::enabled_action_get_element workflow::case::enabled_action_get_element (public) workflow::case::get_available_actions->workflow::case::enabled_action_get_element workflow::case::get_enabled_action_ids workflow::case::get_enabled_action_ids (public) workflow::case::get_available_actions->workflow::case::get_enabled_action_ids

Testcases:
No testcase defined.
Source code:
ad_log_deprecated proc workflow::case::get_available_actions
    if { (![info exists user_id] || $user_id eq "") } {
        set user_id [ad_conn user_id]
    }

    set action_list [list]

    foreach enabled_action_id [workflow::case::get_enabled_action_ids -case_id $case_id] {
        if { [workflow::case::action::permission_p -enabled_action_id $enabled_action_id -user_id $user_id] } {
            lappend action_list [workflow::case::enabled_action_get_element  -enabled_action_id $enabled_action_id  -element action_id]
        }
    }

    return $action_list
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: