Workflow Notifications to Users/Roles

on Sunday, May 19, 2013

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

FND_USERS
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



WF_USERS/WF_LOCAL_USERS
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.

WF_ROLES/WF_LOCAL_ROLES
store roles information

WF_USER_ROLES
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

            wf_engine.SetItemAttrText
                (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
wf_directory.createadhocrole
    (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
wf_directory.AddUsersToAdHocRole
    (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;

R12 - TCA Bank Model

on Thursday, April 25, 2013

In Release 12, each internal bank account is assigned to a Legal Entity. Any or all operating units associated with that legal entity are permitted to use that bank account.


  • The link between PO_VENDORS and HZ_PARTIES is PO_VENDORS.party_id
  • PO_VENDOR_SITES_ALL.party_site_id = HZ_PARTY_SITES.party_site_id
  • When a Supplier is created, Record will be Inserted in HZ_PARTIES. When the Supplier Site is created, Record will be Inserted in HZ_PARTY_SITES. When Address is created, Record will be stored in HZ_LOCATIONS
  • When a bank is Created, information will be stored in IBY_EXT_BANK_ACCOUNTS
    IBY_EXT_BANK_ACCOUNTS.bank_id = HZ_PARTIES.party_id
  • When the Bank is assigned to Vendors then it will be updated in HZ_CODE_ASSIGNMENTS. HZ_CODE_ASSIGNMENTS.owner_table_id = IBY_EXT_BANK_ACCOUNTS.branch_id

    CE_BANK_ACCOUNT: Stores bank account attributes
    CE_BANK_ACCT_USES_ALL: Stores the bank account use attributes specific to Operating Unit (AR, AP) and Legal Entity (Treasury).
    CE_GL_ACCOUNTS_CCID: The accounting data pertaining to the bank account use will be stored in the table