DBA Data[Home] [Help]

APPS.HR_APPROVAL_SS dependencies on HR_API

Line 3063: FROM hr_api_transactions

3059: lv_result_display varchar2(250);
3060:
3061: CURSOR csr_txn (p_txn_id IN NUMBER)IS
3062: SELECT transaction_ref_table, transaction_ref_id
3063: FROM hr_api_transactions
3064: WHERE transaction_id = p_txn_id;
3065: l_transaction_ref_table VARCHAR2(50);
3066: l_transaction_ref_id NUMBER;
3067:

Line 4046: lv_creator_person_id hr_api_transactions.creator_person_id%type;

4042: lv_roleName wf_users.name%type;
4043: lv_businessGroupId per_all_people_f.business_group_id%type;
4044: lv_orig_systemId wf_roles.orig_system_id%type;
4045: lv_orig_system wf_roles.orig_system%type;
4046: lv_creator_person_id hr_api_transactions.creator_person_id%type;
4047: begin
4048: g_debug := hr_utility.debug_enabled;
4049: if g_debug then
4050: hr_utility.set_location('Entering:'|| g_package||'.'||c_proc, 1);

Line 4069: from hr_api_transactions

4065: -- check the case for creator person id
4066: begin
4067: select creator_person_id
4068: into lv_creator_person_id
4069: from hr_api_transactions
4070: where transaction_id=p_transaction_id;
4071:
4072: if(lv_creator_person_id=lv_orig_systemId) then
4073: return 'Y';

Line 4173: p_transaction_id in hr_api_transactions.transaction_id%type,

4169: end getUserOrigSystemId;
4170:
4171:
4172: procedure handleRFCAction(p_approval_notification_id in wf_notifications.notification_id%type,
4173: p_transaction_id in hr_api_transactions.transaction_id%type,
4174: p_item_type in wf_items.item_type%type,
4175: p_item_key in wf_items.item_key%type,
4176: p_rfcRoleName in wf_roles.name%type,
4177: p_rfcUserOrigSystem in wf_roles.orig_system%type,

Line 4760: p_transaction_id in hr_api_transactions.transaction_id%type,

4756: end appraisalRolesReInit;
4757:
4758:
4759: procedure reInitPerformerRoles(p_notification_id in wf_notifications.notification_id%type,
4760: p_transaction_id in hr_api_transactions.transaction_id%type,
4761: p_item_type in wf_items.item_type%type,
4762: p_item_key in wf_items.item_key%type) is
4763: c_proc constant varchar2(30) := 'reInitPerformerRoles';
4764: lv_item_type wf_items.item_type%type;

Line 4790: from hr_api_transactions

4786: elsif(p_transaction_id is not null) then
4787: begin
4788: select item_type,item_key
4789: into lv_item_type,lv_item_key
4790: from hr_api_transactions
4791: where transaction_id=p_transaction_id;
4792: exception
4793: when others then
4794: null;

Line 5047: ,p_relaunch_function hr_api_transactions.relaunch_function%type

5043:
5044: procedure startGenericApprovalProcess(p_transaction_id in number
5045: ,p_item_key in out nocopy wf_items.item_key%type
5046: ,p_wf_ntf_sub_fnd_msg in fnd_new_messages.message_name%type
5047: ,p_relaunch_function hr_api_transactions.relaunch_function%type
5048: ,p_additional_wf_attributes in HR_WF_ATTR_TABLE
5049: ,p_status out nocopy varchar2
5050: ,p_error_message out nocopy varchar2
5051: ,p_errstack out nocopy varchar2

Line 5057: lr_transaction_rec hr_api_transactions%rowtype;

5053: is
5054: c_proc constant varchar2(30) := 'startGenericApprovalProcess';
5055: lv_item_type wf_items.item_type%type;
5056: lv_item_key wf_items.item_key%type;
5057: lr_transaction_rec hr_api_transactions%rowtype;
5058: lv_status varchar2(8);
5059: lv_result varchar2(30);
5060: lv_errorActid wf_item_activity_statuses.process_activity%type;
5061: lv_errname VARCHAR2(4000);

Line 5080: from hr_api_transactions

5076: -- block to get the transaction record details
5077: begin
5078: select *
5079: into lr_transaction_rec
5080: from hr_api_transactions
5081: where transaction_id=p_transaction_id;
5082: exception
5083: when no_data_found then
5084: raise;

Line 5335: lr_hr_api_transaction_rec hr_api_transactions%rowtype;

5331: function getinitApprovalBlockId(p_transaction_id in number) return number
5332: is
5333:
5334: c_proc constant varchar2(30) := 'getinitApprovalBlockId';
5335: lr_hr_api_transaction_rec hr_api_transactions%rowtype;
5336: ln_activity_id number;
5337: lv_loginPersonDispName per_all_people_f.full_name%type;
5338: lv_loginPersonUserName fnd_user.user_name%type;
5339: ln_loginPersonId fnd_user.employee_id%type;

Line 5342: select * into lr_hr_api_transaction_rec

5338: lv_loginPersonUserName fnd_user.user_name%type;
5339: ln_loginPersonId fnd_user.employee_id%type;
5340: begin
5341: if(p_transaction_id is not null) then
5342: select * into lr_hr_api_transaction_rec
5343: from hr_api_transactions
5344: where transaction_id=p_transaction_id;
5345: if(lr_hr_api_transaction_rec.transaction_ref_table='PER_APPRAISALS') then
5346: -- appraisal specfic

Line 5343: from hr_api_transactions

5339: ln_loginPersonId fnd_user.employee_id%type;
5340: begin
5341: if(p_transaction_id is not null) then
5342: select * into lr_hr_api_transaction_rec
5343: from hr_api_transactions
5344: where transaction_id=p_transaction_id;
5345: if(lr_hr_api_transaction_rec.transaction_ref_table='PER_APPRAISALS') then
5346: -- appraisal specfic
5347:

Line 5345: if(lr_hr_api_transaction_rec.transaction_ref_table='PER_APPRAISALS') then

5341: if(p_transaction_id is not null) then
5342: select * into lr_hr_api_transaction_rec
5343: from hr_api_transactions
5344: where transaction_id=p_transaction_id;
5345: if(lr_hr_api_transaction_rec.transaction_ref_table='PER_APPRAISALS') then
5346: -- appraisal specfic
5347:
5348: -- set the item attributes specific to appraisals
5349: -- get the wf role info for the login user

Line 5356: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type

5352: ,p_orig_system_id => fnd_global.employee_id
5353: ,p_name => lv_loginPersonUserName
5354: ,p_display_name => lv_loginPersonDispName);
5355: --HR_APPRAISAL_FROM_USER_ATTR
5356: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type
5357: ,lr_hr_api_transaction_rec.item_key
5358: ,'HR_APPRAISAL_FROM_USER_ATTR',
5359: fnd_global.user_name);
5360: -- HR_APPRAISAL_FROM_NAME_ATTR

