DBA Data[Home] [Help]

APPS.HR_APPROVAL_SS dependencies on HR_API

Line 3035: lv_creator_person_id hr_api_transactions.creator_person_id%type;

3031: lv_roleName wf_users.name%type;
3032: lv_businessGroupId per_all_people_f.business_group_id%type;
3033: lv_orig_systemId wf_roles.orig_system_id%type;
3034: lv_orig_system wf_roles.orig_system%type;
3035: lv_creator_person_id hr_api_transactions.creator_person_id%type;
3036: begin
3037: g_debug := hr_utility.debug_enabled;
3038: if g_debug then
3039: hr_utility.set_location('Entering:'|| g_package||'.'||c_proc, 1);

Line 3058: from hr_api_transactions

3054: -- check the case for creator person id
3055: begin
3056: select creator_person_id
3057: into lv_creator_person_id
3058: from hr_api_transactions
3059: where transaction_id=p_transaction_id;
3060:
3061: if(lv_creator_person_id=lv_orig_systemId) then
3062: return 'Y';

Line 3162: p_transaction_id in hr_api_transactions.transaction_id%type,

3158: end getUserOrigSystemId;
3159:
3160:
3161: procedure handleRFCAction(p_approval_notification_id in wf_notifications.notification_id%type,
3162: p_transaction_id in hr_api_transactions.transaction_id%type,
3163: p_item_type in wf_items.item_type%type,
3164: p_item_key in wf_items.item_key%type,
3165: p_rfcRoleName in wf_roles.name%type,
3166: p_rfcUserOrigSystem in wf_roles.orig_system%type,

Line 3733: p_transaction_id in hr_api_transactions.transaction_id%type,

3729: end appraisalRolesReInit;
3730:
3731:
3732: procedure reInitPerformerRoles(p_notification_id in wf_notifications.notification_id%type,
3733: p_transaction_id in hr_api_transactions.transaction_id%type,
3734: p_item_type in wf_items.item_type%type,
3735: p_item_key in wf_items.item_key%type) is
3736: c_proc constant varchar2(30) := 'reInitPerformerRoles';
3737: lv_item_type wf_items.item_type%type;

Line 3763: from hr_api_transactions

3759: elsif(p_transaction_id is not null) then
3760: begin
3761: select item_type,item_key
3762: into lv_item_type,lv_item_key
3763: from hr_api_transactions
3764: where transaction_id=p_transaction_id;
3765: exception
3766: when others then
3767: null;

Line 4006: ,p_relaunch_function hr_api_transactions.relaunch_function%type

4002:
4003: procedure startGenericApprovalProcess(p_transaction_id in number
4004: ,p_item_key in out nocopy wf_items.item_key%type
4005: ,p_wf_ntf_sub_fnd_msg in fnd_new_messages.message_name%type
4006: ,p_relaunch_function hr_api_transactions.relaunch_function%type
4007: ,p_additional_wf_attributes in HR_WF_ATTR_TABLE
4008: ,p_status out nocopy varchar2
4009: ,p_error_message out nocopy varchar2
4010: ,p_errstack out nocopy varchar2

Line 4016: lr_transaction_rec hr_api_transactions%rowtype;

4012: is
4013: c_proc constant varchar2(30) := 'reInitPerformerRoles';
4014: lv_item_type wf_items.item_type%type;
4015: lv_item_key wf_items.item_key%type;
4016: lr_transaction_rec hr_api_transactions%rowtype;
4017: lv_status varchar2(8);
4018: lv_result varchar2(30);
4019: lv_errorActid wf_item_activity_statuses.process_activity%type;
4020: lv_errname VARCHAR2(4000);

Line 4039: from hr_api_transactions

4035: -- block to get the transaction record details
4036: begin
4037: select *
4038: into lr_transaction_rec
4039: from hr_api_transactions
4040: where transaction_id=p_transaction_id;
4041: exception
4042: when no_data_found then
4043: raise;

Line 4294: lr_hr_api_transaction_rec hr_api_transactions%rowtype;

4290: function getinitApprovalBlockId(p_transaction_id in number) return number
4291: is
4292:
4293: c_proc constant varchar2(30) := 'getinitApprovalBlockId';
4294: lr_hr_api_transaction_rec hr_api_transactions%rowtype;
4295: ln_activity_id number;
4296: lv_loginPersonDispName per_all_people_f.full_name%type;
4297: lv_loginPersonUserName fnd_user.user_name%type;
4298: ln_loginPersonId fnd_user.employee_id%type;

Line 4301: select * into lr_hr_api_transaction_rec

4297: lv_loginPersonUserName fnd_user.user_name%type;
4298: ln_loginPersonId fnd_user.employee_id%type;
4299: begin
4300: if(p_transaction_id is not null) then
4301: select * into lr_hr_api_transaction_rec
4302: from hr_api_transactions
4303: where transaction_id=p_transaction_id;
4304: if(lr_hr_api_transaction_rec.transaction_ref_table='PER_APPRAISALS') then
4305: -- appraisal specfic

Line 4302: from hr_api_transactions

4298: ln_loginPersonId fnd_user.employee_id%type;
4299: begin
4300: if(p_transaction_id is not null) then
4301: select * into lr_hr_api_transaction_rec
4302: from hr_api_transactions
4303: where transaction_id=p_transaction_id;
4304: if(lr_hr_api_transaction_rec.transaction_ref_table='PER_APPRAISALS') then
4305: -- appraisal specfic
4306:

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

4300: if(p_transaction_id is not null) then
4301: select * into lr_hr_api_transaction_rec
4302: from hr_api_transactions
4303: where transaction_id=p_transaction_id;
4304: if(lr_hr_api_transaction_rec.transaction_ref_table='PER_APPRAISALS') then
4305: -- appraisal specfic
4306:
4307: -- set the item attributes specific to appraisals
4308: -- get the wf role info for the login user

Line 4315: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type

4311: ,p_orig_system_id => fnd_global.employee_id
4312: ,p_name => lv_loginPersonUserName
4313: ,p_display_name => lv_loginPersonDispName);
4314: --HR_APPRAISAL_FROM_USER_ATTR
4315: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type
4316: ,lr_hr_api_transaction_rec.item_key
4317: ,'HR_APPRAISAL_FROM_USER_ATTR',
4318: fnd_global.user_name);
4319: -- HR_APPRAISAL_FROM_NAME_ATTR

