529: WHERE pjg.master_flag = 'Y'
530: AND pjg.job_group_id = get_job_group_id(l_job_id)
531: UNION
532: SELECT distinct pjr.from_job_id effected_job_id
533: FROM pa_job_relationships pjr
534: ,per_job_groups pjg
535: WHERE pjg.master_flag = 'Y'
536: AND pjr.to_job_id = l_job_id
537: AND pjr.to_job_group_id = pjg.job_group_id
536: AND pjr.to_job_id = l_job_id
537: AND pjr.to_job_group_id = pjg.job_group_id
538: UNION
539: SELECT distinct pjr.to_job_id effected_job_id
540: FROM pa_job_relationships pjr
541: ,per_job_groups pjg
542: WHERE pjg.master_flag = 'Y'
543: AND pjr.from_job_id = l_job_id
544: AND pjr.from_job_group_id = pjg.job_group_id;
606:
607: END update_all_jobs;
608:
609: -- This Procedure updates all resource denorm records affected by the
610: -- changes in job mappings in pa_job_relationships table
611: -- It will update the job levels of the resource denorm records
612: PROCEDURE pa_job_relation_job_id
613: (P_calling_mode IN VARCHAR2
614: ,P_from_job_id_old IN pa_job_relationships.from_job_id%type
610: -- changes in job mappings in pa_job_relationships table
611: -- It will update the job levels of the resource denorm records
612: PROCEDURE pa_job_relation_job_id
613: (P_calling_mode IN VARCHAR2
614: ,P_from_job_id_old IN pa_job_relationships.from_job_id%type
615: ,P_from_job_id_new IN pa_job_relationships.from_job_id%type
616: ,P_to_job_id_old IN pa_job_relationships.from_job_id%type
617: ,P_to_job_id_new IN pa_job_relationships.from_job_id%type
618: ,P_from_job_group_id IN pa_job_relationships.from_job_id%type
611: -- It will update the job levels of the resource denorm records
612: PROCEDURE pa_job_relation_job_id
613: (P_calling_mode IN VARCHAR2
614: ,P_from_job_id_old IN pa_job_relationships.from_job_id%type
615: ,P_from_job_id_new IN pa_job_relationships.from_job_id%type
616: ,P_to_job_id_old IN pa_job_relationships.from_job_id%type
617: ,P_to_job_id_new IN pa_job_relationships.from_job_id%type
618: ,P_from_job_group_id IN pa_job_relationships.from_job_id%type
619: ,P_to_job_group_id IN pa_job_relationships.from_job_id%type
612: PROCEDURE pa_job_relation_job_id
613: (P_calling_mode IN VARCHAR2
614: ,P_from_job_id_old IN pa_job_relationships.from_job_id%type
615: ,P_from_job_id_new IN pa_job_relationships.from_job_id%type
616: ,P_to_job_id_old IN pa_job_relationships.from_job_id%type
617: ,P_to_job_id_new IN pa_job_relationships.from_job_id%type
618: ,P_from_job_group_id IN pa_job_relationships.from_job_id%type
619: ,P_to_job_group_id IN pa_job_relationships.from_job_id%type
620: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
613: (P_calling_mode IN VARCHAR2
614: ,P_from_job_id_old IN pa_job_relationships.from_job_id%type
615: ,P_from_job_id_new IN pa_job_relationships.from_job_id%type
616: ,P_to_job_id_old IN pa_job_relationships.from_job_id%type
617: ,P_to_job_id_new IN pa_job_relationships.from_job_id%type
618: ,P_from_job_group_id IN pa_job_relationships.from_job_id%type
619: ,P_to_job_group_id IN pa_job_relationships.from_job_id%type
620: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
621: ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
614: ,P_from_job_id_old IN pa_job_relationships.from_job_id%type
615: ,P_from_job_id_new IN pa_job_relationships.from_job_id%type
616: ,P_to_job_id_old IN pa_job_relationships.from_job_id%type
617: ,P_to_job_id_new IN pa_job_relationships.from_job_id%type
618: ,P_from_job_group_id IN pa_job_relationships.from_job_id%type
619: ,P_to_job_group_id IN pa_job_relationships.from_job_id%type
620: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
621: ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
622: ,x_msg_count OUT NOCOPY NUMBER) IS --File.Sql.39 bug 4440895
615: ,P_from_job_id_new IN pa_job_relationships.from_job_id%type
616: ,P_to_job_id_old IN pa_job_relationships.from_job_id%type
617: ,P_to_job_id_new IN pa_job_relationships.from_job_id%type
618: ,P_from_job_group_id IN pa_job_relationships.from_job_id%type
619: ,P_to_job_group_id IN pa_job_relationships.from_job_id%type
620: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
621: ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
622: ,x_msg_count OUT NOCOPY NUMBER) IS --File.Sql.39 bug 4440895
623:
940: ,l_job_group_id per_job_groups.job_group_id%type
941: ) IS
942:
943: SELECT distinct pjr.from_job_id effected_job_id
944: FROM pa_job_relationships pjr
945: WHERE pjr.to_job_id = l_job_id
946: AND pjr.to_job_group_id = l_job_group_id
947: UNION
948: SELECT distinct pjr.to_job_id effected_job_id
945: WHERE pjr.to_job_id = l_job_id
946: AND pjr.to_job_group_id = l_job_group_id
947: UNION
948: SELECT distinct pjr.to_job_id effected_job_id
949: FROM pa_job_relationships pjr
950: WHERE pjr.from_job_id = l_job_id
951: AND pjr.from_job_group_id = l_job_group_id;
952:
953: BEGIN
1178: WHERE pjg.master_flag = 'Y'
1179: AND pjg.job_group_id = get_job_group_id(l_job_id)
1180: UNION
1181: SELECT distinct pjr.from_job_id effected_job_id
1182: FROM pa_job_relationships pjr
1183: ,per_job_groups pjg
1184: WHERE pjg.master_flag = 'Y'
1185: AND pjr.to_job_id = l_job_id
1186: AND pjr.to_job_group_id = pjg.job_group_id
1185: AND pjr.to_job_id = l_job_id
1186: AND pjr.to_job_group_id = pjg.job_group_id
1187: UNION
1188: SELECT distinct pjr.to_job_id effected_job_id
1189: FROM pa_job_relationships pjr
1190: ,per_job_groups pjg
1191: WHERE pjg.master_flag = 'Y'
1192: AND pjr.from_job_id = l_job_id
1193: AND pjr.from_job_group_id = pjg.job_group_id
1284: AND pjg.job_group_id = get_job_group_id(pvg.job_id)
1285: UNION
1286: SELECT distinct pjr.from_job_id
1287: FROM per_valid_grades pvg
1288: ,pa_job_relationships pjr
1289: ,per_job_groups pjg
1290: WHERE pjg.master_flag = 'Y'
1291: AND pjr.to_job_id = pvg.job_id
1292: AND pjr.to_job_group_id = pjg.job_group_id
1293: AND pvg.grade_id = l_grade_id
1294: UNION
1295: SELECT distinct pjr.to_job_id
1296: FROM per_valid_grades pvg
1297: ,pa_job_relationships pjr
1298: ,per_job_groups pjg
1299: WHERE pjg.master_flag = 'Y'
1300: AND pjr.from_job_id = pvg.job_id
1301: AND pjr.from_job_group_id = pjg.job_group_id
1372:
1373: -- This Procedure will get a list of all affected jobs due to change in the job mapping
1374: -- and then calls to PRM API GET_JOB_LEVEL in a loop which actually
1375: -- updates the levels in the resource denorm table.
1376: -- Whenever job mapping columns in pa_job_relationships updated,workflow will kickoff
1377: -- this api from the database trigger on table pa_job_relationships
1378: -- Pa_Job_Relationships Entity--
1379: -- IN Parameters
1380: -- P_calling_mode,P_from_job_id_new,P_to_job_id_new,P_from_job_group_id,P_to_job_group_id -- INSERT
1373: -- This Procedure will get a list of all affected jobs due to change in the job mapping
1374: -- and then calls to PRM API GET_JOB_LEVEL in a loop which actually
1375: -- updates the levels in the resource denorm table.
1376: -- Whenever job mapping columns in pa_job_relationships updated,workflow will kickoff
1377: -- this api from the database trigger on table pa_job_relationships
1378: -- Pa_Job_Relationships Entity--
1379: -- IN Parameters
1380: -- P_calling_mode,P_from_job_id_new,P_to_job_id_new,P_from_job_group_id,P_to_job_group_id -- INSERT
1381: -- P_calling_mode,P_from_job_id_new,P_to_job_id_new,P_from_job_group_id,P_to_job_group_id,
1374: -- and then calls to PRM API GET_JOB_LEVEL in a loop which actually
1375: -- updates the levels in the resource denorm table.
1376: -- Whenever job mapping columns in pa_job_relationships updated,workflow will kickoff
1377: -- this api from the database trigger on table pa_job_relationships
1378: -- Pa_Job_Relationships Entity--
1379: -- IN Parameters
1380: -- P_calling_mode,P_from_job_id_new,P_to_job_id_new,P_from_job_group_id,P_to_job_group_id -- INSERT
1381: -- P_calling_mode,P_from_job_id_new,P_to_job_id_new,P_from_job_group_id,P_to_job_group_id,
1382: -- P_from_job_id_old,P_to_job_id_old -- UPDATE
1388: ,P_per_grades_sequence_new IN NUMBER DEFAULT NULL
1389: ,P_per_valid_grade_job_id IN per_valid_grades.valid_grade_id%type DEFAULT NULL
1390: ,P_per_valid_grade_id_old IN per_grades.grade_id%type DEFAULT NULL
1391: ,P_per_valid_grade_id_new IN per_grades.grade_id%type DEFAULT NULL
1392: ,P_from_job_id_old IN pa_job_relationships.from_job_id%type DEFAULT NULL
1393: ,P_from_job_id_new IN pa_job_relationships.from_job_id%type DEFAULT NULL
1394: ,P_to_job_id_old IN pa_job_relationships.to_job_id%type DEFAULT NULL
1395: ,P_to_job_id_new IN pa_job_relationships.to_job_id%type DEFAULT NULL
1396: ,P_from_job_group_id IN pa_job_relationships.to_job_id%type DEFAULT NULL
1389: ,P_per_valid_grade_job_id IN per_valid_grades.valid_grade_id%type DEFAULT NULL
1390: ,P_per_valid_grade_id_old IN per_grades.grade_id%type DEFAULT NULL
1391: ,P_per_valid_grade_id_new IN per_grades.grade_id%type DEFAULT NULL
1392: ,P_from_job_id_old IN pa_job_relationships.from_job_id%type DEFAULT NULL
1393: ,P_from_job_id_new IN pa_job_relationships.from_job_id%type DEFAULT NULL
1394: ,P_to_job_id_old IN pa_job_relationships.to_job_id%type DEFAULT NULL
1395: ,P_to_job_id_new IN pa_job_relationships.to_job_id%type DEFAULT NULL
1396: ,P_from_job_group_id IN pa_job_relationships.to_job_id%type DEFAULT NULL
1397: ,P_to_job_group_id IN pa_job_relationships.to_job_id%type DEFAULT NULL
1390: ,P_per_valid_grade_id_old IN per_grades.grade_id%type DEFAULT NULL
1391: ,P_per_valid_grade_id_new IN per_grades.grade_id%type DEFAULT NULL
1392: ,P_from_job_id_old IN pa_job_relationships.from_job_id%type DEFAULT NULL
1393: ,P_from_job_id_new IN pa_job_relationships.from_job_id%type DEFAULT NULL
1394: ,P_to_job_id_old IN pa_job_relationships.to_job_id%type DEFAULT NULL
1395: ,P_to_job_id_new IN pa_job_relationships.to_job_id%type DEFAULT NULL
1396: ,P_from_job_group_id IN pa_job_relationships.to_job_id%type DEFAULT NULL
1397: ,P_to_job_group_id IN pa_job_relationships.to_job_id%type DEFAULT NULL
1398: ,x_return_status IN OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
1391: ,P_per_valid_grade_id_new IN per_grades.grade_id%type DEFAULT NULL
1392: ,P_from_job_id_old IN pa_job_relationships.from_job_id%type DEFAULT NULL
1393: ,P_from_job_id_new IN pa_job_relationships.from_job_id%type DEFAULT NULL
1394: ,P_to_job_id_old IN pa_job_relationships.to_job_id%type DEFAULT NULL
1395: ,P_to_job_id_new IN pa_job_relationships.to_job_id%type DEFAULT NULL
1396: ,P_from_job_group_id IN pa_job_relationships.to_job_id%type DEFAULT NULL
1397: ,P_to_job_group_id IN pa_job_relationships.to_job_id%type DEFAULT NULL
1398: ,x_return_status IN OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
1399: ,x_msg_data IN OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
1392: ,P_from_job_id_old IN pa_job_relationships.from_job_id%type DEFAULT NULL
1393: ,P_from_job_id_new IN pa_job_relationships.from_job_id%type DEFAULT NULL
1394: ,P_to_job_id_old IN pa_job_relationships.to_job_id%type DEFAULT NULL
1395: ,P_to_job_id_new IN pa_job_relationships.to_job_id%type DEFAULT NULL
1396: ,P_from_job_group_id IN pa_job_relationships.to_job_id%type DEFAULT NULL
1397: ,P_to_job_group_id IN pa_job_relationships.to_job_id%type DEFAULT NULL
1398: ,x_return_status IN OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
1399: ,x_msg_data IN OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
1400: ,x_msg_count IN OUT NOCOPY NUMBER --File.Sql.39 bug 4440895
1393: ,P_from_job_id_new IN pa_job_relationships.from_job_id%type DEFAULT NULL
1394: ,P_to_job_id_old IN pa_job_relationships.to_job_id%type DEFAULT NULL
1395: ,P_to_job_id_new IN pa_job_relationships.to_job_id%type DEFAULT NULL
1396: ,P_from_job_group_id IN pa_job_relationships.to_job_id%type DEFAULT NULL
1397: ,P_to_job_group_id IN pa_job_relationships.to_job_id%type DEFAULT NULL
1398: ,x_return_status IN OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
1399: ,x_msg_data IN OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
1400: ,x_msg_count IN OUT NOCOPY NUMBER --File.Sql.39 bug 4440895
1401: )IS