Line 5357: ,lr_hr_api_transaction_rec.item_key

5353: ,p_name => lv_loginPersonUserName
5354: ,p_display_name => lv_loginPersonDispName);
5355: --HR_APPRAISAL_FROM_USER_ATTR
5356: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type
5357: ,lr_hr_api_transaction_rec.item_key
5358: ,'HR_APPRAISAL_FROM_USER_ATTR',
5359: fnd_global.user_name);
5360: -- HR_APPRAISAL_FROM_NAME_ATTR
5361: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type

Line 5361: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type

5357: ,lr_hr_api_transaction_rec.item_key
5358: ,'HR_APPRAISAL_FROM_USER_ATTR',
5359: fnd_global.user_name);
5360: -- HR_APPRAISAL_FROM_NAME_ATTR
5361: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type
5362: ,lr_hr_api_transaction_rec.item_key
5363: ,'HR_APPRAISAL_FROM_NAME_ATTR'
5364: ,lv_loginPersonDispName);
5365:

Line 5362: ,lr_hr_api_transaction_rec.item_key

5358: ,'HR_APPRAISAL_FROM_USER_ATTR',
5359: fnd_global.user_name);
5360: -- HR_APPRAISAL_FROM_NAME_ATTR
5361: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type
5362: ,lr_hr_api_transaction_rec.item_key
5363: ,'HR_APPRAISAL_FROM_NAME_ATTR'
5364: ,lv_loginPersonDispName);
5365:
5366: -- APPROVAL_COMMENT_COPY

Line 5371: lr_hr_api_transaction_rec.item_type,

5367: -- ??? module need to handle in the UI layer.
5368:
5369: -- set the blockid value
5370: hr_appraisal_workflow_ss.getapprovalblockid(
5371: lr_hr_api_transaction_rec.item_type,
5372: lr_hr_api_transaction_rec.item_key,
5373: ln_activity_id);
5374: else
5375: -- generic approval process initial block id attribute

Line 5372: lr_hr_api_transaction_rec.item_key,

5368:
5369: -- set the blockid value
5370: hr_appraisal_workflow_ss.getapprovalblockid(
5371: lr_hr_api_transaction_rec.item_type,
5372: lr_hr_api_transaction_rec.item_key,
5373: ln_activity_id);
5374: else
5375: -- generic approval process initial block id attribute
5376: --HR_APPROVAL_BLOCK_ID_ATTR

Line 5377: ln_activity_id:=wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,

