workflow::case::role::get_search_query (public)

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

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

Get the search query for this role.

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

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::case::role::get_assignee_widget workflow::case::role::get_assignee_widget (public) workflow::case::role::get_search_query workflow::case::role::get_search_query workflow::case::role::get_assignee_widget->workflow::case::role::get_search_query acs_sc::invoke acs_sc::invoke (public) workflow::case::role::get_search_query->acs_sc::invoke db_map db_map (public) workflow::case::role::get_search_query->db_map workflow::case::get_element workflow::case::get_element (public) workflow::case::role::get_search_query->workflow::case::get_element workflow::role::get_callbacks workflow::role::get_callbacks (private) workflow::case::role::get_search_query->workflow::role::get_callbacks workflow::service_contract::role_assignee_subquery workflow::service_contract::role_assignee_subquery (public) workflow::case::role::get_search_query->workflow::service_contract::role_assignee_subquery

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

    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]

    set subquery {}
    foreach impl_name $impl_names {
        # Call the service contract implementation
        set subquery [acs_sc::invoke  -contract $contract_name  -operation "GetSubquery"  -impl $impl_name  -call_args [list $case_id $object_id $role_id]]

        if { $subquery ne "" } {
            # Return after the first non-empty list
            break
        }
    }

    return [db_map select_search_results]
Generic XQL file:
<fullquery name="workflow::case::role::get_search_query.select_search_results">
    <querytext>
        select distinct acs_object.name(p.party_id) || ' (' || p.email || ')' as label, p.party_id
        from   [ad_decode $subquery "" "cc_users" $subquery] p
        where  upper(coalesce(acs_object.name(p.party_id) || ' ', '')  || p.email) like upper('%'||:value||'%')
        order  by label
    </querytext>
</fullquery>
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: