The following lines contain the word 'select', 'insert', 'update' or 'delete':
** Name : fnd_create_update
** Type : Public, FND Internal
** Desc :
** Pre-Reqs :
** Parameters :
*/
procedure fnd_create_update(
p_event_type in varchar2
, p_user_name in fnd_user.user_name%type
, p_owner in varchar2
, p_unencrypted_password in varchar2
, p_description in fnd_user.description%type
, p_email_address in fnd_user.email_address%type
, p_fax in fnd_user.fax%type
, p_start_date in varchar2
, p_end_date in varchar2
, p_isenabled in varchar2
, p_user_guid in fnd_user.user_guid%type
, x_user_id out nocopy fnd_user.user_id%type
) is
l_module_source varchar2(256);
l_module_source := G_MODULE_SOURCE || 'fnd_create_update: ';
if (p_event_type = wf_oid.SUBSCRIPTION_DELETE) then
update fnd_user set end_date= sysdate
where user_name = l_apps_userguid_key.user_name;
end fnd_create_update;
procedure fnd_create_update(
p_wf_event in wf_event_t
, p_event_type in varchar2
, p_user_name in fnd_user.user_name%type
, p_user_guid in fnd_user.user_guid%type
, x_user_id out nocopy fnd_user.user_id%type
) is
l_module_source varchar2(256);
l_module_source := G_MODULE_SOURCE || 'fnd_create_update: ';
fnd_create_update(
p_event_type => p_event_type
, p_user_name => p_wf_event.GetEventKey
, p_user_guid => p_user_guid
, p_owner => fnd_oid_util.G_CUST
, p_unencrypted_password => null
, p_description => l_description
, p_email_address => l_email_address
, p_fax => l_fax
, p_start_date => l_start_date
, p_end_date => l_end_date
, p_isenabled => l_isenabled
, x_user_id => l_user_id);
end fnd_create_update;
** Name : hz_create_update
** Type : Public, FND Internal
** Desc :
** Pre-Reqs :
** Parameters :
*/
procedure hz_create_update(
p_wf_event in wf_event_t
, p_event_type in varchar2
, p_return_status out nocopy varchar2
);
fnd_create_update(
p_wf_event => p_event
, p_event_type => wf_oid.IDENTITY_ADD
, p_user_name => l_event_key
, p_user_guid => l_orcl_guid
, x_user_id => l_user_id
);
fnd_create_update(
p_wf_event => p_event
, p_event_type => WF_OID.IDENTITY_MODIFY
, p_user_name => p_event.GetEventKey()
, p_user_guid => l_orcl_guid
, x_user_id => l_user_id
);
function identity_delete(
p_subscription_guid in raw
, p_event in out nocopy wf_event_t)
return varchar2 is
l_module_source varchar2(256);
l_module_source := G_MODULE_SOURCE || 'identity_delete: ';
update fnd_user
set end_date = sysdate
where user_name = p_event.GetEventKey;
end identity_delete;
fnd_create_update(
p_wf_event => p_event
, p_event_type => wf_oid.SUBSCRIPTION_ADD
, p_user_name => l_event_key
, p_user_guid => l_orcl_guid
, x_user_id => l_user_id
);
* In both instances a SUBSCRIPTION_DELETE event is raises. The change_source
* attribute is however different as below:
* OID -> change_source attribute is OID
* EBIZ -> change_source attribute is EBIZ
* Please make sure that the change_source is indeed EBIZ and not FND_USER
* when the event is raised by EBIZ.
*/
function subscription_delete(
p_subscription_guid in raw
, p_event in out nocopy wf_event_t)
return varchar2 is
l_module_source varchar2(256);
l_module_source := G_MODULE_SOURCE || 'subscription_delete: ';
l_event_name := WF_OID.SUBSCRIPTION_DELETE;
insert into wf_entity_changes(
entity_type, entity_key_value, flavor, change_date)
values(
wf_oid.SUBSCRIPTION_DELETE, l_event_key, l_change_source, sysdate);
/*fnd_create_update(
p_event_type => l_event_name
, p_user_name => p_event.GetEventKey
, p_user_guid => l_orcl_guid
, p_owner => fnd_oid_util.G_CUST
, p_unencrypted_password => null
, p_description => null
, p_email_address => null
, p_fax => null
, p_start_date => fnd_oid_util.G_NULL
, p_end_date => fnd_oid_util.G_NULL
, x_user_id => l_user_id);*/
fnd_create_update(
p_wf_event => p_event
, p_event_type => wf_oid.SUBSCRIPTION_DELETE
, p_user_name => l_event_key
, p_user_guid => l_orcl_guid
, x_user_id => l_user_id
);
end subscription_delete;
select attribute_name
, attribute_value
from wf_attribute_cache
where entity_type = fnd_oid_util.G_USER
and entity_key_value = p_user_name
and attribute_name <> fnd_oid_util.G_CACHE_CHANGED;
hz_create_update(
p_wf_event => p_event
, p_event_type => wf_oid.IDENTITY_ADD
, p_return_status => l_return_status);
hz_create_update(
p_wf_event => p_event
, p_event_type => wf_oid.IDENTITY_MODIFY
, p_return_status => l_return_status);
function hz_identity_delete(
p_subscription_guid in raw
, p_event in out nocopy wf_event_t)
return varchar2 is
l_module_source varchar2(256);
l_module_source := G_MODULE_SOURCE || 'hz_identity_delete: ';
end hz_identity_delete;
hz_create_update(
p_wf_event => p_event
, p_event_type => wf_oid.SUBSCRIPTION_ADD
, p_return_status => l_return_status);
function hz_subscription_delete(
p_subscription_guid in raw
, p_event in out nocopy wf_event_t)
return varchar2 is
l_module_source varchar2(256);
l_module_source := G_MODULE_SOURCE || 'hz_subscription_delete: ';
end hz_subscription_delete;
procedure hz_create_update(
p_wf_event in wf_event_t
, p_event_type in varchar2
, p_return_status out nocopy varchar2
) is
l_module_source varchar2(256);
l_module_source := G_MODULE_SOURCE || 'hz_create_update: ';
fnd_oid_users.hz_update(
p_ldap_message => l_ldap_message
, x_return_status => p_return_status);
select count(*) into l_count
from fnd_user
where user_name = l_event_key
and user_guid is not null;
end hz_create_update;
SELECT responsibility_id, application_id
from fnd_responsibility
where RESPONSIBILITY_KEY = p_resp_key;
fnd_user_resp_groups_api.insert_assignment(
user_id => l_apps_user_key.user_id
, responsibility_id => l_responsibility_id
, responsibility_application_id => l_application_id
, security_group_id => null
, start_date => sysdate
, end_date => null
, description => 'Default Assignment for OID User'
);
fnd_user_resp_groups_api.insert_assignment(
user_id => l_apps_user_key.user_id
, responsibility_id => l_responsibility_id
, responsibility_application_id => l_application_id
, security_group_id => null
, start_date => sysdate
, end_date => null
, description => 'Default Assignment for OID and Ebiz User'
);