5373: ln_activity_id);
5374: else
5375: -- generic approval process initial block id attribute
5376: --HR_APPROVAL_BLOCK_ID_ATTR
5377: ln_activity_id:=wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
5378: lr_hr_api_transaction_rec.item_key,
5379: 'HR_APPROVAL_BLOCK_ID_ATTR',true);
5380: end if;
5381: end if;

Line 5378: lr_hr_api_transaction_rec.item_key,

5374: else
5375: -- generic approval process initial block id attribute
5376: --HR_APPROVAL_BLOCK_ID_ATTR
5377: ln_activity_id:=wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
5378: lr_hr_api_transaction_rec.item_key,
5379: 'HR_APPROVAL_BLOCK_ID_ATTR',true);
5380: end if;
5381: end if;
5382: return ln_activity_id;

Line 5389: lr_hr_api_transaction_rec hr_api_transactions%rowtype;

5385:
5386: function getApproverNtfId(p_transaction_id in number) return number
5387: is
5388: c_proc constant varchar2(30) := 'getApproverNtfId';
5389: lr_hr_api_transaction_rec hr_api_transactions%rowtype;
5390: ln_notification_id wf_notifications.notification_id%type;
5391: begin
5392: if(p_transaction_id is not null) then
5393: select * into lr_hr_api_transaction_rec

Line 5393: select * into lr_hr_api_transaction_rec

5389: lr_hr_api_transaction_rec hr_api_transactions%rowtype;
5390: ln_notification_id wf_notifications.notification_id%type;
5391: begin
5392: if(p_transaction_id is not null) then
5393: select * into lr_hr_api_transaction_rec
5394: from hr_api_transactions
5395: where transaction_id=p_transaction_id;
5396:
5397: select notification_id

Line 5394: from hr_api_transactions

5390: ln_notification_id wf_notifications.notification_id%type;
5391: begin
5392: if(p_transaction_id is not null) then
5393: select * into lr_hr_api_transaction_rec
5394: from hr_api_transactions
5395: where transaction_id=p_transaction_id;
5396:
5397: select notification_id
5398: into ln_notification_id

Line 5400: WHERE ias.item_type = lr_hr_api_transaction_rec.item_type

5396:
5397: select notification_id
5398: into ln_notification_id
5399: FROM WF_ITEM_ACTIVITY_STATUSES IAS
5400: WHERE ias.item_type = lr_hr_api_transaction_rec.item_type
5401: and ias.item_key = lr_hr_api_transaction_rec.item_key
5402: and ias.activity_status = 'NOTIFIED'
5403: and ias.notification_id is not null
5404: and rownum<=1;

Line 5401: and ias.item_key = lr_hr_api_transaction_rec.item_key

5397: select notification_id
5398: into ln_notification_id
5399: FROM WF_ITEM_ACTIVITY_STATUSES IAS
5400: WHERE ias.item_type = lr_hr_api_transaction_rec.item_type
5401: and ias.item_key = lr_hr_api_transaction_rec.item_key
5402: and ias.activity_status = 'NOTIFIED'
5403: and ias.notification_id is not null
5404: and rownum<=1;
5405: end if;

Line 5420: lr_hr_api_transaction_rec hr_api_transactions%rowtype;

5416: p_approval_comments in varchar2)
5417: is
5418: -- local variables
5419: c_proc constant varchar2(30) := 'processPageNavWFSubmit';
5420: lr_hr_api_transaction_rec hr_api_transactions%rowtype;
5421: ln_activity_id wf_item_activity_statuses.process_activity%type;
5422: begin
5423: if g_debug then
5424: hr_utility.set_location('Entering:'|| g_package||'.'||c_proc, 1);

Line 5429: select * into lr_hr_api_transaction_rec

