workflow::state::fsm::update_sort_order (private)
workflow::state::fsm::update_sort_order -workflow_id workflow_id \ -sort_order sort_order
Defined in packages/workflow/tcl/state-procs.tcl
Increase the sort_order of other states, if the new sort_order is already taken.
- Switches:
- -workflow_id (required)
- -sort_order (required)
- Partial Call Graph (max 5 caller/called nodes):
- 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 {} }XQL Not present: PostgreSQL, Oracle Generic XQL file: <fullquery name="workflow::state::fsm::update_sort_order.select_sort_order_p"> <querytext> select count(*) from workflow_fsm_states where workflow_id = :workflow_id and sort_order = :sort_order </querytext> </fullquery> <fullquery name="workflow::state::fsm::update_sort_order.update_sort_order"> <querytext> update workflow_fsm_states set sort_order = sort_order + 1 where workflow_id = :workflow_id and sort_order >= :sort_order </querytext> </fullquery>packages/workflow/tcl/state-procs.xql