workflow::case::role::set_default_assignees (public)

 workflow::case::role::set_default_assignees -case_id case_id \
    -role_id role_id

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

Find the default assignee for this role.

Switches:
-case_id
(required)
the ID of the case.
-role_id
(required)
the ID of the role to assign.
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::case::assign_roles workflow::case::assign_roles (private) workflow::case::role::set_default_assignees workflow::case::role::set_default_assignees workflow::case::assign_roles->workflow::case::role::set_default_assignees acs_sc::invoke acs_sc::invoke (public) workflow::case::role::set_default_assignees->acs_sc::invoke db_transaction db_transaction (public) workflow::case::role::set_default_assignees->db_transaction workflow::case::get_element workflow::case::get_element (public) workflow::case::role::set_default_assignees->workflow::case::get_element workflow::case::role::assignee_insert workflow::case::role::assignee_insert (public) workflow::case::role::set_default_assignees->workflow::case::role::assignee_insert workflow::role::get_callbacks workflow::role::get_callbacks (private) workflow::case::role::set_default_assignees->workflow::role::get_callbacks

Testcases:
No testcase defined.
Source code:
    set contract_name [workflow::service_contract::role_default_assignees]

    db_transaction {

        set impl_names [workflow::role::get_callbacks  -role_id $role_id  -contract_name $contract_name]
        
        set object_id [workflow::case::get_element -case_id $case_id -element object_id]
        
        foreach impl_name $impl_names {
            # Call the service contract implementation
            set party_id_list [acs_sc::invoke  -contract $contract_name  -operation "GetAssignees"  -impl $impl_name  -call_args [list $case_id $object_id $role_id]]
    
            if { [llength $party_id_list] != 0 } {
                assignee_insert -case_id $case_id -role_id $role_id -party_ids $party_id_list

                # We stop when the first callback returned something
                break
            }
        }
    }
Generic XQL file:
packages/workflow/tcl/case-procs.xql

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

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

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