5425: end if;
5426:
5427: if(p_transaction_id is not null) then
5428:
5429: select * into lr_hr_api_transaction_rec
5430: from hr_api_transactions
5431: where transaction_id=p_transaction_id;
5432:
5433: hr_transaction_api.update_transaction(

Line 5430: from hr_api_transactions

5426:
5427: if(p_transaction_id is not null) then
5428:
5429: select * into lr_hr_api_transaction_rec
5430: from hr_api_transactions
5431: where transaction_id=p_transaction_id;
5432:
5433: hr_transaction_api.update_transaction(
5434: p_transaction_id => p_transaction_id,

Line 5441: ,p_item_type=>lr_hr_api_transaction_rec.item_type

5437:
5438: -- re-intialize the performer roles
5439: hr_approval_ss.reinitperformerroles(p_notification_id=>null
5440: ,p_transaction_id=>null
5441: ,p_item_type=>lr_hr_api_transaction_rec.item_type
5442: ,p_item_key=>lr_hr_api_transaction_rec.item_key);
5443:
5444:
5445: -- default logic

Line 5442: ,p_item_key=>lr_hr_api_transaction_rec.item_key);

5438: -- re-intialize the performer roles
5439: hr_approval_ss.reinitperformerroles(p_notification_id=>null
5440: ,p_transaction_id=>null
5441: ,p_item_type=>lr_hr_api_transaction_rec.item_type
5442: ,p_item_key=>lr_hr_api_transaction_rec.item_key);
5443:
5444:
5445: -- default logic
5446: -- get the blockid value corresponding to the UI page

Line 5448: getOAFPageActId(lr_hr_api_transaction_rec.item_type,lr_hr_api_transaction_rec.item_key);

5444:
5445: -- default logic
5446: -- get the blockid value corresponding to the UI page
5447: ln_activity_id:=
5448: getOAFPageActId(lr_hr_api_transaction_rec.item_type,lr_hr_api_transaction_rec.item_key);
5449: -- check if the ln_activity_id is null
5450: if(ln_activity_id is null) then
5451: null; -- raise error
5452: end if;

Line 5454: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type

5450: if(ln_activity_id is null) then
5451: null; -- raise error
5452: end if;
5453: -- set the workflow status TRAN_SUBMIT to Y
5454: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type
5455: ,lr_hr_api_transaction_rec.item_key
5456: ,'TRAN_SUBMIT'
5457: ,'Y');
5458:

Line 5455: ,lr_hr_api_transaction_rec.item_key

5451: null; -- raise error
5452: end if;
5453: -- set the workflow status TRAN_SUBMIT to Y
5454: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type
5455: ,lr_hr_api_transaction_rec.item_key
5456: ,'TRAN_SUBMIT'
5457: ,'Y');
5458:
5459:

Line 5464: if(lr_hr_api_transaction_rec.status in('YS','RI','RIS','RO','RIS')) then

5460: --
5461:
5462:
5463: -- now transition the workflow to process approval notifications
5464: if(lr_hr_api_transaction_rec.status in('YS','RI','RIS','RO','RIS')) then
5465: -- complete the flow in resubmit mode
5466: wf_engine.CompleteActivity(
5467: lr_hr_api_transaction_rec.item_type
5468: , lr_hr_api_transaction_rec.item_key

Line 5467: lr_hr_api_transaction_rec.item_type

5463: -- now transition the workflow to process approval notifications
5464: if(lr_hr_api_transaction_rec.status in('YS','RI','RIS','RO','RIS')) then
5465: -- complete the flow in resubmit mode
5466: wf_engine.CompleteActivity(
5467: lr_hr_api_transaction_rec.item_type
5468: , lr_hr_api_transaction_rec.item_key
5469: , wf_engine.getactivitylabel(ln_activity_id)
5470: , 'RESUBMIT') ;
5471:

Line 5468: , lr_hr_api_transaction_rec.item_key

5464: if(lr_hr_api_transaction_rec.status in('YS','RI','RIS','RO','RIS')) then
5465: -- complete the flow in resubmit mode
5466: wf_engine.CompleteActivity(
5467: lr_hr_api_transaction_rec.item_type
5468: , lr_hr_api_transaction_rec.item_key
5469: , wf_engine.getactivitylabel(ln_activity_id)
5470: , 'RESUBMIT') ;
5471:
5472:

Line 5476: lr_hr_api_transaction_rec.item_type

5472:
5473: else
5474: -- else intial submit
5475: wf_engine.CompleteActivity(
5476: lr_hr_api_transaction_rec.item_type
5477: , lr_hr_api_transaction_rec.item_key
5478: , wf_engine.getactivitylabel(ln_activity_id)
5479: , wf_engine.eng_trans_default) ;
5480: end if;

Line 5477: , lr_hr_api_transaction_rec.item_key

5473: else
5474: -- else intial submit
5475: wf_engine.CompleteActivity(
5476: lr_hr_api_transaction_rec.item_type
5477: , lr_hr_api_transaction_rec.item_key
5478: , wf_engine.getactivitylabel(ln_activity_id)
5479: , wf_engine.eng_trans_default) ;
5480: end if;
5481: end if;

Line 5532: lr_hr_api_transaction_rec hr_api_transactions%rowtype;

5528: p_approval_comments in varchar2)
5529: is
5530: -- local variables
5531: c_proc constant varchar2(30) := 'processNonPageNavWFSubmit';
5532: lr_hr_api_transaction_rec hr_api_transactions%rowtype;
5533: ln_activity_id wf_item_activity_statuses.process_activity%type;
5534: ln_notification_id wf_notifications.notification_id%type;
5535: lv_loginPersonDispName per_all_people_f.full_name%type;
5536: lv_loginPersonUserName fnd_user.user_name%type;

Line 5546: select * into lr_hr_api_transaction_rec

