workflow::role::callback_insert (public)
workflow::role::callback_insert -role_id role_id -name name \ [ -sort_order sort_order ]
Defined in packages/workflow/tcl/role-procs.tcl
Add an assignment rule to a role.
- Switches:
- -role_id (required)
- The ID of the role
- -name (required)
- Name of service contract implementation, in the form (impl_owner_name).(impl_name), for example, bug-tracker.ComponentMaintainer.
- -sort_order (optional)
- The sort_order for the rule. Leave blank to add to the end of the list
- Author:
- Lars Pind <lars@collaboraid.biz>
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: db_transaction { # Get the impl_id set acs_sc_impl_id [workflow::service_contract::get_impl_id -name $name] # Get the sort order if { (![info exists sort_order] || $sort_order eq "") } { set sort_order [db_string select_sort_order {}] } # Insert the rule db_dml insert_callback {} } set workflow_id [workflow::role::get_workflow_id -role_id $role_id] workflow::role::flush_cache -workflow_id $workflow_id return $acs_sc_impl_idXQL Not present: PostgreSQL, Oracle Generic XQL file: <fullquery name="workflow::role::callback_insert.insert_callback"> <querytext> insert into workflow_role_callbacks (role_id, acs_sc_impl_id, sort_order) values (:role_id, :acs_sc_impl_id, :sort_order) </querytext> </fullquery> <fullquery name="workflow::role::callback_insert.select_sort_order"> <querytext> select coalesce(max(sort_order),0) + 1 from workflow_role_callbacks where role_id = :role_id </querytext> </fullquery>packages/workflow/tcl/role-procs.xql