Tuesday 23 January 2018

Part1: PO Workflow Customization to send Workflow Notification to Buyer Supervisor in Oracle Apps.




Suppose, We have a Requirement to send workflow notification to Buyer Supervisor who is creating the Purchase Order because we are using Position Hierarchy in our business and our business requirement to send Notification for PO creation to buyer supervisor.

This topic is divided to posts as below.

part1:- http://rpforacle.blogspot.in/2018/01/part1-po-workflow-customization-to-send-notifications-to-buyer-supervisor.html
part2:- http://rpforacle.blogspot.in/2018/01/part2-po-workflow-customization-to-send-workflow-notification.html

 

 

This is the PLSQL stored procedure we will use in Workflow builder functions. In this Procedure, we are setting the value of supervisor in Workflow attribute XXSEND_TO_SUPERVISOR so that workflow will send notification to supervisor.

Step1:-  Create PLSQL stored procedure as below.


CREATE OR REPLACE PROCEDURE XX_PONOTIF_TO_SUPERVISOR(p_item_type    IN VARCHAR2,

                     p_item_key    IN VARCHAR2,

                     p_actid        IN NUMBER,

                     p_funmode        IN VARCHAR2,

                     p_result     OUT NOCOPY VARCHAR2 )

IS

v_agent_id NUMBER;

v_SUPERVISOR_ID NUMBER;

V_USER_NAME VARCHAR2(4000);

V_ROLE_NAME VARCHAR2(4000);

BEGIN

BEGIN


SELECT pha.AGENT_ID

into v_agent_id

 FROM apps.wf_items wi ,APPS.PO_HEADERS_ALL pha

WHERE wi.item_type='POAPPRV'

and wi.item_key=p_item_key

and wi.user_key = pha.segment1;

select SUPERVISOR_ID

into v_SUPERVISOR_ID

from apps.per_all_assignments_f

where person_id=v_agent_id;

select USER_NAME

INTO V_USER_NAME

 from apps.fnd_user

where employee_id=v_SUPERVISOR_ID;

 

select name INTO V_ROLE_NAME from   apps.wf_local_roles

where name=V_USER_NAME;

EXCEPTION WHEN OTHERS THEN

 AP_WEB_UTILITIES_PKG.logProcedure('ERROR IN SUPERVISOR SELECTION FOR PO BUYER', 'sqlerrm'||sqlerrm);

END;

 
wf_engine.setitemattrtext(itemtype => p_item_type

                             ,itemkey  => p_item_key

                             ,aname    => 'XXSEND_TO_SUPERVISOR'

                             ,avalue   => V_ROLE_NAME);

                            

p_result :='Y';

EXCEPTION WHEN OTHERS THEN

p_result :='N';

END;
 
 
Step2:- Go to the Attributes as below and right click on Attributes.

 
 

Step3:-  Create Attribute XXSEND_TO_SUPERVISOR as below.

 

Step4: - Open the PO approval workflow in Workflow builder. Then go to the Process ‘PO Approval Top Process’.
 

Step5:- Open the process we are going to edit. We will design our functions between these below highlighted function
 

 

Step 6:- We will link new functions from this highlighted function as below.
 
Step 7:-  Right click on the process window and click on New Function as below.
 
 
 
Step8:- Create Function as below and give the plsql stored procedure name in Function name column as below.
 
Step 9:- Now again Right click on the process window and click on New Notification as below.
 
 
For Next Steps Please go to the Second Post of this Topic as below.

http://rpforacle.blogspot.in/2018/01/part2-po-workflow-customization-to-send-workflow-notification.html



If you want to see Other OAF Related Posts , Please visit Below URL.
https://rpforacle.blogspot.in/2013/03/oaf_10.html


If you want to see  Oracle Fusion Related Posts , Please visit Below URL.
https://rpforacle.blogspot.in/2018/01/oracle-fusion-learning-tutorial.html
If you want to Learn Oracle Workflow Builder, Please visit Below URL.
https://rpforacle.blogspot.in/2018/01/oracle-workflow-learning-tutorial-1.html
 

4 comments:

Anonymous said...

Nice blog, I really like what you write in this blog, I also have some relevant Information about Best HR Training In Hyderabad | Hr training institute in Hyderabad! if you want more information.
Oracle Fusion HCM Online Training

Anonymous said...

Good blog, Thanks for sharing this informative article. It would be helpful to all if you write a full article.
Oracle Fusion HCM Online Training"

Goutham Raj said...

Good Article, Alots of information provided, Thanks for sharing this information.
Oracle Fusion HCM Online Training

Rainbow Training Institute said...

Really very helpful article , Thank you for sharing

Big Data and Hadoop Online Training
Big Data Hadoop Training
Hyderabad

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *