387: cur_job.organization_id) LOOP
388:
389: IF l_cur.substitution_type = WIP_DELETE THEN
390: BEGIN
391: WIP_RESOURCE_VALIDATIONS.Delete_Resource(
392: p_group_id,
393: l_cur.wip_entity_id,
394: l_cur.organization_id,
395: l_cur.substitution_type);
395: l_cur.substitution_type);
396:
397: EXCEPTION
398: when others then
399: wip_logger.log('Error in WIP_RESOURCE_VALIDATIONS.Delete_Resource,l_cur.wip_entity_id='||l_cur.wip_entity_id,l_dummy2);
400: wip_logger.log(SQLERRM,l_dummy2);
401: raise;
402: end;
403:
402: end;
403:
404: ELSIF l_cur.substitution_type = WIP_ADD THEN
405: BEGIN
406: WIP_RESOURCE_VALIDATIONS.Add_Resource(
407: p_group_id,
408: l_cur.wip_entity_id,
409: l_cur.organization_id,
410: l_cur.substitution_type);
410: l_cur.substitution_type);
411:
412: EXCEPTION
413: when others then
414: wip_logger.log('Error in WIP_RESOURCE_VALIDATIONS.Add_Resource,l_cur.wip_entity_id='||l_cur.wip_entity_id,l_dummy2);
415: wip_logger.log(SQLERRM,l_dummy2);
416: raise;
417: end;
418:
417: end;
418:
419: ELSIF l_cur.substitution_type = WIP_CHANGE THEN
420: BEGIN
421: WIP_RESOURCE_VALIDATIONS.Change_Resource(
422: p_group_id,
423: l_cur.wip_entity_id,
424: l_cur.organization_id,
425: l_cur.substitution_type);
424: l_cur.organization_id,
425: l_cur.substitution_type);
426: EXCEPTION
427: when others then
428: wip_logger.log('Error in WIP_RESOURCE_VALIDATIONS.Change_Resource,l_cur.wip_entity_id='||l_cur.wip_entity_id,l_dummy2);
429: wip_logger.log(SQLERRM,l_dummy2);
430: raise;
431: end;
432:
826: cur_job.organization_id) LOOP
827:
828:
829: IF l_cur.substitution_type = WIP_DELETE THEN
830: WIP_RESOURCE_VALIDATIONS.Delete_Sub_Resource(
831: p_group_id,
832: l_cur.wip_entity_id,
833: l_cur.organization_id,
834: l_cur.substitution_type);
833: l_cur.organization_id,
834: l_cur.substitution_type);
835:
836: ELSIF l_cur.substitution_type = WIP_ADD THEN
837: WIP_RESOURCE_VALIDATIONS.Add_Sub_Resource(
838: p_group_id,
839: l_cur.wip_entity_id,
840: l_cur.organization_id,
841: l_cur.substitution_type);
840: l_cur.organization_id,
841: l_cur.substitution_type);
842:
843: ELSIF l_cur.substitution_type = WIP_CHANGE THEN
844: WIP_RESOURCE_VALIDATIONS.Change_Sub_Resource(
845: p_group_id,
846: l_cur.wip_entity_id,
847: l_cur.organization_id,
848: l_cur.substitution_type);
885:
886: /** At this point, both resource and sub res changes have been done.
887: See if the sum of these changes created any violations of the
888: rules regarding sub groups **/
889: WIP_RESOURCE_VALIDATIONS.Check_Sub_Groups(p_group_id,
890: cur_job.organization_id,
891: cur_job.wip_entity_id);
892:
893: