2723: end;
2724:
2725: --If either the superior or the subordinate is a newly created role we
2726: --know that it is impossible to have created a loop in the hierarchy so
2727: --we only validate the hierarchy if neither is in the WF_LOCAL_SYNCH.Cache
2728: if (NOT (WF_LOCAL_SYNCH.CheckCache(p_sub_name)) and
2729: NOT (WF_LOCAL_SYNCH.CheckCache(p_super_name))) then
2730: --Access the hierarchy to make sure a loop was not created.
2731:
2724:
2725: --If either the superior or the subordinate is a newly created role we
2726: --know that it is impossible to have created a loop in the hierarchy so
2727: --we only validate the hierarchy if neither is in the WF_LOCAL_SYNCH.Cache
2728: if (NOT (WF_LOCAL_SYNCH.CheckCache(p_sub_name)) and
2729: NOT (WF_LOCAL_SYNCH.CheckCache(p_super_name))) then
2730: --Access the hierarchy to make sure a loop was not created.
2731:
2732: GetRelationships(p_name=>p_sub_name,
2725: --If either the superior or the subordinate is a newly created role we
2726: --know that it is impossible to have created a loop in the hierarchy so
2727: --we only validate the hierarchy if neither is in the WF_LOCAL_SYNCH.Cache
2728: if (NOT (WF_LOCAL_SYNCH.CheckCache(p_sub_name)) and
2729: NOT (WF_LOCAL_SYNCH.CheckCache(p_super_name))) then
2730: --Access the hierarchy to make sure a loop was not created.
2731:
2732: GetRelationships(p_name=>p_sub_name,
2733: p_superiors=>l_superiors,
2733: p_superiors=>l_superiors,
2734: p_subordinates=>l_subordinates);
2735: else
2736: --We must be sure to delete the super and sub name from the
2737: --WF_LOCAL_SYNCH cache because they are no longer "trusted" to not
2738: --potentially cause a loop in the hierarchy.
2739: WF_LOCAL_SYNCH.DeleteCache(p_sub_name);
2740: WF_LOCAL_SYNCH.DeleteCache(p_super_name);
2741: end if;
2735: else
2736: --We must be sure to delete the super and sub name from the
2737: --WF_LOCAL_SYNCH cache because they are no longer "trusted" to not
2738: --potentially cause a loop in the hierarchy.
2739: WF_LOCAL_SYNCH.DeleteCache(p_sub_name);
2740: WF_LOCAL_SYNCH.DeleteCache(p_super_name);
2741: end if;
2742:
2743: --Raise the oracle.apps.wf.ds.roleHierarchy.relationshipCreated event
2736: --We must be sure to delete the super and sub name from the
2737: --WF_LOCAL_SYNCH cache because they are no longer "trusted" to not
2738: --potentially cause a loop in the hierarchy.
2739: WF_LOCAL_SYNCH.DeleteCache(p_sub_name);
2740: WF_LOCAL_SYNCH.DeleteCache(p_super_name);
2741: end if;
2742:
2743: --Raise the oracle.apps.wf.ds.roleHierarchy.relationshipCreated event
2744: RaiseEvent(