workflow::case::action::get_enabled_action_id (private)
workflow::case::action::get_enabled_action_id -case_id case_id \ -action_id action_id \ [ -parent_enabled_action_id parent_enabled_action_id ] [ -all ] \ [ -any_parent ]
Defined in packages/workflow/tcl/case-procs.tcl
Get the enabled_action_id from case_id and action_id. Doesn't find completed enabled actions. Provided for backwards compatibility. Doesn't work properly for dynamic actions.
- Switches:
- -case_id (required)
- -action_id (required)
- -parent_enabled_action_id (optional)
- -all (optional, boolean)
- If specified, will return all if more than one is found. Otherwise returns just the first.
- -any_parent (optional, boolean)
- Returns:
- enabled_action_id. Returns blank if no enabled action exists.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: if { $any_parent_p } { set result [db_list select_enabled_action_id { select enabled_action_id from workflow_case_enabled_actions where case_id = :case_id and action_id = :action_id and completed_p = 'f' }] } else { if { $parent_enabled_action_id eq "" } { set result [db_list select_enabled_action_id { select enabled_action_id from workflow_case_enabled_actions where case_id = :case_id and action_id = :action_id and completed_p = 'f' and parent_enabled_action_id = :parent_enabled_action_id }] } else { set result [db_list select_enabled_action_id { select enabled_action_id from workflow_case_enabled_actions where case_id = :case_id and action_id = :action_id and completed_p = 'f' and parent_enabled_action_id is null }] } } if { $all_p } { return $result } else { return [lindex $result 0] }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