Giving the notification to user EG_AFZAL as conc request is
completed using workflow process:
- Make the workflow.
- Register the Subscription under the event 'oracle.apps.fnd.concurrent.request.completed'
- Run the concurrent Request named so to make our subscription active.
- Making the workflow using the workflow builder: (see the .wtf file)
Event properties:
Procedure used in the function activity :
CREATE OR REPLACE PROCEDURE APPS.XXWF_PAYROLL_RUN_NOT
( ITEM_TYPE IN VARCHAR2,
ITEM_KEY IN VARCHAR2,
ACT_ID IN NUMBER,
FUNC_MODE IN VARCHAR2,
RESULT_OUT OUT VARCHAR2)
AS
V_REQUEST_ID NUMBER;
V_USER_NAME VARCHAR2(240);
V_PAYROLL_NAME VARCHAR2(40);
V_CREATION_DATE DATE;
BEGIN
IF FUNC_MODE = 'RUN' THEN
-- V_REQUEST_ID :=
getvalueforparameter('REQUEST_ID') ;
SELECT REQUEST_ID INTO V_REQUEST_ID
FROM PAY_PAYROLL_ACTIONS
WHERE CREATION_DATE IN (SELECT MAX(CREATION_DATE) FROM PAY_PAYROLL_ACTIONS);
select pap.payroll_name, fu.user_name, paa.creation_date
INTO V_PAYROLL_NAME,
V_USER_NAME,V_CREATION_DATE
from
pay_payroll_actions paa,
pay_all_payrolls_f pap,
fnd_user fu
WHERE PAA.REQUEST_ID =V_REQUEST_ID-- 44345723
and paa.payroll_id = pap.payroll_id
and fu.user_id = paa.created_by;
--ASSIGNING VALUES TO THE
ATTRIBUTES IN THE WORKLOW
WF_ENGINE.SETITEMATTRTEXT(ITEM_TYPE,ITEM_KEY,'PAYROLL_NAME', V_PAYROLL_NAME);
WF_ENGINE.SETITEMATTRTEXT(ITEM_TYPE,ITEM_KEY,'USER_NAME', V_USER_NAME);
WF_ENGINE.SETITEMATTRDATE(ITEM_TYPE,ITEM_KEY,'CREATION_DATE',V_CREATION_DATE);
END IF;
RESULT_OUT := 'COMPLETE';
END;
/
2.
3.
U can run from HRMS
Resp if not exists then add in the request group4.
Testing:
Go to HRMS Manager
Resp> people>Assignment>Others>Quick Pay.
Quick pay is run for employee 9213 for month November.
Lets chk the notification.
Workflow administrator Resp> Notification
No comments:
Post a Comment