5542: end if;
5543:
5544: if(p_transaction_id is not null) then
5545:
5546: select * into lr_hr_api_transaction_rec
5547: from hr_api_transactions
5548: where transaction_id=p_transaction_id;
5549:
5550: hr_transaction_api.update_transaction(

Line 5547: from hr_api_transactions

5543:
5544: if(p_transaction_id is not null) then
5545:
5546: select * into lr_hr_api_transaction_rec
5547: from hr_api_transactions
5548: where transaction_id=p_transaction_id;
5549:
5550: hr_transaction_api.update_transaction(
5551: p_transaction_id => p_transaction_id,

Line 5559: ,p_item_type=>lr_hr_api_transaction_rec.item_type

5555:
5556: -- re-intialize the performer roles
5557: hr_approval_ss.reinitperformerroles(p_notification_id=>null
5558: ,p_transaction_id=>null
5559: ,p_item_type=>lr_hr_api_transaction_rec.item_type
5560: ,p_item_key=>lr_hr_api_transaction_rec.item_key);
5561:
5562:
5563: -- get the current transaction status

Line 5560: ,p_item_key=>lr_hr_api_transaction_rec.item_key);

5556: -- re-intialize the performer roles
5557: hr_approval_ss.reinitperformerroles(p_notification_id=>null
5558: ,p_transaction_id=>null
5559: ,p_item_type=>lr_hr_api_transaction_rec.item_type
5560: ,p_item_key=>lr_hr_api_transaction_rec.item_key);
5561:
5562:
5563: -- get the current transaction status
5564: -- If approver is editing and submitting the possible

Line 5570: if(lr_hr_api_transaction_rec.status in ('Y','YS','RI','RIS','RO','RIS')) then

5566: -- else it should be the initial creator submit
5567:
5568: begin
5569: -- get the current transaction status
5570: if(lr_hr_api_transaction_rec.status in ('Y','YS','RI','RIS','RO','RIS')) then
5571: -- approver edit and submit case
5572: ln_notification_id:= getApproverNtfId(p_transaction_id);
5573:
5574: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type,lr_hr_api_transaction_rec.item_key,

Line 5574: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type,lr_hr_api_transaction_rec.item_key,

5570: if(lr_hr_api_transaction_rec.status in ('Y','YS','RI','RIS','RO','RIS')) then
5571: -- approver edit and submit case
5572: ln_notification_id:= getApproverNtfId(p_transaction_id);
5573:
5574: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type,lr_hr_api_transaction_rec.item_key,
5575: 'APPROVAL_COMMENT_COPY',p_approval_comments);
5576:
5577: -- check if not null value
5578: if(ln_notification_id is not null) then

Line 5592: update_comments(ln_notification_id,lr_hr_api_transaction_rec.status,p_approval_comments);

