The following lines contain the word 'select', 'insert', 'update' or 'delete':
Select distinct person_id,business_group_id,effective_start_date,effective_end_date
from per_all_people_f
where party_id = p_in_party_id
and trunc(p_in_effective_start_date) between effective_start_date and effective_end_date;
Select *
from wf_user_role_assignments
where user_name = p_in_user_name
and role_name like 'POS:%'
and start_date < (trunc(p_in_effective_start_date));
select user_name, start_date, end_date, person_party_id, email_address
into l_user_name,l_user_start_date, l_user_end_date, l_party_id, l_email_address
from fnd_user
where user_id = l_event_key;
If l_event_name in ('oracle.apps.fnd.post.user.update')
then
For C_User_Pos_Prev_rel_ptr in C_User_Pos_Prev_rel (l_user_name,l_user_start_date)
Loop
WF_LOCAL_SYNCH.propagate_user_role(p_user_orig_system => C_User_Pos_Prev_rel_ptr.USER_ORIG_SYSTEM,
p_user_orig_system_id => C_User_Pos_Prev_rel_ptr.USER_ORIG_SYSTEM_ID,
p_role_orig_system => C_User_Pos_Prev_rel_ptr.ROLE_ORIG_SYSTEM,
p_role_orig_system_id => C_User_Pos_Prev_rel_ptr.ROLE_ORIG_SYSTEM_ID,
p_start_date => C_User_Pos_Prev_rel_ptr.START_DATE ,
p_expiration_date => l_user_start_date-1 );
wf_directory.DeleteUserRole(p_username => l_user_name,
p_rolename => C_User_Pos_Prev_rel_ptr.ROLE_NAME,
p_userOrigSystem => C_User_Pos_Prev_rel_ptr.USER_ORIG_SYSTEM,
p_userOrigSystemID => C_User_Pos_Prev_rel_ptr.USER_ORIG_SYSTEM_ID,
p_roleOrigSystem => C_User_Pos_Prev_rel_ptr.ROLE_ORIG_SYSTEM,
p_roleOrigSystemID => C_User_Pos_Prev_rel_ptr.ROLE_ORIG_SYSTEM_ID);
/*Now select the person records associated with this party id*/
For C_User_Person_ptr in C_User_Person(l_party_id, l_user_start_date) -- Call this to propogate the user role
Loop
per_hrwf_synch.sych_user_pos_role(p_in_user_name => l_user_name,
p_in_person_id => C_User_Person_ptr.person_id,
p_in_start_date => l_user_start_date,
p_in_exp_date => l_user_end_date);