Oracle User Management R12 Developers Guide
Oracle User Management R12 Developers Guide
Oracle User Management R12 Developers Guide
Developer’s Guide
Status: Published
Page 2 of 31
Contents
1. Document Control..................................................................................................2
1.1 Change Record........................................................................................................................ 2
2. Introduction............................................................................................................1
Page 3 of 31
2. Introduction
This developers guide includes specific information and guidelines required for design and
development of registration processes integrated with Oracle User Management. The document
also includes detailed information on the Oracle User Management registration
architecture/infrastructure and the processing that goes on behind the scenes.
Disclaimer: This is a living document and provided as is, coding standards and guidelines
described in this document may change without prior notice; any such changes may require
modifications to your code.
Page 1 of 31
3. Registration Processes
3.1 Overview
Registration Processes allow organizations to streamline account provisioning and access control
assignment through predetermined flows. Registration Processes can be defined to support each
organization’s unique business requirements, and allows you to:
• Capture information from the requester through UI’s built specifically to handle each
type of request.
o Manager chain
• Keep information entered by the requester in a temporary storage until the request is
approved (avoids garbage data in your production tables)
• Define specialized business logic to handle the data for each type of request
• Define what set of users are allowed request access to a given part of the system (who
can request each role).
• Self Service Account Requests are typically invoked from a public webpage where a
"Register Here" link has been embedded. Once a person has completed the registration
process, they should at a minimum have a TCA person party record, a user account, as
well as one or more roles that give the requester access to a restricted part of the website
they signed up from.
An online store is a typical example where this type of registration process is useful;
customers need to register before being able to make a purchase.
A typical usage scenario: Your company has a business relationship with some other
organization. People from the external organization should be given access to a limited
set / parts of the applications you have deployed. Since employment changes on a day-to-
day basis at every organization, you decide to designate a person from the external
organization as the local security administrator. This person should not only be allowed
to assign and revoke a subset of roles and approve self service requests, but also be able
to maintain and create user accounts as well as register new people for their organization.
Page 2 of 31
The latter two can be accomplished by granting a set of local administrators access to the
Administrator Assisted Account Creation registration processes defined for this specific
purpose.
• Self Service Requests for Additional Access. Once a person has a user account they may
need access to additional parts of the system. Access is granted to users by assigning one
or more roles, this can be initiated by:
o End users request access through the Access Request Tool (ART). ART is
available to users through the global “Preferences” menu after login. Users can
only request roles they are eligible for, which is typically determined by what
other roles and groups (in the workflow directory) the user is already a member
of.
• Administrator Assisted Additional Access. Once a person has a user account they may
need access to additional parts of the system. Access is granted to users by assigning one
or more roles, this can be initiated by:
Page 3 of 31
4. Developing Registration Processes 1-2-3
Some applications require the user not only to be granted the necessary permissions to access the
application (permissions are granted through roles), but also require user specific settings such as
profile options, resource group membership, or other information to be defined. In the past, getting
this information into the system has typically been done through manual setups, which is both an
error prone and labor-intensive process. The goal is for each registration process to cover all the
setup steps required. When defining your registration processes you have a few options for how to
get this information:
• Let the requester (whether an administrator or the end user) enter some or all the
information up front in the registration UI
• For self-service flows, have the approver enter any information (in the approval
notification response) that the requester should not be able to enter or have control over.
• Have your code derive the information based on any other data entered throughout the
registration flow.
If the current setups required are simply too complicated to automate into one flow, automate what
you can and list the additional manual steps required in the approval notifications for your
registration process. This will save the approver / administrator a lot of time and headache, since
the steps are different for each type of request.
1. Ensure your security setups* are complete (roles, role categories, role inheritance
hierarchies, responsibilities, menus, permission sets, permissions, grants, data security
policies).
2. Build the registration UI to capture required information from the requester, whether an
administrator or end user [UI’s are optional for Additional Access registration processes]
3. Define business event and subscriptions to write the registration data to the destination
schemas once the request has been approved.
6. Create the registration process metadata* definition with the components defined in the
previous steps.
Page 4 of 31
7. Extract the metadata using loaders
8. In your target environment, expose the self-service registration flows on login page* and
define custom registration parameters for each server.
*Please refer to the Oracle User Management section of the Oracle Applications System Administrators Guide – Security
for more information.
The next sections will go through the above steps above in more detail.
The diagram below illustrates the major components and steps in a self-service account
registration flow (requests for additional access are using the exact same infrastructure, some parts
like creating person parties and activating user accounts are obviously not required).
Email
To Approver(s)
Event Event Event
Object Object Object
Confirmed!
The following is a detailed description of the above flow and is provided so that developers
understand the details of the entire process. At first this information may seem overwhelming and
complicated, but the majority of the code is implemented by Oracle User Management and
handled automatically for you. Developers building registration processes only need to code
registration UI’s, copy and customize notification workflows, define approval routing rules, and
write some simple code to handle the registration data once the request has been approved. Coding
guidelines for each will be described in subsequent sections of this document.
1. A person clicks on the “Register Here” link on the login page. The login page has been
enhanced with the introduction of Oracle User Management to support a couple of nifty
features:
a. The registration link can point to a different registration process for each
server/midtier the login page is accessible from.
Page 5 of 31
b. Each registration link (URL) can include server / deployment specific
registration parameters and values that are not known at design time. These
parameter values are accessible to your code throughout the entire registration
flow.
Consider the case where all registration requests originating from the United
States should be routed to the US Administrator, and requests originating from
the United Kingdom be routed to the UK Administrator. In this case the
approval routing engine must know from where the request originated. You can
achieve this by deploying two midtier servers (to service requests from the US
and the UK respectively) and have the registration URL for each include a
registration parameter, defined as a name-value pair, such as
ORIG_COUNTRY=<country code> (see the Oracle User Management section
of the Oracle Application System Administrators Guide – Security for details on
how to enable and setup midtier specific registration links and registration
parameter name-value pairs on the login page). Assuming the registration UI has
been coded in accordance to the standards defined in this document, the
ORIG_COUNTRY parameter value can now be used as a condition in your
approval routing metadata (or anywhere else throughout the registration
process), see the Approval Routing Rules section for details.
2. After clicking the registration link on the login page, the user is directed to the
registration process specified for the originating midtier/server, and:
a. The first page in the registration flow instantiates a BC4J Application Module
and reads the deployment / midtier specific registration parameters (name-value
pairs) that were part of the registration URL on the login page. These values, in
addition to the registration process code / unique identifier
(REG_SERVICE_CODE), are contained in the UMXRegParams parameter in
the HTTP request object
NOTE: Developers should not try to decipher the information held in the
UMXRegParams parameter as the structure and content is for internal use only.
Once the RegistrationBean (see next step) has been instantiated, all the
information is accessible through properties on this object.
f. The registration UI is displayed to the end user; the requester enters the
information required, and submits the request.
Page 6 of 31
At the end of each page in the flow, all information entered is validated through
the standard mechanism provided by the BC4J infrastructure through View
Objects and Entity Objects. Once the information entered by the requester has
been validated it is written to the RegistrationBean (instead of the database and
target schema) through the insertRow methods on the Entity Objects in the
registration flow.
g. The last page of the registration flow issues a commit call on the transaction
from the processFormRequest method of this page.
h. Any final validation is now executed, and under normal circumstances the
submitted information would be committed to the destination tables in the
database. Before the actual database commit happens, the BC4J framework
invokes the commit listener registered in step e) above. The commit listener
invokes some code provided by Oracle User Management, which:
iv. Reads all the registration data stored in the RegistrationBean as name-
value pairs.
v. Sets the name-value pairs into the event object instantiated in step i)
above.
vi. Raises a special business event that has the Oracle User Management
Registration Engine workflow process defined as a synchronous
listener. The event object is set at the payload of the business event, and
has now taken over the responsibility to act as the information store of
registration data (from the RegistrationBean).
3. The Oracle User Management registration engine is now responsible for processing the
registration request. Any activities that can be performed synchronously, up to the first
blocking / asynchronous activity (email notifications that require a response) will be
executed immediately.
Page 7 of 31
iii. The transaction is rolled back
b. If there are no errors and neither identity verification nor approval is required,
all the activities and steps performed by the Oracle User Management
registration engine are executed synchronously. Once the confirmation email has
been sent to the requester, control is returned back to the commit listener, and
the status in the RegistrationBean is updated to APPROVED. BC4J then issues
the actual database commit, which ensures that the registration process state is
stored in the database. The next line of code after the commit call (in the
processFormRequest method of the last page in the registration UI) can
interrogate the status in the RegistrationBean and forward to a confirmation
page.
c. If identity verification is required, all the activities and steps up to that point are
executed synchronously. The processing of the registration request proceeds
asynchronously as soon as the first blocking activity is encountered, but before
that control is handed back to the commit listener which sets the status in the
RegistrationBean to VERIFYING. BC4J then issues the actual database commit,
which ensures that the registration process state is stored in the database. The
next line of code after the commit call (in the processFormRequest method of
the last page in the registration UI) can interrogate the status in the
RegistrationBean and forward to a confirmation page.
d. Similarly, if identity verification is disabled but the request requires approval, all
the activities and steps up to the approval activities are executed synchronously.
The processing of the registration request proceeds asynchronously as soon as
the first blocking activity is encountered, but before that control is handed back
to the commit listener, which sets the status in the RegistrationBean to
PENDING. BC4J then issues the actual database commit, which ensures that the
registration process state is stored in the database. The next line of code after the
commit call (in the processFormRequest method of the last page in the
registration UI) can interrogate the status in the RegistrationBean and forward to
a confirmation page.
4. The first thing the Oracle User Management registration engine does is raise a business
event (either oracle.apps.fnd.umx.rolerequested or oracle.apps.fnd.umx.accountrequested) to
notify any subscribers that a request has been submitted. The event object with all the
registration data is set as the payload of the event.
Note: Only generic usage like auditing applications should be listening to this event.
5. A new password is randomly generated if the requester did not enter a password, the
password is then stored in the PASSWORD parameter of the event object.
6. The requested user name (from the REQUESTED_USERNAME parameter of the event
object) is now reserved in the Oracle Applications database. This ensures that no one else
can request this user name while the request is being processed.
7. If identity verification is required for the current request / registration process, the
notification business event (as defined in the registration process metadata) is raised with
the event object as payload, and:
Page 8 of 31
b. An email notification is sent out to the email address submitted as part of the
request (defined in the EMAIL_ADDRESS parameter of the event object). This
email notification can include any of the data stored in the event object.
ii. The previously reserved user name is released, which means it is now
available to anyone else.
8. The approval routing rules (if any) defined for the current registration process are
interrogated by invoking the approval routing engine provided by Oracle Approval
Management. If the request requires approval, the notification business event is raised
with the event object as payload.
b. An email notification is sent out to the approver (as specified by the approval
routing engine). This email notification can include any of the data stored in the
event object.
ii. The previously reserved user name is released, which means it is now
available to anyone else.
iii. The notification business event is raised for the final time with the
event object as payload:
i. Any changed or new data provided by the approver is set in the event
object.
Page 9 of 31
ii. The approval routing engine is invoked again to determine whether
anyone else needs to approve the request.
iii. A new email notification is sent to the next approver (and so on)
iv. Once final approval has been received, control is returned back to the
Oracle User Management registration engine, and processing continues
as defined below.
a. The code registered as a subscription to the business event (by the owner of the
registration process) is invoked.
b. The subscription creates a person party in TCA (and writes any additional
information related to the person party into the destination schemas).
10. The user account is activated and linked with the person party from the previous step.
11. If the request represents an account provisioning registration process, and if a business
logic event has been defined for the current registration process, it will be invoked with
the context of “AFTER ACCOUNT ACTIVATION” in the event attribute
UMX_CUSTOM_EVENT_CONTEXT. The owner of the registration process must
register a subscription to this event if any of the registration data require foreign keys to
the user account (such as profile options), and ensure that the information is written into
the target schemas.
12. The roles (if any) defined in the registration process metadata are assigned to the user.
13. The oracle.apps.fnd.umx.requestapproved business event is raised with the event object
as payload to indicate that the request has been approved. This event can be subscribed
by generic applications like auditing to keep track of registration requests.
NOTE: If your registration process is defined for additional access, the business logic
event in steps 9 and 11 above are not raised. You must therefore write any registration
data to the target schema by subscribing to the business logic event with the context of
“ROLE APPROVED”.
14. The notification business event is raised for the final time with the event object as
payload:
b. A confirmation email with user name and password is sent to the email address
provided by the requester.
Page 10 of 31
in each table. Please refer to the product specific documentation / API guides for more
information.
People
The Oracle Applications security system (and many other modules in the eBusiness Suite) has
from 11.5.10 and onwards standardized on the Trading Community Architecture (TCA) as the
central repository / storage place for personal information. Each person is defined as a party of
type “Person” (person party) in the HZ_PARTIES table, and is uniquely identified by the
PARTY_ID primary key column. TCA also supports storing phone numbers, addresses, and many
other things.
NOTE: TCA is not the source of truth of personal information for all applications in the eBusiness
Suite. As an example, applications such as Oracle Human Resources mainly use their own tables
for storing personal information, but also has code to denormalize the information into TCA from
the source schema - some exceptions exists (most person records in the Human Resource
application include a PARTY_ID foreign key to the denormalized person party in TCA). Please
refer to the application specific product documentation for more information.
External Organizations
External organizations are those your company has some sort of business relationship with,
whether they are a customer, partner, supplier, or something else. These organizations are stored in
TCA as parties of type “Organization” (organization parties) in the HZ_PARTIES table, and are
uniquely identified by a PARTY_ID.
Internal Organizations
Internal organizations such as Business Groups, Cost Centers etc are stored in the Oracle Human
Resources product schema. Oracle User Management has no dependency on these tables as of
11.5.10, but will leverage some of this data in an upcoming release.
User Accounts
In order to access the system each person must have a user account. User Accounts are stored in
the FND_USER table, and are uniquely identified by the USER_ID primary key. Each user
account must be linked to a person through the PERSON_PARTY_ID foreign key column in
FND_USER, with the exception of system accounts (such as the guest account).
NOTE: The FND_USER table includes three additional foreign key columns, EMPLOYEE_ID,
CUSTOMER_ID, and SUPPLIER_ID. Usage of these columns is discouraged, as they will be
made obsolete (now replaced by PERSON_PARTY_ID) in some future release. Defaulting logic
(to maintain backwards compatibility) exists, as some applications still require these columns to
be populated.
Each record in the FND_USER table must specify not only a user name, but also an email address.
The email address is required for sending email notifications (through workflow) to a user. The
Page 11 of 31
self-service “Forgot Password” functionality included in Oracle User Management is one of many
examples that rely on this information being defined and correct.
NOTE: Email addresses may be defined in several product specific tables, including but not
limited to TCA. Organizations must ensure that a person’s primary email address (from the source
tables), is also set for the user account.
Roles
Roles are assigned to users in order to grant them access to parts of the system; this can include
access to a given set of application pages/forms as well as a restricted set of data within those
pages.
Roles are stored in the workflow directory, identified by the NAME primary key column, and
accessible through the WF_ROLES view. Role assignment is also stored in the workflow
directory and can be accessed through the WF_USER_ROLES view.
Responsibilities
Responsibilities represent a special type of role that identifies the menu tree defined for a specific
application. Responsibilities are what end users see on the left side in the navigator after login.
The menu items accessible within each menu tree / responsibility are determined by the
permissions the user has been granted (through roles assigned to the user).
Responsibilities are stored in the FND_RESPONSIBILITIES table but denormalized as roles into
the workflow directory where they are identified by the NAME primary key column, and
accessible through the WF_ROLES view. Responsibility assignment is stored in the workflow
directory and can be accessed through the WF_USER_ROLES view.
Coding Guidelines
This section discusses the details of how to code registration pages. The coding standards are
identical for all registration pages, irrespective of the type of the registration process.
Note: Currently, Oracle User Management does not support registration pages based on Forms
technology stack.
Some generic steps to be following irrespective of the technology used to implement the
registration pages
1) Define functions / permissions representing the pages to be built (see the Oracle
Applications System Administrators Guide – Security for information on how to define
functions / permissions).
2) Create a permission set and add all the permissions representing your registration pages
to this set.
NOTE: This is only required for permission sets that contain permissions/functions
representing registration UI’s for self service account requests.
Page 12 of 31
4) Also grant the permission set to the “GLOBAL” role (a role implicitly representing all
users, except the GUEST account).
With Oracle User Management you must write your pages according to the standards provided for
OA Framework development, with some Oracle User Management specific tweaks.
EOs are normally designed to write data into database tables upon commit (or call API’s with the
same function). Since registration data should not be written into the destination schema until each
request is approved (to avoid garbage data in your production tables), you will instead have your
EOs write the information collected in the registration UI into a RegistrationBean object, a helper
class provided by Oracle User Management.
import oracle.apps.fnd.umx.registration.RegistrationAdmin;
7) In the processRequest method of the controller associated with the first page of your
registration UI, call the API defined above, and pass the UMXRegParams parameter
available in the pageContext object
Page 13 of 31
import oracle.apps.fnd.umx.registration.RegistrationAdmin;
8) The destination of any “Submit” and “Cancel” buttons in your registration UI should be
based on information available in RegistrationBean. When user clicks on the “Submit”
button, user should be forwarded to the URL retrieved from the method
RegistrationBean.getSuccessURL(). Similarly, when user clicks on the cancel button,
user should be forwarded to the URL retrieved from the method
RegistrationBean.getCancelURL();
NOTE: If you are building registration UI’s you must ensure you forward to the
originating or target page after the request has been submitted (or cancelled). The
originating / target pages can be the Oracle User Management Access Requests page, the
User Administration UI, the login page, or your own pages.
9) All your Entity Objects and View Objects should be coded as per the OA Framework
standards, but with a subtle difference; the information captured in the registration UI
should be set into the RegistrationBean from the insertRow method of your EOs. The
RegistrationBean object instance can be retrieved from the transaction cache by calling
RegistrationAdmin.getRegistrationBean.
NOTE 2: The values that set in the RegistrationBean must be defined as strings and in
canonical format. The class oracle.apps.fnd.framework.OANLSServices has necessary
methods to convert your native datatypes to strings in canonical format.
import oracle.apps.fnd.umx.registration.RegistrationAdmin;
import oracle.apps.fnd.umx.registration.RegistrationBean;
Page 14 of 31
regBean.setFirstName(getPersonFirstName());
regBean.setMiddleName(getPersonMiddleName());
}
10) You are not allowed to commit any data before the end of a registration flow, this would
invoke the commit listener prematurely. All the data in the entire flow must be committed
as a single unit.
11) In the processFormRequest method of the final page in the registration flow, add a call to
getOADBTransaction().commit().
When this code is invoked, the BC4J framework will invoke the previously registered
commit listener. See the Registration Architecture section for more information on what
goes on in this method. If this process generates an exception, all the data (including
Workflow) will be rolled back. If you are catching an exception while committing the
data, you need to issue an explicit rollback.
After calling commit, if everything went well and no exceptions were raised, get the
confirmation number and status of the request from the registration bean. Forward to a
confirmation page and display the status accordingly.
12) You can find out if identity verification is required or not by calling the
getIdentityVerificationReqd() method in the RegistrationBean. You may want to indicate
to the user that the request will not be processed until an email response has been
received.
13) Ensure you define subscriptions to appropriate business events raised by the Oracle User
Management registration engine. Your subscriptions will be invoked after the request has
been approved. Ensure that the subscription logic reads the registration data stored in the
event object and writes it to the destination schemas / tables. See Subscribing to Business
Events & Handling Registration Data for detailed information on the business events you
must subscribe to and how to define your subscription logic.
Coding “OA Framework Independent” Self Service Account Request Registration Pages
Oracle User Management is designed primarily for the OA Framework; the following are some
general guidelines if you are coding your self-service account request registration pages using
some other technology (for example: jsp). These are general guidelines only and not explicitly
supported:
2. You need to retrieve the UMXRegParams parameter from the HTTP request object on the
first page of the flow.
Page 15 of 31
4. Just before you commit your data in the last page of the registration flow, call the
RegistrationAdmin.processRegistrationRequest method. If you get an exception during
this call, you must rollback all of your changes.
6. Ensure you define subscriptions to appropriate business events raised by the Oracle User
Management registration engine. Your subscriptions will be invoked after the request has
been approved. Ensure that the subscription logic reads the registration data stored in the
event object and writes it to the destination schemas / tables. See Subscribing to Business
Events & Handling Registration Data for detailed information on the business events you
must subscribe to and how to define your subscription logic.
The Oracle User Management registration engine raises business events to signify starting or
completion of several significant activities. An event object holding all the registration data is
defined as the payload for the business events and available to the subscribers (see the Registration
Architecture section for more information). The following is a list of business events that are
raised by Oracle User Management:
Oracle User Management Workflow Business Events
Event Description
oracle.apps.fnd.umx.rolerequested Event raised when a role is requested.
oracle.apps.fnd.umx.accountrequested Event raised when an account is requested.
oracle.apps.fnd.umx.requestapproved Event raised when an account or role request is approved.
oracle.apps.fnd.umx.requestrejected Event raised when an account or role request is rejected.
<business logic event, if defined> with Event raised in additional access flows
the context “ROLE APPROVED”
NOTE: If your registration process is defined for additional
access, the oracle.apps.fnd.umx.createpersonparty event (defined
below) is not raised. You must therefore write any registration
data to the target schema by providing subscribing logic for this
event..
<business logic event, if defined> with Event raised in account provisioning flows to get a person party
the context “BEFORE ACCOUNT created in TCA.
ACTIVATION”
NOTE: The owner of the registration process must register a
subscription to this event and create a person party in TCA. Any
other registration data that can be written to the destination
schemas without requiring an active user account should also be
handled by the subscription logic (such as organization
relationships or any other information related to the person
party).
NOTE: Once the person party has been created, the subscription
must update the event object with the person party id by setting
the PERSON_PARTY_ID name-value pair (see code sample
below). Once the person party is available in the event object, the
Oracle User Management registration engine will activate the
user account and link it with the person party.
<business logic event, if defined> with Event raised in account provisioning after user account has been
the context “AFTER ACCOUNT created.
ACTIVATION”
NOTE: The owner of any account provisioning registration
processes must register a subscription to this event if any of the
registration data require foreign keys to the user account (such
Page 16 of 31
as profile options), and ensure that the information is written into
the target schemas.
The Oracle User Management registration engine automatically populates the event parameters
listed in the following table when business events are raised. Any additional information captured
in the registration UI, approval notifications, or programmatically through business logic are also
defined as event parameters.
Oracle User Management Business Event Parameters
Name Description
REG_SERVICE_CODE Represents the primary key of the registration process
REG_SERVICE_TYPE The type of registration process
REQUESTED_BY_USER_ID Identifies the user submitting the request
REQUESTED_FOR_USER_ID Identifies the user for whom the request is submitted
REQUESTED_USERNAME The requested user name
WF_ROLE_NAME* Represents the primary key value of the requested role (or the default
role defined for any account provisioning registration processes)
AME_TRANSACTION_TYPE_ID Represents part of the primary key for the transaction type in
Oracle Approval Management
AME_APPLICATION_ID Represents part of the primary key for the transaction type in Oracle
Approval Management
*WF_ROLE_NAME is not required for Self Service Account Creation or Account Creation for Administrators registration
processes. In such cases, a null value is passed. Any additional information captured in the registration UI, from
approvers, in approval notifications, or set by business logic are also available as parameters in the event object whenever
any of the business events defined above are raised by Oracle User Management.
So to repeat, anyone building their own registration processes must ensure that they define the
business logic events and provide subscriptions to the appropriate business event(s) and write
registration data held in the event object to the destination schema for each approved request.
Specifically, this entails subscribing to the custom business logic events, defined/owned by
product teams owning the registration process. Also refer to the Registration Architecture section
for detailed information on the flow of events.
An example of where synchronous processing is required is subscriptions for the business logic
event. These subscriptions must be synchronous since the Oracle User Management registration
engine requires a person party to be created before processing can continue. Synchronous
subscriptions to business events have performance impact and may slow down the overall
processing. Any exceptions that may occur in the asynchronous events will not be propagated
back to the registration engine and will be ignored, although the system administrator is notified of
any such failures and can take action. For general information on how to register a subscription
and handle business events, please refer to the Oracle Workflow Administrator's Guide.
begin
// Only do something if the context is appropriate.
L_event_context := p_event.getvalueforparameter ('UMX_CUSTOM_EVENT_CONTEXT');
Page 17 of 31
if l_reg_process = ‘BEFORE ACCOUNT ACTIVATION’ then
// get first and last name from the event object, the most common
// parameter names are predefined in the RegistrationBean, but
// custom parameters are also supported
l_first_name := p_event.getvalueforparameter ('FIRST_NAME');
l_last_name := p_event.getvalueforparameter ('LAST_NAME');
1. Copy one of the sample notification workflows provided by Oracle User Management:
Example of Notification
Page 18 of 31
Workflow:
When defining your notification workflows, there are a couple of questions you should
ask yourself:
2. Add any item attributes you want to display in the email notifications. If the values for
these attributes were captured in the registration UI, ensure that the name is exactly the
same as the name-value pairs originally set in the RegistrationBean (and later in the
event object).
3. Change the notifications as per your requirements. A few notes:
a. Only make the absolutely minimum changes required in your copy of the
notification workflow. Everything is there for a reason; so don’t mess with
things unless you have a very good reason to!
The only activities you should change are the notifications within the red
rectangle in the diagram above (notify approver, verify the requesters identity,
request approved notification, request rejected notifications). You can add
activities before and after each of these activities although you must ensure that
the general flow is kept intact.
b. Since each organization and deployment has their own unique requirements,
each notification workflow must be designed to support identity verification,
approval, confirmation, and rejection email notifications.
Page 19 of 31
c. All the data that was collected during the registration flow will be passed to the
notification workflow as part of the event object; this includes any server /
deployment specific registration parameters part of the registration URL
wherever the request was initiated from.
Any item attributes that have the same name as a parameter stored in the event
object will automatically be populated with the corresponding value. Please
refer to the Subscribing to Business Events & Handling Registration Data
section for information regarding what parameters are populated automatically
in the event object by Oracle User Management.
d. If your notifications allow the recipient to provide new (or alter existing)
information, you need to ensure that the changes are reflected in the event
object (so that the information is available in later steps in the registration
flow). The following is some pseudo code for the custom activity Modify Event
Object in the diagram below, this activity updates the event object with security
clearance information provided by the approver.
Page 20 of 31
// get the value of the wf attribute, see workflow API doc for up to date info
// on how to retrieve attribute values
l_param_value := wf_engine.getItemAttrText(item_type, item_key, actid,
l_param_name);
// Now set the changed/new name-value pair into the event object,
// so it is available to any subsequent logic
wf_event.addParametertoList(l_param_name,l_param_value,l_parameter_list);
end;
e. The notification workflows already include all code required to pass both status
and any changed or new parameter values in the event object back to the User
Management registration engine.
4. Register a new business event (see the Oracle Workflow Business Event documentation
for details) that will be used to invoke your notification workflow.
NOTE: The OWNER_NAME field of the business event must begin with “UMX:”
followed by the name of your application, for example: “UMX: Oracle Learning
Administration”. It is important to follow this naming convention as the registration
process setup UI only displays business events following this convention.
5. Update your registration process definition (through the User Management Registration
Process setup screen) and define the business event created in the previous step as the
“Notification Event”.
6. Register your notification workflow as an asynchronous subscription (phase > 99) to the
business event defined in the previous step
Overview
Each organization will have different requirements in regard to what registration requests require
approval, and who should approve each request. Oracle User Management integrates with Oracle
Approval Management which provides a rule-based engine that determines the flow of the
approval process.
This section provides guidelines for how conditions defined in Oracle Approval Management can
be based on information captured in the registration flow (information stored in the event object
for the request). Please refer to Oracle Approval Management documentation for general
guidelines on how to setup conditions and approval chains.
In the following example, a set of approval routing rules will be defined (a.k.a. Approval
Transaction Type) in which a request will be routed to a country specific approver
Page 21 of 31
(US_APPROVER or UK_APPROVER) based on the ORIG_COUNTRY parameter defined as
part of the registration URL on the login page.
c. Create a new non-mandatory attribute “ORIG_COUNTRY” with no static usage for this
transaction type, and enter the following SQL into the usage area:
select umx_pub.get_attribute_value(:transactionId,
'ORIG_COUNTRY');
NOTE: The :transactionId parameter is set by the Oracle User Management registration
engine at runtime, and corresponds to the ITEM_KEY of the notification workflow.
NOTE: The second parameter, in this case ORIG_COUNTRY, can be any parameter
name set in the RegistrationBean / event object.
d. Create the following two conditions using the attribute “ORIG_COUNTRY” created in
the previous steps.
condition_for_US_requests
ORIG_COUNTRY = US
condition_for_UK_requests
ORIG_COUNTRY = UK
rule_for_US_requests
if (condition_for_US_requests)
then approver = 'US_APPROVER'
rule_for_UK_requests
if (condition_for_UK_requests)
then approver` = 'UK_APPROVER'
f. Oracle Approval Management transaction types can be associated with any registration
process, once they are defined in the system. Please ensure that the Transaction Types
are specifically designed to work with Oracle User Management before selecting them.
See the Setting Up Registration Processes section of the Oracle Applications System
Administrators Guide – Security for more information.
NOTE:Please contact the Oracle User Management Development team for information on how to
extract Roles, Role Inheritance Hierarchies, Role Categories, Grants, Permission Sets,
Permissions, and Registration Processes. This type of seed data must be reviewed and approved
before shipped to customers.
Page 22 of 31
5. User Name Policy – Administration and Customization
Overview
Oracle User Management supports customizable user name policy. A user name policy is used to
determine the format for the username e.g. email or firstname.lastname or based on some business
logic specific to the installation.
The user name policy infrastructure enables to display the policy related information in UI,
generate a suggested user name and validate the user name format
Before the user registration page with the user name field is rendered, the registration UI invokes
User Management public APIs to get the suggested user name.
The API to get suggested user name raises a Workflow Business Event named
oracle.apps.fnd.umx.username.generate with the person party ID from the HZ_PARTIES table.
The current implementation requires that person party id is present.
Only one valid synchronous subscription listens to this event. The subscription will generate and
return the suggested user name. In case the user name cannot be generated, the subscription
returns a null value. The provisioning UI that invokes this API should account for the null value
and handle it appropriately.
Work In Progress
Disclaimer
The suggested user name generation component of the user name policy has been
implemented by Oracle User Management provisioning flows – “Employee Registration” and
“Create Account for Existing Person”. Other products in Oracle Applications Suite may not
have implemented this component of the user name policy. Customers can create their custom
policy, but the behavior in the other flows is not known at this time.
Page 23 of 31
User Name Policy Descriptions
To help the display of appropriate field names in various registration flows, the user name policy
descriptions allow for three types of descriptions for the User Name Policy.
• Policy Description describes the defined policy. For example: “User Names must be
based on Email Address”. This statement can be displayed as a quick tip section in the
user account registration page.
• Prompt is the word being displayed next to the user name text input field as illustrated
below
• Hint gives an example of what the format of the user name should be. It could be
displayed as a tip text of the user name text input field in the UI. The Hint displayed in
the example above is “example: michael@email.com”.
These descriptions are stored in a FND lookup. Each policy has a lookup associated with it. These
lookups have to be defined with the prefix of “UMX_USERNAME_POLICY:” and should
consist of three lookup codes DESCRIPTION, PROMPT and HINT. The “Meaning” field within
the lookup contains the actual value for each of the policy descriptions.
The profile option UMX: User Name Policy (UMX_USERNAME_POLICY), defined at site
level stores the name of the lookup type of the descriptions for the current policy.
Work In Progress
Disclaimer
Page 24 of 31
The user name policy descriptions component of the user name policy has been implemented
by Oracle User Management provisioning flows. Other products in Oracle Applications Suite
may not have implemented this component of the user name policy. Customers can create
their custom version, but the behavior in the other flows is not known at this time.
The API to create a new user or test user name ( TestUserName() or createUser() in
FND_USER_PKG) raise an event oracle.apps.fnd.user.name.validate. The user name format is
validated as part of the subscription for this event.
Oracle User Management ships a sample synchronous subscription that will contain email address
as the policy. The function for the sample validation subscription is
FND_USER_VALIDATION.Custom_Validation.
Work In Progress
Disclaimer
If enabled, user name validation is enforced through the central user provisioning APIs for all
of Oracle Applications Suite.
The user name validation component of the user name policy has been certified with Oracle
User Management provisioning flows and by some of the CRM product teams like
iRecruitment and Service Contracts at this time. Additional patching may be required from
these products. Custom validation polices created by customers can throw exceptions which
will be handled gracefully in these UI provisioning flows.
Other products in Oracle Applications Suite may not have implemented this component of the
user name policy in their provisioning UI flows. Validation exception handling behavior in
such flows is not known at this time.
The Oracle User Management registration infrastructure supports a configurable user name policy.
This policy is used to generate a suggested user name in the sample user creation flows shipped
with the application, as well as for validating the chosen user name format.
Note: Oracle User Management is shipped with a default policy that identifies users by their email
address.
The following table lists the seeded user name policies that are shipped with Oracle User
Management.
Page 25 of 31
Code Description
UMX_USERNAME_POLICY:EMAIL_ User name policy with email
ADDRESS address format defined as the
policy.
UMX_USERNAME_POLICY:NONE User name policy with no
restriction on username format
Administrators can configure either of these seeded policies. In addition to these, custom policies
can also be implemented if desired. The process to create new policy is described in the next
section.
1. Log on as a user that is assigned the Workflow Administrator Web Applications responsibility
(typically sysadmin).
3. From the Business Events page, search for the Business Event with the name
oracle.apps.fnd.umx.username.generate
5. For the subscription corresponding to the policy to be enabled, change the status to “Enabled”.
Note:
• Please ensure that only one subscription is enabled for this event. For all the other
subscriptions, change the status to disabled.
3. Search with the Profile Name of UMX: User Name Policy in the Maintain Profile Options
page.
5. Choose a value corresponding to the policy to be enabled and click on the Apply button.
1. Log on as a user that is assigned the Workflow Administrator Web Applications responsibility
(typically sysadmin).
Page 26 of 31
2. Go to Workflow Administrator Web Applications > Business Events
3. From the Business Events page, search for the Business Event with the name
oracle.apps.fnd.user.name.validate
5. For the subscription corresponding to the policy to be enabled, change the status to “Enabled”.
Note:
Additional Requirements
• For all the three of the stages above, the values set must generally correspond to the same user
name policy.
• The Listener and JVMs must be restarted after the user name policy is changed.
To create a user name policy, any or all of the three components can be implemented, based on
business requirements.
Oracle User Management ships a sample subscription for this event. This sample subscription
generates a suggested user name based on the email address of the person.
1. Implement a policy subscription function as a PL/SQL function. The sample given below
can be used as a starting point.
Note: Since UI could rely on the output of the subscription for render, the subscription function
needs to be synchronous and have good performance.
Page 27 of 31
l_username fnd_user.user_name%type;
begin
UMX_REGISTER_USER_PVT.Get_Party_Email_Address (
p_person_party_id => p_event.getValueForParameter ('UMX_PERSON_PARTY_ID'),
x_email_address => l_username);
return 'SUCCESS';
end policy_subscription;
2. Register the subscription function created in step above as the synchronous subscription
for the event oracle.apps.fnd.umx.username.generate. To register the subscription
o From the Business Events page, search for the Business Event with the name
oracle.apps.fnd.umx.username.generate
o Click “Next” and define your PL/SQL Rule Function created in step 1 above
here
Page 28 of 31
o Click “Apply”
• Create three lookup codes in this lookup with the codes – PROMPT, DESCRIPTION and
HINT and set the lookup meaning to appropriate values
• Set the profile option UMX: User Name Policy to point to this new lookup created in
step above.
Error handling, in case of user name is not in a valid format, is done as:
2) Set a message into the FND message stack that describes the reason the validation failed.
Unlike suggested user name generation, there could be more than one active subscriptions
listening to the event to validate the user name format as long as the subscriptions do not have
conflict in terms of the policy.
l_username fnd_user.user_name%type;
begin
l_user_name := p_event.getEventKey();
l_dot_pos := instr( l_user_name, '.');
l_at_pos := instr( l_user_name, '@');
l_str_length := length(l_user_name);
if (
Page 29 of 31
(l_dot_pos = 0) or
(l_at_pos = 0) or
(l_dot_pos = l_at_pos +1 ) or
(l_at_pos = 1) or
(l_at_pos = l_str_length) or
(l_dot_pos = l_str_length)
)then
-- setting error message on the stack so that it can be displayed
-- by the calling code
WF_EVENT.setErrorInfo(p_event,'ERROR');
FND_MESSAGE.SET_NAME('FND','FND_INVLD_EMAIL_FRMT');
-- we are raising an app exception since Fnd_user_pkg.validate
-- expects an exception.
app_exception.RAISE_EXCEPTION;
end if;
return 'SUCCESS';
end policy_subscription;
If needed, a custom policy subscription can be created for validating the user name format. To
create a subscription for the event oracle.apps.fnd.user.name.validate, follow the steps outlined
in the Suggested User name section above.
Page 30 of 31
6. Appendix A: Java Doc
Java doc for Oracle User Management is available at the online integration repository. Here are
the steps to access the repository.
• Go to http://irep.oracle.com
• Click on the various entities to view the available methods/classes associated with them
Page 31 of 31