Line 4316: ,lr_hr_api_transaction_rec.item_key

4312: ,p_name => lv_loginPersonUserName
4313: ,p_display_name => lv_loginPersonDispName);
4314: --HR_APPRAISAL_FROM_USER_ATTR
4315: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type
4316: ,lr_hr_api_transaction_rec.item_key
4317: ,'HR_APPRAISAL_FROM_USER_ATTR',
4318: fnd_global.user_name);
4319: -- HR_APPRAISAL_FROM_NAME_ATTR
4320: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type

Line 4320: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type

4316: ,lr_hr_api_transaction_rec.item_key
4317: ,'HR_APPRAISAL_FROM_USER_ATTR',
4318: fnd_global.user_name);
4319: -- HR_APPRAISAL_FROM_NAME_ATTR
4320: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type
4321: ,lr_hr_api_transaction_rec.item_key
4322: ,'HR_APPRAISAL_FROM_NAME_ATTR'
4323: ,lv_loginPersonDispName);
4324:

Line 4321: ,lr_hr_api_transaction_rec.item_key

4317: ,'HR_APPRAISAL_FROM_USER_ATTR',
4318: fnd_global.user_name);
4319: -- HR_APPRAISAL_FROM_NAME_ATTR
4320: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type
4321: ,lr_hr_api_transaction_rec.item_key
4322: ,'HR_APPRAISAL_FROM_NAME_ATTR'
4323: ,lv_loginPersonDispName);
4324:
4325: -- APPROVAL_COMMENT_COPY

Line 4330: lr_hr_api_transaction_rec.item_type,

4326: -- ??? module need to handle in the UI layer.
4327:
4328: -- set the blockid value
4329: hr_appraisal_workflow_ss.getapprovalblockid(
4330: lr_hr_api_transaction_rec.item_type,
4331: lr_hr_api_transaction_rec.item_key,
4332: ln_activity_id);
4333: else
4334: -- generic approval process initial block id attribute

Line 4331: lr_hr_api_transaction_rec.item_key,

4327:
4328: -- set the blockid value
4329: hr_appraisal_workflow_ss.getapprovalblockid(
4330: lr_hr_api_transaction_rec.item_type,
4331: lr_hr_api_transaction_rec.item_key,
4332: ln_activity_id);
4333: else
4334: -- generic approval process initial block id attribute
4335: --HR_APPROVAL_BLOCK_ID_ATTR

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