5588: ,'RESULT'
5589: ,'RESUBMIT');
5590:
5591: -- Fix for bug 4998216 starts
5592: update_comments(ln_notification_id,lr_hr_api_transaction_rec.status,p_approval_comments);
5593: -- Fix for bug 4998216 ends
5594:
5595: wf_notification.respond(
5596: ln_notification_id

Line 5601: if(lr_hr_api_transaction_rec.status in ('RI','RIS','RO','RIS')) then

5597: ,p_approval_comments
5598: ,fnd_global.user_name
5599: ,null);
5600: -- Fix for 5070814
5601: if(lr_hr_api_transaction_rec.status in ('RI','RIS','RO','RIS')) then
5602: -- propagate during RFC only
5603: wf_notification.propagatehistory(
5604: lr_hr_api_transaction_rec.item_type
5605: ,lr_hr_api_transaction_rec.item_key

Line 5604: lr_hr_api_transaction_rec.item_type

5600: -- Fix for 5070814
5601: if(lr_hr_api_transaction_rec.status in ('RI','RIS','RO','RIS')) then
5602: -- propagate during RFC only
5603: wf_notification.propagatehistory(
5604: lr_hr_api_transaction_rec.item_type
5605: ,lr_hr_api_transaction_rec.item_key
5606: ,'APPROVAL_NOTIFICATION'
5607: ,fnd_global.user_name
5608: ,'WF_SYSTEM'

Line 5605: ,lr_hr_api_transaction_rec.item_key

5601: if(lr_hr_api_transaction_rec.status in ('RI','RIS','RO','RIS')) then
5602: -- propagate during RFC only
5603: wf_notification.propagatehistory(
5604: lr_hr_api_transaction_rec.item_type
5605: ,lr_hr_api_transaction_rec.item_key
5606: ,'APPROVAL_NOTIFICATION'
5607: ,fnd_global.user_name
5608: ,'WF_SYSTEM'
5609: --,hr_workflow_ss.getNextApproverForHist(itemtype, itemkey)

Line 5634: hr_approval_ss.create_item_attrib_if_notexist(itemtype => lr_hr_api_transaction_rec.item_type

5630:
5631:
5632: -- set the initial submit comments
5633: -- APPROVAL_COMMENT_COPY
5634: hr_approval_ss.create_item_attrib_if_notexist(itemtype => lr_hr_api_transaction_rec.item_type
5635: ,itemkey => lr_hr_api_transaction_rec.item_key
5636: ,aname => 'APPROVAL_COMMENT_COPY'
5637: ,text_value=>p_approval_comments
5638: ,number_value=>null,

Line 5635: ,itemkey => lr_hr_api_transaction_rec.item_key

5631:
5632: -- set the initial submit comments
5633: -- APPROVAL_COMMENT_COPY
5634: hr_approval_ss.create_item_attrib_if_notexist(itemtype => lr_hr_api_transaction_rec.item_type
5635: ,itemkey => lr_hr_api_transaction_rec.item_key
5636: ,aname => 'APPROVAL_COMMENT_COPY'
5637: ,text_value=>p_approval_comments
5638: ,number_value=>null,
5639: date_value=>null

Line 5642: WF_ENGINE.SetItemAttrText(lr_hr_api_transaction_rec.item_type,lr_hr_api_transaction_rec.item_key,

5638: ,number_value=>null,
5639: date_value=>null
5640: );
5641:
5642: WF_ENGINE.SetItemAttrText(lr_hr_api_transaction_rec.item_type,lr_hr_api_transaction_rec.item_key,
5643: 'WF_NOTE',p_approval_comments);
5644:
5645: -- else intial submit
5646: wf_engine.CompleteActivity(

Line 5647: lr_hr_api_transaction_rec.item_type

5643: 'WF_NOTE',p_approval_comments);
5644:
5645: -- else intial submit
5646: wf_engine.CompleteActivity(
5647: lr_hr_api_transaction_rec.item_type
5648: , lr_hr_api_transaction_rec.item_key
5649: , wf_engine.getactivitylabel(ln_activity_id)
5650: , wf_engine.eng_trans_default) ;
5651:

Line 5648: , lr_hr_api_transaction_rec.item_key

5644:
5645: -- else intial submit
5646: wf_engine.CompleteActivity(
5647: lr_hr_api_transaction_rec.item_type
5648: , lr_hr_api_transaction_rec.item_key
5649: , wf_engine.getactivitylabel(ln_activity_id)
5650: , wf_engine.eng_trans_default) ;
5651:
5652: end if;

Line 5672: lr_hr_api_transaction_rec hr_api_transactions%rowtype;

5668: p_approval_comments in varchar2)
5669: is
5670: -- local variables
5671: c_proc constant varchar2(30) := 'processApprovalSubmit';
5672: lr_hr_api_transaction_rec hr_api_transactions%rowtype;
5673: ln_activity_id wf_item_activity_statuses.process_activity%type;
5674: lv_loginPersonDispName per_all_people_f.full_name%type;
5675: lv_loginPersonUserName fnd_user.user_name%type;
5676: ln_loginPersonId fnd_user.employee_id%type;

Line 5692: from hr_api_transactions

5688:
5689: begin
5690: select item_type,item_key
5691: into lv_item_type,lv_item_key
5692: from hr_api_transactions
5693: where transaction_id=p_transaction_id;
5694: exception
5695: when no_data_found then
5696: -- get the fnd message and populate to the fnd message pub

Line 5763: lr_hr_api_transaction_rec hr_api_transactions%rowtype;

5759: end processApprovalSubmit;
5760:
5761: procedure resetWfPageFlowState(p_transaction_id in number)
5762: is
5763: lr_hr_api_transaction_rec hr_api_transactions%rowtype;
5764: ln_activity_id wf_item_attribute_values.number_value%type;
5765: ln_oaf_page_act_id WF_ITEM_ACTIVITY_STATUSES.process_activity%type;
5766: lv_oaf_nav_attr wf_item_attribute_values.text_value%type;
5767: begin

Line 5771: select * into lr_hr_api_transaction_rec

5767: begin
5768:
5769: if(p_transaction_id is not null) then
5770: begin
5771: select * into lr_hr_api_transaction_rec
5772: from hr_api_transactions
5773: where transaction_id=p_transaction_id;
5774: exception
5775: when others then

Line 5772: from hr_api_transactions

5768:
5769: if(p_transaction_id is not null) then
5770: begin
5771: select * into lr_hr_api_transaction_rec
5772: from hr_api_transactions
5773: where transaction_id=p_transaction_id;
5774: exception
5775: when others then
5776: null;

Line 5780: if(lr_hr_api_transaction_rec.status<>'W') then

5776: null;
5777: end;
5778:
5779: -- check the status
5780: if(lr_hr_api_transaction_rec.status<>'W') then
5781: if(lr_hr_api_transaction_rec.item_key is not null) then
5782: -- check if the flow uses wf for page navigation
5783: -- HR_OAF_NAVIGATION_ATTR
5784: lv_oaf_nav_attr := wf_engine.getitemattrtext(lr_hr_api_transaction_rec.item_type,

Line 5781: if(lr_hr_api_transaction_rec.item_key is not null) then

5777: end;
5778:
5779: -- check the status
5780: if(lr_hr_api_transaction_rec.status<>'W') then
5781: if(lr_hr_api_transaction_rec.item_key is not null) then
5782: -- check if the flow uses wf for page navigation
5783: -- HR_OAF_NAVIGATION_ATTR
5784: lv_oaf_nav_attr := wf_engine.getitemattrtext(lr_hr_api_transaction_rec.item_type,
5785: lr_hr_api_transaction_rec.item_key,

Line 5784: lv_oaf_nav_attr := wf_engine.getitemattrtext(lr_hr_api_transaction_rec.item_type,

5780: if(lr_hr_api_transaction_rec.status<>'W') then
5781: if(lr_hr_api_transaction_rec.item_key is not null) then
5782: -- check if the flow uses wf for page navigation
5783: -- HR_OAF_NAVIGATION_ATTR
5784: lv_oaf_nav_attr := wf_engine.getitemattrtext(lr_hr_api_transaction_rec.item_type,
5785: lr_hr_api_transaction_rec.item_key,
5786: 'HR_OAF_NAVIGATION_ATTR',
5787: true);
5788: if(lv_oaf_nav_attr='Y') then

Line 5785: lr_hr_api_transaction_rec.item_key,

5781: if(lr_hr_api_transaction_rec.item_key is not null) then
5782: -- check if the flow uses wf for page navigation
5783: -- HR_OAF_NAVIGATION_ATTR
5784: lv_oaf_nav_attr := wf_engine.getitemattrtext(lr_hr_api_transaction_rec.item_type,
5785: lr_hr_api_transaction_rec.item_key,
5786: 'HR_OAF_NAVIGATION_ATTR',
5787: true);
5788: if(lv_oaf_nav_attr='Y') then
5789: -- for wf page navigation need to reset the wf state

Line 5792: if(lr_hr_api_transaction_rec.status in ('S','RIS','ROS','YS')) then

5788: if(lv_oaf_nav_attr='Y') then
5789: -- for wf page navigation need to reset the wf state
5790: -- S, RIS,ROS,YS reset the state to saved page actid
5791: -- Y,RO,RI reset to first page activity id
5792: if(lr_hr_api_transaction_rec.status in ('S','RIS','ROS','YS')) then
5793: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
5794: lr_hr_api_transaction_rec.item_key,
5795: 'SAVED_ACTIVITY_ID',
5796: true);

Line 5793: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,

5789: -- for wf page navigation need to reset the wf state
5790: -- S, RIS,ROS,YS reset the state to saved page actid
5791: -- Y,RO,RI reset to first page activity id
5792: if(lr_hr_api_transaction_rec.status in ('S','RIS','ROS','YS')) then
5793: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
5794: lr_hr_api_transaction_rec.item_key,
5795: 'SAVED_ACTIVITY_ID',
5796: true);
5797: elsif(lr_hr_api_transaction_rec.status in ('RI','RO','Y')) then

Line 5794: lr_hr_api_transaction_rec.item_key,

5790: -- S, RIS,ROS,YS reset the state to saved page actid
5791: -- Y,RO,RI reset to first page activity id
5792: if(lr_hr_api_transaction_rec.status in ('S','RIS','ROS','YS')) then
5793: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
5794: lr_hr_api_transaction_rec.item_key,
5795: 'SAVED_ACTIVITY_ID',
5796: true);
5797: elsif(lr_hr_api_transaction_rec.status in ('RI','RO','Y')) then
5798: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,

Line 5797: elsif(lr_hr_api_transaction_rec.status in ('RI','RO','Y')) then

5793: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
5794: lr_hr_api_transaction_rec.item_key,
5795: 'SAVED_ACTIVITY_ID',
5796: true);
5797: elsif(lr_hr_api_transaction_rec.status in ('RI','RO','Y')) then
5798: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
5799: lr_hr_api_transaction_rec.item_key,
5800: 'HR_FIRST_ACTIVITY_ID',
5801: true);

Line 5798: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,

5794: lr_hr_api_transaction_rec.item_key,
5795: 'SAVED_ACTIVITY_ID',
5796: true);
5797: elsif(lr_hr_api_transaction_rec.status in ('RI','RO','Y')) then
5798: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
5799: lr_hr_api_transaction_rec.item_key,
5800: 'HR_FIRST_ACTIVITY_ID',
5801: true);
5802:

Line 5799: lr_hr_api_transaction_rec.item_key,

5795: 'SAVED_ACTIVITY_ID',
5796: true);
5797: elsif(lr_hr_api_transaction_rec.status in ('RI','RO','Y')) then
5798: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
5799: lr_hr_api_transaction_rec.item_key,
5800: 'HR_FIRST_ACTIVITY_ID',
5801: true);
5802:
5803: end if;

