Workflow Customization in Oracle HRMS

By | November 22, 2016

In this article, we are going to cover how we can modify the workflow to change the notification. While you are working for oracle hrms in your environment. You may come across such requirement. so here are the stops to achieve this requirement.

Contents

Business Requirement

Solution Steps
Identify the Item Key
Find the Process Name
Modify the Notification
Find the Notification
Create Notification in Workflow Builder
Create Message
Embed New Notification in Workflow Process
Create Attributes
Copy Attributes in Message
Create PL/SQL Package set workflow attributes
Create Function in Workflow
Add Function in Workflow
Test the Process

Business Requirement


Customize Workflow of Absence Management to bring Item Key and Employee number in message subject of notification that approver receives
For demonstrations purpose, we have done this on vision instance provided by oracle. We are using Oracle Apps Environment R12.1.1.
In Vision use following information to submit and approve the absence. After completing the process, we can trace the tables that will get impacted.

Oracle HRMS Overview cd 1

As a result of submission of leave request, following notification is received by manager

Oracle HRMS Overview cd 2

This notification does not contain item key in the subject and employee number of sender.

Oracle HRMS Overview cd 3

We want the item key of transaction to be part of message subject. Like after fixing and implementing this solution, notification of subject will look like this

Oracle HRMS Overview cd 4

Back to top

Identify the Item Key


Step1: On the basis of notification id, get the item key from wf_notification table
select item_key,message_name from wf_notifications
where notification_id = 4681807

Oracle HRMS Overview cd 5

Login with sysadmin

Oracle HRMS Overview cd 6

Back to top

Find the Process Name

Step 2: on the basis of item key found above, check the process name from hr_api_transactions table
select process_name from hr_api_transactions where item_key = 13980

Oracle HRMS Overview cd 7

Back to top

Modify the Notification

Step 3: Find this process name in Workflow builder and modify the correct notification
HR_GENERIC_APPROVAL_PRC

Oracle HRMS Overview cd 8

Back to top

Find the Notification

Through Sysadmin identify the notification that is to be customized,

Oracle HRMS Overview cd 9

Oracle HRMS Overview cd 10

click on Status Monitor function under Administrator Workflow

Oracle HRMS Overview cd 11

Following screen will open through this screen find it against item key

Oracle HRMS Overview cd 12

click on status diagram

Oracle HRMS Overview cd 13

this is final point which contain the notification which was sent

Oracle HRMS Overview cd 14

Back to top

Create Notification in Workflow Builder

Open the same notification in the workflow builder

Oracle HRMS Overview cd 15

take the details of this notification

Oracle HRMS Overview cd 16

Oracle HRMS Overview cd 17

Find this notificaiton

Oracle HRMS Overview cd 18

Copy it

Oracle HRMS Overview cd 19

and Paste it

Oracle HRMS Overview cd 20

Note the message name

Oracle HRMS Overview cd 21

Back to top

Create Message

Open the Message and copy and paste the same way we did the notifcation

Oracle HRMS Overview cd 22

Back to top

Embed New Notification in Workflow Process

After creating the message go to process and change the notification in the process
Note down the properties of original notification that you are going to delete

Oracle HRMS Overview cd 23

because same you will set later for your created notification

Oracle HRMS Overview cd 24

Insert the notifcation that we have created

Oracle HRMS Overview cd 25

Make same connections for newly created notification

Oracle HRMS Overview cd 26

Set the performer as shown

Oracle HRMS Overview cd 27

Back to top

Create Attributes

Create attribute to hold values that we need

Oracle HRMS Overview cd 28

Oracle HRMS Overview cd 29

Oracle HRMS Overview cd 30

Another Attribute

Oracle HRMS Overview cd 31

Oracle HRMS Overview cd 32

Back to top

Copy Attributes in Message

once these attributes are created, drag them to your message in which you want to use them

Oracle HRMS Overview cd 33

Back to top

Create PL/SQL Package set workflow attributes

Step to create the function to set the variables created in workflow
Open the package and copy the procedure. This piece of code is taken only for reference purpose. We shall use this code in our new custom package. It will help us to write code from scratch.

Oracle HRMS Overview cd 34

Create a Newly Package and paste it in the new package

Oracle HRMS Overview cd 35

Package Body

Oracle HRMS Overview cd 36

Back to top

Create Function in Workflow

Create a Function

Oracle HRMS Overview cd 37

Oracle HRMS Overview cd 38

Function Created looks like this

Oracle HRMS Overview cd 39

Copy the attributes and paste on this function

Oracle HRMS Overview cd 40

Oracle HRMS Overview cd 41

Oracle HRMS Overview cd 42

Back to top

Add Function in Workflow

Go to workflow process where we inserted the notification and place this function just before the notifcation to set the values

Oracle HRMS Overview cd 43

Oracle HRMS Overview cd 44

It looks like this

Oracle HRMS Overview cd 45

Now place this function just before the notification call

Oracle HRMS Overview cd 46

and call the variables in the message subject

Oracle HRMS Overview cd 47

Oracle HRMS Overview cd 48

Oracle HRMS Overview cd 49

Oracle HRMS Overview cd 50

Back to top

Test the Process

Now submit the request

Oracle HRMS Overview cd 55

Oracle HRMS Overview cd 51

After the customization, notification subject will contain the employee number and item key as shown below

Oracle HRMS Overview cd 52

Oracle HRMS Overview cd 53

Back to top

If you have liked the contents in this post and you think it can be helpful to others, please share it at least once in your circle, in this way, you will join me in my cause to Learn Share and Grow. Come on, Lets Grow Together.

Related Posts

WISTU – Oracle Workflow Builder
Free Online Test
Solved Issued of Empty Email Notification
Steps for creating custom form in Oracle Apps
How to create backend logging mechanism
Useful Apps SQL Queries Pool
Top 10 Apps Technical Interview Questions