Thursday, February 16, 2012

Workflow Notifications to Users/Roles

Workflow Notifications are sent to the Users/Roles for which setup has been done through Oracle Apps.
Its possible to create Users/Roles using workflow API and all this information is stored in below Oracle
Database tables

stores the Oracle application user data that is setup through System administrator>User. It links
employee id to the User id, along with email id

stores User data along with email id to which Notification is to be sent. When A new user is
defined in oracle apps along with fnd_user table a new record is inserted into this table.

store roles information

Associations of users with the roles

To sent a notification to a particular User following steps need to be performed
1. Add a Notification node to the workflow process
2. Create a attribute of type ROLE in workflow and at the node just before sending the notification
   setup the value of attribute using below api
                (itemtype        => x_item_type
                ,itemkey        => x_item_key
                ,aname            => 'MAIN_USER'
            ,avalue            => x_user);
   Here x_user is user_name/name fetched from fnd_users/wf_users table for that person

3. Open the Notification node in the process and on 'Node' tab select the Performer as the
   Type "Item Attribute" and value as attribute.
Whenever the workflow process is initiated and notification is sent, the table WF_NOTIFICATIONS
is populated with RECIPIENT_ROLE as X_USER

Notification to multiple Users:
In workflow if you need to send a Notification at once to different Users, you need
to create a role using below API.
-- Create adhoc role
    (role_name             => x_role_name
    ,role_display_name        => x_role_name
    ,LANGUAGE                       => NULL
    ,territory                      => NULL
    ,role_description               => 'MAIN_ROLE'
    ,notification_preference    => 'MAILHTML'
    ,role_users                    => NULL
    ,email_address                    => NULL
    ,fax                        => NULL
    ,status                => 'ACTIVE'
    ,expiration_date        => SYSDATE+ 60
    ,parent_orig_system         => 'WF_LOCAL_ROLES'
    ,parent_orig_system_id        => 0
    ,owner_tag            => NULL);

Once role is created now add Users to Role using below API. In below API the parameter
role_users is passed with list of USER_NAME separated by space.
--Add Users to Role
    (role_name     =>x_role_name,
     role_users     =>'Username1 Username2 Username3');

To verify the details please check with below queries

--Check the Role name
select * from wf_roles where name like x_role_name;

--Check the User associated with the Role
select * from wf_user_roles where role_name like x_role_name;


Unknown said...

Hi, Thanks for sharing this informative post. If anyone interested to take Oracle Apps Training in Chennai, please reach us TIS academy located at Chennai. Rated as best training institute in Chennai.

Praveen said...

Oracle Workflow roles are stored in the database, in the Oracle Workflow directory service. The performer can be an item type attribute that dynamically returns a role. To send a single notification (FYI/Actionable) to multiple users we have to use Role attribute as performer of that notification. The attribute value must be the internal name of a role If anyone interested to take Oracle Apps Functional Online Training, please reach us KBS Training Institute located at Bangalore. Rated as best training institute in Bangalore.

oracle fusion procurement online training said...

Hi, thanks for sharing this informative post. if all people interested in taking oracle fusion procurement education please reach us this academy placed in Hyderabad. rated as first-rate education institute in Hyderabad
thank for sharing information
oracle fusion procurement online training
oracle fusion procurement training

oracle fusion SCM said...

this is a very interesting topic.
really its useful site above given information very helpful to me.
oracle fusion SCM online training

oracle hcm online said...

this is very interesting topic. Thanks for sharing such a nice topic.\
oracle fusion HCM training.

Unknown said...

How to add users dynamically from a lookup to the adhoc role.

Unknown said...

Thanks and Regards. Oracle Apps R12 Training Videos at affordable cost. please check

Smith said...

Oracle Apps R12 and Oracle Fusion Cloud Self Paced Online Training Videos Published on Udemy with Life Time Access & Live Meeting Support to Clear your Queries. Avail 25% to 80% discount. Please Check for Never Before Offers and Discount Coupon Codes.

Oracle Apps Technical Dot Com said...

25% OFF on Oracle Apps R12 Financials Self Paced Course along with 11 Additional Add On Courses (321 Session Videos of 120 Hours Recordings). Our Top Trending Course with 1700 Enrolled Udemy Students

Please Check for details

Galdguru Marketing said...

Thank for sharing your valuable information or connect with ggmpl with best opporitunity

Rainbow Training Institute said...

Good Blog. Thanks for sharing this information and helpful for me

Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
Oracle Fusion Financials Online Training
Oracle Integration Cloud Online Training
Oracle Fusion Technical Online Training