Line 5809: lr_hr_api_transaction_rec.item_type,

5805: -- finally call wf engine handle to reset the state
5806: -- need to do only if the current activity id is not
5807: -- same as the ln_activity_id
5808: ln_oaf_page_act_id := hr_approval_ss.getoafpageactid(
5809: lr_hr_api_transaction_rec.item_type,
5810: lr_hr_api_transaction_rec.item_key);
5811: if(ln_activity_id is not null and ln_activity_id<>ln_oaf_page_act_id ) then
5812: WF_ENGINE.handleError(
5813: itemType => lr_hr_api_transaction_rec.item_type

Line 5810: lr_hr_api_transaction_rec.item_key);

5806: -- need to do only if the current activity id is not
5807: -- same as the ln_activity_id
5808: ln_oaf_page_act_id := hr_approval_ss.getoafpageactid(
5809: lr_hr_api_transaction_rec.item_type,
5810: lr_hr_api_transaction_rec.item_key);
5811: if(ln_activity_id is not null and ln_activity_id<>ln_oaf_page_act_id ) then
5812: WF_ENGINE.handleError(
5813: itemType => lr_hr_api_transaction_rec.item_type
5814: ,itemKey => lr_hr_api_transaction_rec.item_type

Line 5813: itemType => lr_hr_api_transaction_rec.item_type

5809: lr_hr_api_transaction_rec.item_type,
5810: lr_hr_api_transaction_rec.item_key);
5811: if(ln_activity_id is not null and ln_activity_id<>ln_oaf_page_act_id ) then
5812: WF_ENGINE.handleError(
5813: itemType => lr_hr_api_transaction_rec.item_type
5814: ,itemKey => lr_hr_api_transaction_rec.item_type
5815: ,activity => WF_ENGINE.GetActivityLabel(ln_activity_id)
5816: ,command => 'RETRY' ) ;
5817: end if;

