1192:
1193: l_blk_enr_request_id OTA_BULK_ENR_REQUESTS.BULK_ENR_REQUEST_ID%TYPE;
1194: BEGIN
1195: IF (funcmode='RUN') THEN
1196: l_blk_enr_request_id := WF_ENGINE.getitemattrtext(itemtype => itemtype,
1197: itemkey => itemkey,
1198: aname =>'BLK_ENR_REQUEST_ID',
1199: ignore_notfound => true);
1200:
1292: select hr_workflow_item_key_s.nextval
1293: into l_item_key
1294: from sys.dual;
1295:
1296: WF_ENGINE.CREATEPROCESS(l_item_type, l_item_key, l_process);
1297:
1298: l_person_id := l_request_rec.requestor_id;
1299:
1300: wf_engine.additemattr
1296: WF_ENGINE.CREATEPROCESS(l_item_type, l_item_key, l_process);
1297:
1298: l_person_id := l_request_rec.requestor_id;
1299:
1300: wf_engine.additemattr
1301: (itemtype => l_item_type
1302: ,itemkey => l_item_key
1303: ,aname => 'BLK_ENR_REQUEST_ID');
1304:
1301: (itemtype => l_item_type
1302: ,itemkey => l_item_key
1303: ,aname => 'BLK_ENR_REQUEST_ID');
1304:
1305: WF_ENGINE.setitemattrnumber(l_item_type,l_item_key,'BLK_ENR_REQUEST_ID',p_enr_request_id);
1306: WF_ENGINE.setitemattrnumber(l_item_type,l_item_key,'CONC_REQUEST_ID',l_request_rec.conc_program_request_id);
1307: --Enh 5606090: Language support for Bulk enrollment.
1308: WF_ENGINE.setitemattrtext(l_item_type,l_item_key,'OBJECT_NAME',l_request_rec.object_id);
1309: WF_ENGINE.setitemattrtext(
1302: ,itemkey => l_item_key
1303: ,aname => 'BLK_ENR_REQUEST_ID');
1304:
1305: WF_ENGINE.setitemattrnumber(l_item_type,l_item_key,'BLK_ENR_REQUEST_ID',p_enr_request_id);
1306: WF_ENGINE.setitemattrnumber(l_item_type,l_item_key,'CONC_REQUEST_ID',l_request_rec.conc_program_request_id);
1307: --Enh 5606090: Language support for Bulk enrollment.
1308: WF_ENGINE.setitemattrtext(l_item_type,l_item_key,'OBJECT_NAME',l_request_rec.object_id);
1309: WF_ENGINE.setitemattrtext(
1310: l_item_type
1304:
1305: WF_ENGINE.setitemattrnumber(l_item_type,l_item_key,'BLK_ENR_REQUEST_ID',p_enr_request_id);
1306: WF_ENGINE.setitemattrnumber(l_item_type,l_item_key,'CONC_REQUEST_ID',l_request_rec.conc_program_request_id);
1307: --Enh 5606090: Language support for Bulk enrollment.
1308: WF_ENGINE.setitemattrtext(l_item_type,l_item_key,'OBJECT_NAME',l_request_rec.object_id);
1309: WF_ENGINE.setitemattrtext(
1310: l_item_type
1311: ,l_item_key
1312: ,'OBJECT_TYPE'
1305: WF_ENGINE.setitemattrnumber(l_item_type,l_item_key,'BLK_ENR_REQUEST_ID',p_enr_request_id);
1306: WF_ENGINE.setitemattrnumber(l_item_type,l_item_key,'CONC_REQUEST_ID',l_request_rec.conc_program_request_id);
1307: --Enh 5606090: Language support for Bulk enrollment.
1308: WF_ENGINE.setitemattrtext(l_item_type,l_item_key,'OBJECT_NAME',l_request_rec.object_id);
1309: WF_ENGINE.setitemattrtext(
1310: l_item_type
1311: ,l_item_key
1312: ,'OBJECT_TYPE'
1313: ,l_request_rec.object_type);
1322: OPEN csr_get_successful_learners;
1323: FETCH csr_get_successful_learners INTO l_success_learners;
1324: CLOSE csr_get_successful_learners;
1325:
1326: WF_ENGINE.setitemattrnumber(l_item_type,l_item_key,'TOTAL_NUMBER',l_selected_learners);
1327: WF_ENGINE.setitemattrnumber(l_item_type,l_item_key,'ERROR_NUMBER',l_error_learners);
1328: WF_ENGINE.setitemattrnumber(l_item_type,l_item_key,'SUCCESS_NUMBER',l_success_learners);
1329:
1330: IF l_person_id IS NOT NULL THEN
1323: FETCH csr_get_successful_learners INTO l_success_learners;
1324: CLOSE csr_get_successful_learners;
1325:
1326: WF_ENGINE.setitemattrnumber(l_item_type,l_item_key,'TOTAL_NUMBER',l_selected_learners);
1327: WF_ENGINE.setitemattrnumber(l_item_type,l_item_key,'ERROR_NUMBER',l_error_learners);
1328: WF_ENGINE.setitemattrnumber(l_item_type,l_item_key,'SUCCESS_NUMBER',l_success_learners);
1329:
1330: IF l_person_id IS NOT NULL THEN
1331: OPEN csr_get_person_name(l_person_id);
1324: CLOSE csr_get_successful_learners;
1325:
1326: WF_ENGINE.setitemattrnumber(l_item_type,l_item_key,'TOTAL_NUMBER',l_selected_learners);
1327: WF_ENGINE.setitemattrnumber(l_item_type,l_item_key,'ERROR_NUMBER',l_error_learners);
1328: WF_ENGINE.setitemattrnumber(l_item_type,l_item_key,'SUCCESS_NUMBER',l_success_learners);
1329:
1330: IF l_person_id IS NOT NULL THEN
1331: OPEN csr_get_person_name(l_person_id);
1332: FETCH csr_get_person_name INTO l_person_full_name;
1340: if l_request_rec.object_type <> 'LPCL' then
1341: fnd_file.put_line(FND_FILE.LOG,'Requestor Name ' ||l_person_full_name);
1342: end if;
1343: IF l_person_full_name IS NOT NULL then
1344: WF_ENGINE.setitemattrtext(l_item_type,l_item_key,'EVENT_OWNER',l_user_name);
1345: END IF;
1346: END IF;
1347:
1348: -- Get and set owner role
1354: p_name =>l_role_name,
1355: p_display_name =>l_role_display_name);
1356:
1357:
1358: WF_ENGINE.SetItemOwner(itemtype => l_item_type,
1359: itemkey =>l_item_key,
1360: owner =>l_role_name);
1361:
1362: hr_utility.set_location('After Setting Owner'||l_proc, 10);
1361:
1362: hr_utility.set_location('After Setting Owner'||l_proc, 10);
1363:
1364:
1365: WF_ENGINE.STARTPROCESS(l_item_type,l_item_key);
1366:
1367: hr_utility.set_location('leaving:'||l_proc, 20);
1368:
1369: EXCEPTION