4332: ln_activity_id);
4333: else
4334: -- generic approval process initial block id attribute
4335: --HR_APPROVAL_BLOCK_ID_ATTR
4336: ln_activity_id:=wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
4337: lr_hr_api_transaction_rec.item_key,
4338: 'HR_APPROVAL_BLOCK_ID_ATTR',true);
4339: end if;
4340: end if;

Line 4337: lr_hr_api_transaction_rec.item_key,

4333: else
4334: -- generic approval process initial block id attribute
4335: --HR_APPROVAL_BLOCK_ID_ATTR
4336: ln_activity_id:=wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
4337: lr_hr_api_transaction_rec.item_key,
4338: 'HR_APPROVAL_BLOCK_ID_ATTR',true);
4339: end if;
4340: end if;
4341: return ln_activity_id;

Line 4348: lr_hr_api_transaction_rec hr_api_transactions%rowtype;

4344:
4345: function getApproverNtfId(p_transaction_id in number) return number
4346: is
4347: c_proc constant varchar2(30) := 'getApproverNtfId';
4348: lr_hr_api_transaction_rec hr_api_transactions%rowtype;
4349: ln_notification_id wf_notifications.notification_id%type;
4350: begin
4351: if(p_transaction_id is not null) then
4352: select * into lr_hr_api_transaction_rec

Line 4352: select * into lr_hr_api_transaction_rec

4348: lr_hr_api_transaction_rec hr_api_transactions%rowtype;
4349: ln_notification_id wf_notifications.notification_id%type;
4350: begin
4351: if(p_transaction_id is not null) then
4352: select * into lr_hr_api_transaction_rec
4353: from hr_api_transactions
4354: where transaction_id=p_transaction_id;
4355:
4356: select notification_id

Line 4353: from hr_api_transactions

4349: ln_notification_id wf_notifications.notification_id%type;
4350: begin
4351: if(p_transaction_id is not null) then
4352: select * into lr_hr_api_transaction_rec
4353: from hr_api_transactions
4354: where transaction_id=p_transaction_id;
4355:
4356: select notification_id
4357: into ln_notification_id

Line 4359: WHERE ias.item_type = lr_hr_api_transaction_rec.item_type

4355:
4356: select notification_id
4357: into ln_notification_id
4358: FROM WF_ITEM_ACTIVITY_STATUSES IAS
4359: WHERE ias.item_type = lr_hr_api_transaction_rec.item_type
4360: and ias.item_key = lr_hr_api_transaction_rec.item_key
4361: and ias.activity_status = 'NOTIFIED'
4362: and ias.notification_id is not null
4363: and rownum<=1;

Line 4360: and ias.item_key = lr_hr_api_transaction_rec.item_key

4356: select notification_id
4357: into ln_notification_id
4358: FROM WF_ITEM_ACTIVITY_STATUSES IAS
4359: WHERE ias.item_type = lr_hr_api_transaction_rec.item_type
4360: and ias.item_key = lr_hr_api_transaction_rec.item_key
4361: and ias.activity_status = 'NOTIFIED'
4362: and ias.notification_id is not null
4363: and rownum<=1;
4364: end if;

Line 4379: lr_hr_api_transaction_rec hr_api_transactions%rowtype;

4375: p_approval_comments in varchar2)
4376: is
4377: -- local variables
4378: c_proc constant varchar2(30) := 'processPageNavWFSubmit';
4379: lr_hr_api_transaction_rec hr_api_transactions%rowtype;
4380: ln_activity_id wf_item_activity_statuses.process_activity%type;
4381: begin
4382: if g_debug then
4383: hr_utility.set_location('Entering:'|| g_package||'.'||c_proc, 1);

Line 4388: select * into lr_hr_api_transaction_rec

