workflow::role::generate_spec (private)

 workflow::role::generate_spec [ -role_id role_id ] [ -one_id one_id ] \
    [ -handlers handlers ]

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

Generate the spec for an individual role definition.

Switches:
-role_id (optional)
The id of the role to generate spec for.
-one_id (optional)
Same as role_id, just used for consistency across roles/actions/states.
-handlers (optional)
Returns:
spec The roles spec
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::role::get workflow::role::get (public) workflow::role::generate_spec workflow::role::generate_spec workflow::role::generate_spec->workflow::role::get

Testcases:
No testcase defined.
Source code:
    if { $role_id eq "" } {
        if { $one_id eq "" } {
            error "You must supply either role_id or one_id"
        }
        set role_id $one_id
    } else {
        if { $one_id ne "" } {
            error "You can only supply either role_id or one_id"
        }
    }

    get -role_id $role_id -array row

    # Get rid of elements that shouldn't go into the spec
    array unset row short_name 
    array unset row role_id
    array unset row workflow_id
    array unset row sort_order
    array unset row role_ids
    array unset row callbacks_array
    array unset row callback_ids
    array unset row callback_impl_names

    set spec {}
    foreach name [lsort [array names row]] {
        if { $row($name) ne "" } {
            lappend spec $name $row($name)
        }
    }

    return $spec
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/workflow/tcl/role-procs.xql

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