workflow::role::get_options (public)

 workflow::role::get_options -workflow_id workflow_id [ -id_values ]

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

Get a list of roles in a workflow for use in the 'options' property of a form builder form element.

Switches:
-workflow_id (required)
-id_values (optional, boolean)
Provide this switch if you want the values in the options list to be role id:s instead of short names.
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 packages/workflow/www/admin/action-ae.tcl packages/workflow/ www/admin/action-ae.tcl workflow::role::get_options workflow::role::get_options packages/workflow/www/admin/action-ae.tcl->workflow::role::get_options workflow::get_roles workflow::get_roles (public) workflow::role::get_options->workflow::get_roles workflow::role::get workflow::role::get (public) workflow::role::get_options->workflow::role::get

Testcases:
No testcase defined.
Source code:
    set result [list]

    # workflow::get_roles returns the roles in sort_order
    foreach role_id [workflow::get_roles -workflow_id $workflow_id] {
        workflow::role::get -role_id $role_id -array row
        if { $id_values_p } {
            lappend result [list $row(pretty_name) $role_id]
        } else {
            lappend result [list $row(pretty_name) $row(short_name)]
        }
    }
    return $result
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/workflow/tcl/role-procs.xql

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