4384: end if;
4385:
4386: if(p_transaction_id is not null) then
4387:
4388: select * into lr_hr_api_transaction_rec
4389: from hr_api_transactions
4390: where transaction_id=p_transaction_id;
4391:
4392: hr_transaction_api.update_transaction(

Line 4389: from hr_api_transactions

4385:
4386: if(p_transaction_id is not null) then
4387:
4388: select * into lr_hr_api_transaction_rec
4389: from hr_api_transactions
4390: where transaction_id=p_transaction_id;
4391:
4392: hr_transaction_api.update_transaction(
4393: p_transaction_id => p_transaction_id,

Line 4400: ,p_item_type=>lr_hr_api_transaction_rec.item_type

4396:
4397: -- re-intialize the performer roles
4398: hr_approval_ss.reinitperformerroles(p_notification_id=>null
4399: ,p_transaction_id=>null
4400: ,p_item_type=>lr_hr_api_transaction_rec.item_type
4401: ,p_item_key=>lr_hr_api_transaction_rec.item_key);
4402:
4403:
4404: -- default logic

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

4397: -- re-intialize the performer roles
4398: hr_approval_ss.reinitperformerroles(p_notification_id=>null
4399: ,p_transaction_id=>null
4400: ,p_item_type=>lr_hr_api_transaction_rec.item_type
4401: ,p_item_key=>lr_hr_api_transaction_rec.item_key);
4402:
4403:
4404: -- default logic
4405: -- get the blockid value corresponding to the UI page

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

4403:
4404: -- default logic
4405: -- get the blockid value corresponding to the UI page
4406: ln_activity_id:=
4407: getOAFPageActId(lr_hr_api_transaction_rec.item_type,lr_hr_api_transaction_rec.item_key);
4408: -- check if the ln_activity_id is null
4409: if(ln_activity_id is null) then
4410: null; -- raise error
4411: end if;

Line 4413: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type

4409: if(ln_activity_id is null) then
4410: null; -- raise error
4411: end if;
4412: -- set the workflow status TRAN_SUBMIT to Y
4413: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type
4414: ,lr_hr_api_transaction_rec.item_key
4415: ,'TRAN_SUBMIT'
4416: ,'Y');
4417:

Line 4414: ,lr_hr_api_transaction_rec.item_key

4410: null; -- raise error
4411: end if;
4412: -- set the workflow status TRAN_SUBMIT to Y
4413: wf_engine.setitemattrtext(lr_hr_api_transaction_rec.item_type
4414: ,lr_hr_api_transaction_rec.item_key
4415: ,'TRAN_SUBMIT'
4416: ,'Y');
4417:
4418:

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

4419: --
4420:
4421:
4422: -- now transition the workflow to process approval notifications
4423: if(lr_hr_api_transaction_rec.status in('YS','RI','RIS','RO','RIS')) then
4424: -- complete the flow in resubmit mode
4425: wf_engine.CompleteActivity(
4426: lr_hr_api_transaction_rec.item_type
4427: , lr_hr_api_transaction_rec.item_key

Line 4426: lr_hr_api_transaction_rec.item_type

4422: -- now transition the workflow to process approval notifications
4423: if(lr_hr_api_transaction_rec.status in('YS','RI','RIS','RO','RIS')) then
4424: -- complete the flow in resubmit mode
4425: wf_engine.CompleteActivity(
4426: lr_hr_api_transaction_rec.item_type
4427: , lr_hr_api_transaction_rec.item_key
4428: , wf_engine.getactivitylabel(ln_activity_id)
4429: , 'RESUBMIT') ;
4430:

Line 4427: , lr_hr_api_transaction_rec.item_key

4423: if(lr_hr_api_transaction_rec.status in('YS','RI','RIS','RO','RIS')) then
4424: -- complete the flow in resubmit mode
4425: wf_engine.CompleteActivity(
4426: lr_hr_api_transaction_rec.item_type
4427: , lr_hr_api_transaction_rec.item_key
4428: , wf_engine.getactivitylabel(ln_activity_id)
4429: , 'RESUBMIT') ;
4430:
4431:

Line 4435: lr_hr_api_transaction_rec.item_type

4431:
4432: else
4433: -- else intial submit
4434: wf_engine.CompleteActivity(
4435: lr_hr_api_transaction_rec.item_type
4436: , lr_hr_api_transaction_rec.item_key
4437: , wf_engine.getactivitylabel(ln_activity_id)
4438: , wf_engine.eng_trans_default) ;
4439: end if;

Line 4436: , lr_hr_api_transaction_rec.item_key

4432: else
4433: -- else intial submit
4434: wf_engine.CompleteActivity(
4435: lr_hr_api_transaction_rec.item_type
4436: , lr_hr_api_transaction_rec.item_key
4437: , wf_engine.getactivitylabel(ln_activity_id)
4438: , wf_engine.eng_trans_default) ;
4439: end if;
4440: end if;

Line 4491: lr_hr_api_transaction_rec hr_api_transactions%rowtype;

4487: p_approval_comments in varchar2)
4488: is
4489: -- local variables
4490: c_proc constant varchar2(30) := 'processNonPageNavWFSubmit';
4491: lr_hr_api_transaction_rec hr_api_transactions%rowtype;
4492: ln_activity_id wf_item_activity_statuses.process_activity%type;
4493: ln_notification_id wf_notifications.notification_id%type;
4494: lv_loginPersonDispName per_all_people_f.full_name%type;
4495: lv_loginPersonUserName fnd_user.user_name%type;

Line 4505: select * into lr_hr_api_transaction_rec

4501: end if;
4502:
4503: if(p_transaction_id is not null) then
4504:
4505: select * into lr_hr_api_transaction_rec
4506: from hr_api_transactions
4507: where transaction_id=p_transaction_id;
4508:
4509: hr_transaction_api.update_transaction(

Line 4506: from hr_api_transactions

4502:
4503: if(p_transaction_id is not null) then
4504:
4505: select * into lr_hr_api_transaction_rec
4506: from hr_api_transactions
4507: where transaction_id=p_transaction_id;
4508:
4509: hr_transaction_api.update_transaction(
4510: p_transaction_id => p_transaction_id,

Line 4518: ,p_item_type=>lr_hr_api_transaction_rec.item_type

4514:
4515: -- re-intialize the performer roles
4516: hr_approval_ss.reinitperformerroles(p_notification_id=>null
4517: ,p_transaction_id=>null
4518: ,p_item_type=>lr_hr_api_transaction_rec.item_type
4519: ,p_item_key=>lr_hr_api_transaction_rec.item_key);
4520:
4521:
4522: -- get the current transaction status

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

4515: -- re-intialize the performer roles
4516: hr_approval_ss.reinitperformerroles(p_notification_id=>null
4517: ,p_transaction_id=>null
4518: ,p_item_type=>lr_hr_api_transaction_rec.item_type
4519: ,p_item_key=>lr_hr_api_transaction_rec.item_key);
4520:
4521:
4522: -- get the current transaction status
4523: -- If approver is editing and submitting the possible

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

4525: -- else it should be the initial creator submit
4526:
4527: begin
4528: -- get the current transaction status
4529: if(lr_hr_api_transaction_rec.status in ('Y','YS','RI','RIS','RO','RIS')) then
4530: -- approver edit and submit case
4531: ln_notification_id:= getApproverNtfId(p_transaction_id);
4532: -- check if not null value
4533: if(ln_notification_id is not null) then

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

4543: ,'RESULT'
4544: ,'RESUBMIT');
4545:
4546: -- Fix for bug 4998216 starts
4547: update_comments(ln_notification_id,lr_hr_api_transaction_rec.status,p_approval_comments);
4548: -- Fix for bug 4998216 ends
4549:
4550: wf_notification.respond(
4551: ln_notification_id

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

4552: ,p_approval_comments
4553: ,fnd_global.user_name
4554: ,null);
4555: -- Fix for 5070814
4556: if(lr_hr_api_transaction_rec.status in ('RI','RIS','RO','RIS')) then
4557: -- propagate during RFC only
4558: wf_notification.propagatehistory(
4559: lr_hr_api_transaction_rec.item_type
4560: ,lr_hr_api_transaction_rec.item_key

Line 4559: lr_hr_api_transaction_rec.item_type

4555: -- Fix for 5070814
4556: if(lr_hr_api_transaction_rec.status in ('RI','RIS','RO','RIS')) then
4557: -- propagate during RFC only
4558: wf_notification.propagatehistory(
4559: lr_hr_api_transaction_rec.item_type
4560: ,lr_hr_api_transaction_rec.item_key
4561: ,'APPROVAL_NOTIFICATION'
4562: ,fnd_global.user_name
4563: ,'WF_SYSTEM'

Line 4560: ,lr_hr_api_transaction_rec.item_key

4556: if(lr_hr_api_transaction_rec.status in ('RI','RIS','RO','RIS')) then
4557: -- propagate during RFC only
4558: wf_notification.propagatehistory(
4559: lr_hr_api_transaction_rec.item_type
4560: ,lr_hr_api_transaction_rec.item_key
4561: ,'APPROVAL_NOTIFICATION'
4562: ,fnd_global.user_name
4563: ,'WF_SYSTEM'
4564: --,hr_workflow_ss.getNextApproverForHist(itemtype, itemkey)

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

4585:
4586:
4587: -- set the initial submit comments
4588: -- APPROVAL_COMMENT_COPY
4589: hr_approval_ss.create_item_attrib_if_notexist(itemtype => lr_hr_api_transaction_rec.item_type
4590: ,itemkey => lr_hr_api_transaction_rec.item_key
4591: ,aname => 'APPROVAL_COMMENT_COPY'
4592: ,text_value=>p_approval_comments
4593: ,number_value=>null,

Line 4590: ,itemkey => lr_hr_api_transaction_rec.item_key

4586:
4587: -- set the initial submit comments
4588: -- APPROVAL_COMMENT_COPY
4589: hr_approval_ss.create_item_attrib_if_notexist(itemtype => lr_hr_api_transaction_rec.item_type
4590: ,itemkey => lr_hr_api_transaction_rec.item_key
4591: ,aname => 'APPROVAL_COMMENT_COPY'
4592: ,text_value=>p_approval_comments
4593: ,number_value=>null,
4594: date_value=>null

Line 4599: lr_hr_api_transaction_rec.item_type

4595: );
4596:
4597: -- else intial submit
4598: wf_engine.CompleteActivity(
4599: lr_hr_api_transaction_rec.item_type
4600: , lr_hr_api_transaction_rec.item_key
4601: , wf_engine.getactivitylabel(ln_activity_id)
4602: , wf_engine.eng_trans_default) ;
4603:

Line 4600: , lr_hr_api_transaction_rec.item_key

4596:
4597: -- else intial submit
4598: wf_engine.CompleteActivity(
4599: lr_hr_api_transaction_rec.item_type
4600: , lr_hr_api_transaction_rec.item_key
4601: , wf_engine.getactivitylabel(ln_activity_id)
4602: , wf_engine.eng_trans_default) ;
4603:
4604: end if;

Line 4624: lr_hr_api_transaction_rec hr_api_transactions%rowtype;

4620: p_approval_comments in varchar2)
4621: is
4622: -- local variables
4623: c_proc constant varchar2(30) := 'processApprovalSubmit';
4624: lr_hr_api_transaction_rec hr_api_transactions%rowtype;
4625: ln_activity_id wf_item_activity_statuses.process_activity%type;
4626: lv_loginPersonDispName per_all_people_f.full_name%type;
4627: lv_loginPersonUserName fnd_user.user_name%type;
4628: ln_loginPersonId fnd_user.employee_id%type;

Line 4644: from hr_api_transactions

4640:
4641: begin
4642: select item_type,item_key
4643: into lv_item_type,lv_item_key
4644: from hr_api_transactions
4645: where transaction_id=p_transaction_id;
4646: exception
4647: when no_data_found then
4648: -- get the fnd message and populate to the fnd message pub

Line 4715: lr_hr_api_transaction_rec hr_api_transactions%rowtype;

4711: end processApprovalSubmit;
4712:
4713: procedure resetWfPageFlowState(p_transaction_id in number)
4714: is
4715: lr_hr_api_transaction_rec hr_api_transactions%rowtype;
4716: ln_activity_id wf_item_attribute_values.number_value%type;
4717: ln_oaf_page_act_id WF_ITEM_ACTIVITY_STATUSES.process_activity%type;
4718: lv_oaf_nav_attr wf_item_attribute_values.text_value%type;
4719: begin

Line 4723: select * into lr_hr_api_transaction_rec

4719: begin
4720:
4721: if(p_transaction_id is not null) then
4722: begin
4723: select * into lr_hr_api_transaction_rec
4724: from hr_api_transactions
4725: where transaction_id=p_transaction_id;
4726: exception
4727: when others then

Line 4724: from hr_api_transactions

4720:
4721: if(p_transaction_id is not null) then
4722: begin
4723: select * into lr_hr_api_transaction_rec
4724: from hr_api_transactions
4725: where transaction_id=p_transaction_id;
4726: exception
4727: when others then
4728: null;

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

4728: null;
4729: end;
4730:
4731: -- check the status
4732: if(lr_hr_api_transaction_rec.status<>'W') then
4733: if(lr_hr_api_transaction_rec.item_key is not null) then
4734: -- check if the flow uses wf for page navigation
4735: -- HR_OAF_NAVIGATION_ATTR
4736: lv_oaf_nav_attr := wf_engine.getitemattrtext(lr_hr_api_transaction_rec.item_type,

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

4729: end;
4730:
4731: -- check the status
4732: if(lr_hr_api_transaction_rec.status<>'W') then
4733: if(lr_hr_api_transaction_rec.item_key is not null) then
4734: -- check if the flow uses wf for page navigation
4735: -- HR_OAF_NAVIGATION_ATTR
4736: lv_oaf_nav_attr := wf_engine.getitemattrtext(lr_hr_api_transaction_rec.item_type,
4737: lr_hr_api_transaction_rec.item_key,

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

4732: if(lr_hr_api_transaction_rec.status<>'W') then
4733: if(lr_hr_api_transaction_rec.item_key is not null) then
4734: -- check if the flow uses wf for page navigation
4735: -- HR_OAF_NAVIGATION_ATTR
4736: lv_oaf_nav_attr := wf_engine.getitemattrtext(lr_hr_api_transaction_rec.item_type,
4737: lr_hr_api_transaction_rec.item_key,
4738: 'HR_OAF_NAVIGATION_ATTR',
4739: true);
4740: if(lv_oaf_nav_attr='Y') then

Line 4737: lr_hr_api_transaction_rec.item_key,

4733: if(lr_hr_api_transaction_rec.item_key is not null) then
4734: -- check if the flow uses wf for page navigation
4735: -- HR_OAF_NAVIGATION_ATTR
4736: lv_oaf_nav_attr := wf_engine.getitemattrtext(lr_hr_api_transaction_rec.item_type,
4737: lr_hr_api_transaction_rec.item_key,
4738: 'HR_OAF_NAVIGATION_ATTR',
4739: true);
4740: if(lv_oaf_nav_attr='Y') then
4741: -- for wf page navigation need to reset the wf state

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

4740: if(lv_oaf_nav_attr='Y') then
4741: -- for wf page navigation need to reset the wf state
4742: -- S, RIS,ROS,YS reset the state to saved page actid
4743: -- Y,RO,RI reset to first page activity id
4744: if(lr_hr_api_transaction_rec.status in ('S','RIS','ROS','YS')) then
4745: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
4746: lr_hr_api_transaction_rec.item_key,
4747: 'SAVED_ACTIVITY_ID',
4748: true);

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

4741: -- for wf page navigation need to reset the wf state
4742: -- S, RIS,ROS,YS reset the state to saved page actid
4743: -- Y,RO,RI reset to first page activity id
4744: if(lr_hr_api_transaction_rec.status in ('S','RIS','ROS','YS')) then
4745: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
4746: lr_hr_api_transaction_rec.item_key,
4747: 'SAVED_ACTIVITY_ID',
4748: true);
4749: elsif(lr_hr_api_transaction_rec.status in ('RI','RO','Y')) then

Line 4746: lr_hr_api_transaction_rec.item_key,

4742: -- S, RIS,ROS,YS reset the state to saved page actid
4743: -- Y,RO,RI reset to first page activity id
4744: if(lr_hr_api_transaction_rec.status in ('S','RIS','ROS','YS')) then
4745: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
4746: lr_hr_api_transaction_rec.item_key,
4747: 'SAVED_ACTIVITY_ID',
4748: true);
4749: elsif(lr_hr_api_transaction_rec.status in ('RI','RO','Y')) then
4750: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,

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

4745: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
4746: lr_hr_api_transaction_rec.item_key,
4747: 'SAVED_ACTIVITY_ID',
4748: true);
4749: elsif(lr_hr_api_transaction_rec.status in ('RI','RO','Y')) then
4750: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
4751: lr_hr_api_transaction_rec.item_key,
4752: 'HR_FIRST_ACTIVITY_ID',
4753: true);

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

4746: lr_hr_api_transaction_rec.item_key,
4747: 'SAVED_ACTIVITY_ID',
4748: true);
4749: elsif(lr_hr_api_transaction_rec.status in ('RI','RO','Y')) then
4750: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
4751: lr_hr_api_transaction_rec.item_key,
4752: 'HR_FIRST_ACTIVITY_ID',
4753: true);
4754:

