workflow::default_sort_order (private)

 workflow::default_sort_order -workflow_id workflow_id \
    -table_name table_name

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

By default the sort_order will be the highest current sort order plus 1. This reflects the order in which states and actions are added to the workflow starting with 1

Switches:
-workflow_id
(required)
-table_name
(required)
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::edit workflow::action::edit (public) workflow::default_sort_order workflow::default_sort_order workflow::action::edit->workflow::default_sort_order workflow::role::edit workflow::role::edit (public) workflow::role::edit->workflow::default_sort_order workflow::state::fsm::edit workflow::state::fsm::edit (public) workflow::state::fsm::edit->workflow::default_sort_order db_string db_string (public) workflow::default_sort_order->db_string

Testcases:
No testcase defined.
Source code:
    set max_sort_order [db_string max_sort_order {} -default 0]

    return [expr {$max_sort_order + 1}]
Generic XQL file:
<fullquery name="workflow::default_sort_order.max_sort_order">
    <querytext>
        select coalesce(max(sort_order), 0)
        from   $table_name
        where  workflow_id = :workflow_id
    </querytext>
</fullquery>
packages/workflow/tcl/workflow-procs.xql

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

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

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