workflow::action::update_sort_order (private)

 workflow::action::update_sort_order -workflow_id workflow_id \
    -sort_order sort_order

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

Increase the sort_order of other actions, if the new sort_order is already taken.

Switches:
-workflow_id (required)
-sort_order (required)

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::edit workflow::action::edit (public) workflow::action::update_sort_order workflow::action::update_sort_order workflow::action::edit->workflow::action::update_sort_order db_dml db_dml (public) workflow::action::update_sort_order->db_dml db_string db_string (public) workflow::action::update_sort_order->db_string

Testcases:
No testcase defined.
Source code:
    set sort_order_taken_p [db_string select_sort_order_p {}]
    if { $sort_order_taken_p } {
        db_dml update_sort_order {}
    }
Generic XQL file:
<fullquery name="workflow::action::update_sort_order.select_sort_order_p">
    <querytext>
        select count(*)
        from   workflow_actions
        where  workflow_id = :workflow_id
        and    sort_order = :sort_order
    </querytext>
</fullquery>

<fullquery name="workflow::action::update_sort_order.update_sort_order">
    <querytext>
        update workflow_actions
        set    sort_order = sort_order + 1
        where  workflow_id = :workflow_id
        and    sort_order >= :sort_order
    </querytext>
</fullquery>
packages/workflow/tcl/action-procs.xql

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

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

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