Line 4751: lr_hr_api_transaction_rec.item_key,

4747: 'SAVED_ACTIVITY_ID',
4748: true);
4749: elsif(lr_hr_api_transaction_rec.status in ('RI','RO','Y')) then
4750: ln_activity_id := wf_engine.getitemattrnumber(lr_hr_api_transaction_rec.item_type,
4751: lr_hr_api_transaction_rec.item_key,
4752: 'HR_FIRST_ACTIVITY_ID',
4753: true);
4754:
4755: end if;

Line 4761: lr_hr_api_transaction_rec.item_type,

4757: -- finally call wf engine handle to reset the state
4758: -- need to do only if the current activity id is not
4759: -- same as the ln_activity_id
4760: ln_oaf_page_act_id := hr_approval_ss.getoafpageactid(
4761: lr_hr_api_transaction_rec.item_type,
4762: lr_hr_api_transaction_rec.item_key);
4763: if(ln_activity_id is not null and ln_activity_id<>ln_oaf_page_act_id ) then
4764: WF_ENGINE.handleError(
4765: itemType => lr_hr_api_transaction_rec.item_type

Line 4762: lr_hr_api_transaction_rec.item_key);

4758: -- need to do only if the current activity id is not
4759: -- same as the ln_activity_id
4760: ln_oaf_page_act_id := hr_approval_ss.getoafpageactid(
4761: lr_hr_api_transaction_rec.item_type,
4762: lr_hr_api_transaction_rec.item_key);
4763: if(ln_activity_id is not null and ln_activity_id<>ln_oaf_page_act_id ) then
4764: WF_ENGINE.handleError(
4765: itemType => lr_hr_api_transaction_rec.item_type
4766: ,itemKey => lr_hr_api_transaction_rec.item_type

Line 4765: itemType => lr_hr_api_transaction_rec.item_type

4761: lr_hr_api_transaction_rec.item_type,
4762: lr_hr_api_transaction_rec.item_key);
4763: if(ln_activity_id is not null and ln_activity_id<>ln_oaf_page_act_id ) then
4764: WF_ENGINE.handleError(
4765: itemType => lr_hr_api_transaction_rec.item_type
4766: ,itemKey => lr_hr_api_transaction_rec.item_type
4767: ,activity => WF_ENGINE.GetActivityLabel(ln_activity_id)
4768: ,command => 'RETRY' ) ;
4769: end if;