Line 5814: ,itemKey => lr_hr_api_transaction_rec.item_type

5810: lr_hr_api_transaction_rec.item_key);
5811: if(ln_activity_id is not null and ln_activity_id<>ln_oaf_page_act_id ) then
5812: WF_ENGINE.handleError(
5813: itemType => lr_hr_api_transaction_rec.item_type
5814: ,itemKey => lr_hr_api_transaction_rec.item_type
5815: ,activity => WF_ENGINE.GetActivityLabel(ln_activity_id)
5816: ,command => 'RETRY' ) ;
5817: end if;
5818: end if;

Line 5835: lv_status hr_api_transactions.status%type;

5831:
5832: is
5833: -- local variables
5834: c_proc constant varchar2(40) := 'checktransactionState';
5835: lv_status hr_api_transactions.status%type;
5836: lv_state hr_api_transactions.transaction_state%type;
5837: begin
5838: if g_debug then
5839: hr_utility.set_location('Entering:'|| g_package||'.'||c_proc, 1);

Line 5836: lv_state hr_api_transactions.transaction_state%type;

5832: is
5833: -- local variables
5834: c_proc constant varchar2(40) := 'checktransactionState';
5835: lv_status hr_api_transactions.status%type;
5836: lv_state hr_api_transactions.transaction_state%type;
5837: begin
5838: if g_debug then
5839: hr_utility.set_location('Entering:'|| g_package||'.'||c_proc, 1);
5840: end if;

Line 5846: from hr_api_transactions

5842:
5843: begin
5844: select status,transaction_state
5845: into lv_status,lv_state
5846: from hr_api_transactions
5847: where transaction_id=p_transaction_id;
5848:
5849: -- check the transaction status
5850: if(lv_status in ('YS','RIS','ROS')) then

Line 5993: l_trans_ref_table hr_api_transactions.transaction_ref_Table%type;

5989: actionTypeId number;
5990: groupOrChainId number;
5991: occurrence number;
5992: notification_rec ame_util2.notificationRecord;
5993: l_trans_ref_table hr_api_transactions.transaction_ref_Table%type;
5994: l_current_forward_to_username1 wf_users.name%type;
5995:
5996: l_is_parallel varchar2(10) := null;
5997: original_forward_to_user wf_users.name%type;

Line 6022: from hr_api_transactions

6018:
6019: begin
6020:
6021: select transaction_ref_table into l_trans_ref_table
6022: from hr_api_transactions
6023: where item_type = p_item_type and item_key = p_item_key;
6024:
6025: exception
6026: when no_data_found then