AR Customer Upload TCA Event Subscriptions

Description
Lists all Workflow Business Event subscriptions that may fire during AR Customer Upload processing — including the direct HZ events raised by the HZ APIs, AND the cascaded events that those subscriptions themselves can raise. Used to identify which subscription could be resetting the FND session context (fnd_global.conc_request_id) during the upload.

EVENT SOURCES (the EVENT_SOURCE column ... 
Lists all Workflow Business Event subscriptions that may fire during AR Customer Upload processing — including the direct HZ events raised by the HZ APIs, AND the cascaded events that those subscriptions themselves can raise. Used to identify which subscription could be resetting the FND session context (fnd_global.conc_request_id) during the upload.

EVENT SOURCES (the EVENT_SOURCE column groups them):
- Direct (HZ API): Events raised directly by the HZ TCA APIs that the upload calls (e.g. Location.create, PartySite.create).
- Cascaded (WF Directory Sync): Events raised by HZ_WF_SYNCH.propagate_role when it syncs newly-created parties/contacts into the WF directory.
- Cascaded (ICX Session): Events raised when an ICX session context is created or referenced during the API chain.
- Cascaded (Other): Other related events that may fire.

KEY COLUMNS:
- PHASE: Execution order. Phase < 100 = pre-event, >= 100 = post-event. Lower phase numbers run first.
- RULE_FUNCTION: The PL/SQL function called when the event fires. Custom or non-standard functions are prime suspects.
- EXECUTION_MODE: Synchronous = executes inline in your session. Deferred = forwarded to a queue (executes on a separate WF agent listener session).
- WF_PROCESS_TYPE / WF_PROCESS_NAME: If the subscription launches a Workflow process (rather than calling a rule function), these identify the workflow.
- OWNER_NAME / OWNER_TAG: Non-Oracle owner names indicate custom subscriptions added by the customer or a third-party module.

WHAT TO LOOK FOR IN THE RESULTS:
1. Phase < 100 synchronous subscriptions: These run BEFORE the event itself completes, inline in the upload session. A custom phase-50 subscription that calls fnd_global.apps_initialize or fnd_global.initialize would reset the context mid-API-call. This is the highest-risk pattern.
2. Custom rule_function values: Any function in a customer-specific package (e.g. XX_*, CUST_*) or not matching standard Oracle patterns like HZ_*, WF_*, WSH_*, IEX_*, Pv_*, csm_*, IGS_* should be investigated first. Open the package body and search for apps_initialize, set_nls_context, or fnd_global.initialize calls.
3. WF Process subscriptions: Rows with WF_PROCESS_TYPE / WF_PROCESS_NAME populated launch a Workflow item. Workflow processes can issue their own context init calls. The standard IGSPE002 (Oracle Student System Person Events) workflow is commonly seen and can be intrusive.
4. OUT_AGENT / TO_AGENT populated: Subscription forwards to a queue. These execute on a separate WF agent listener session and will not directly impact the upload session context.
5. HZ_DQM_SYNC.REALTIME_SYNC on phase 252: This is the standard Oracle Data Quality Management sync. It can be heavy but should not reset context. Worth checking if customized.

INVESTIGATION PRIORITY:
1st: Synchronous subscriptions with phase < 100 and non-standard rule_function values.
2nd: Workflow process subscriptions (WF_PROCESS_NAME populated) — particularly IGSPE002 if installed.
3rd: Standard Oracle subscriptions that have been customized (CUSTOMIZATION_LEVEL = U).
   more
select distinct
we.name event_name,
case
when we.name like 'oracle.apps.ar.hz.%' then 'Direct (HZ API)'
when we.name like 'oracle.apps.fnd.wf.ds.%' then 'Cascaded (WF Directory Sync)'
when we.name like 'oracle.apps.icx.%' then 'Cascaded (ICX Session)'
else 'Cascaded (Other)'
end event_source,
wes.phase,
wes.rule_function,
case
when wes.out_agent_guid is not null or wes.to_agent_guid is not null then 'Deferred'
else 'Synchronous'
end execution_mode,
wes.status sub_status,
wes.rule_data,
wes.priority,
wes.source_type sub_source_type,
(select max(wa.name) from wf_agents wa where wa.guid=wes.source_agent_guid) source_agent_name,
(select max(wa.name) from wf_agents wa where wa.guid=wes.out_agent_guid) out_agent_name,
(select max(wa.name) from wf_agents wa where wa.guid=wes.to_agent_guid) to_agent_name,
wes.wf_process_type,
wes.wf_process_name,
wes.parameters sub_parameters,
wes.owner_name sub_owner_name,
wes.owner_tag sub_owner_tag,
wes.description sub_description,
wes.expression sub_expression,
wes.security_group_id sub_security_group_id,
wes.customization_level sub_customization_level,
wes.licensed_flag sub_licensed_flag,
wes.invocation_id,
wes.map_code,
wes.standard_type,
wes.standard_code,
wes.java_rule_func,
wes.on_error_code,
wes.action_code,
we.type event_type,
we.status event_status,
we.generate_function event_generate_function,
we.owner_name event_owner_name,
we.owner_tag event_owner_tag,
we.security_group_id event_security_group_id,
we.customization_level event_customization_level,
we.licensed_flag event_licensed_flag,
we.java_generate_func event_java_generate_func,
we.irep_annotation event_irep_annotation
from
wf_event_subscriptions wes,
wf_events we
where
wes.event_filter_guid=we.guid and
(
we.name in (
'oracle.apps.ar.hz.Location.create',
'oracle.apps.ar.hz.Location.update',
'oracle.apps.ar.hz.PartySite.create',
'oracle.apps.ar.hz.PartySite.update',
'oracle.apps.ar.hz.PartySiteUse.create',
'oracle.apps.ar.hz.PartySiteUse.update',
'oracle.apps.ar.hz.CustAcctSite.create',
'oracle.apps.ar.hz.CustAcctSite.update',
'oracle.apps.ar.hz.CustAcctSiteUse.create',
'oracle.apps.ar.hz.CustAcctSiteUse.update',
'oracle.apps.ar.hz.CustAccount.create',
'oracle.apps.ar.hz.CustAccount.update',
'oracle.apps.ar.hz.Organization.create',
'oracle.apps.ar.hz.Organization.update',
'oracle.apps.ar.hz.Person.create',
'oracle.apps.ar.hz.Person.update',
'oracle.apps.ar.hz.PersonLanguage.create',
'oracle.apps.ar.hz.PersonLanguage.update',
'oracle.apps.ar.hz.Group.create',
'oracle.apps.ar.hz.Group.update',
'oracle.apps.ar.hz.OrgContact.create',
'oracle.apps.ar.hz.OrgContact.update',
'oracle.apps.ar.hz.OrgContactRole.create',
'oracle.apps.ar.hz.OrgContactRole.update',
'oracle.apps.ar.hz.Relationship.create',
'oracle.apps.ar.hz.Relationship.update',
'oracle.apps.ar.hz.ContactPoint.create',
'oracle.apps.ar.hz.ContactPoint.update',
'oracle.apps.ar.hz.CustomerProfile.create',
'oracle.apps.ar.hz.CustomerProfile.update',
'oracle.apps.ar.hz.CustomerProfileAmt.create',
'oracle.apps.ar.hz.CustomerProfileAmt.update',
'oracle.apps.ar.hz.CustomerAccountRole.create',
'oracle.apps.ar.hz.CustomerAccountRole.update',
'oracle.apps.ar.hz.CustAcctRelate.create',
'oracle.apps.ar.hz.CustAcctRelate.update',
'oracle.apps.ar.hz.PartyTaxProfile.create',
'oracle.apps.ar.hz.PartyTaxProfile.update',
'oracle.apps.ar.hz.DQM.realtimesync'
)
or we.name like 'oracle.apps.fnd.wf.ds.user.%'
or we.name like 'oracle.apps.fnd.wf.ds.userrole.%'
or we.name like 'oracle.apps.fnd.wf.ds.role.%'
or we.name like 'oracle.apps.icx.security.session.%'
) and
1=1
order by
event_source,
we.name,
wes.phase
Parameter NameSQL textValidation
Status
wes.status=:p_status
LOV