Line 4766: ,itemKey => lr_hr_api_transaction_rec.item_type

4762: lr_hr_api_transaction_rec.item_key);
4763: if(ln_activity_id is not null and ln_activity_id<>ln_oaf_page_act_id ) then
4764: WF_ENGINE.handleError(
4765: itemType => lr_hr_api_transaction_rec.item_type
4766: ,itemKey => lr_hr_api_transaction_rec.item_type
4767: ,activity => WF_ENGINE.GetActivityLabel(ln_activity_id)
4768: ,command => 'RETRY' ) ;
4769: end if;
4770: end if;

Line 4787: lv_status hr_api_transactions.status%type;

4783:
4784: is
4785: -- local variables
4786: c_proc constant varchar2(40) := 'checktransactionState';
4787: lv_status hr_api_transactions.status%type;
4788: lv_state hr_api_transactions.transaction_state%type;
4789: begin
4790: if g_debug then
4791: hr_utility.set_location('Entering:'|| g_package||'.'||c_proc, 1);

Line 4788: lv_state hr_api_transactions.transaction_state%type;

4784: is
4785: -- local variables
4786: c_proc constant varchar2(40) := 'checktransactionState';
4787: lv_status hr_api_transactions.status%type;
4788: lv_state hr_api_transactions.transaction_state%type;
4789: begin
4790: if g_debug then
4791: hr_utility.set_location('Entering:'|| g_package||'.'||c_proc, 1);
4792: end if;

Line 4798: from hr_api_transactions

4794:
4795: begin
4796: select status,transaction_state
4797: into lv_status,lv_state
4798: from hr_api_transactions
4799: where transaction_id=p_transaction_id;
4800:
4801: -- check the transaction status
4802: if(lv_status in ('YS','RIS','ROS')) then