SSHR Rollout Create FND_USER and Allocate Responsibilities

Every organization that rolls out any Oracle Self Service Application requires a methodology to allocate responsibilities and to create Users.

The pseudo code example taken here has following requirements:-
1. Create a concurrent program, passing to parameter for one Cost Centre/Group or all Cost Centres.
This way, Self Service can be rolled out in Phased manner.
2. Besides a parameter for the cost centre, there will be another parameter to run the process in a Read-Only mode.
3. There are two possibilities for the Employees which are eligible(given their cost centre).
    Possibility a. The employee already has an existing FND_USER record
    Possibility b. The employee does not have an existing FND_USER record.

Solution for Possibility a. 
    Identify the FND_USER record, using the fnd_user.employee_id  = per_all_people_f.person_id
    Use fnd_user_resp_groups_api.insert_assignment to add new Self Service responsibility to that User.
    Send the user an Email giving them details of the responsibility that has been added.

Solution for Possibility b.
    Create an FND_USER record, using the fnd_user_pkg, attaching this to Person Id.
    Use fnd_user_resp_groups_api.insert_assignment to add new Self Service responsibility to that User.
    Send them an email to inform the User-Id and Password along with instructions to log on & use the application.


Questions & Answers 
How do I create a 8 digit password for FND_USER record?
FUNCTION get_random_password RETURN VARCHAR2 IS
BEGIN
         RETURN lower(dbms_random.STRING('X',8));
END get_random_password;

We  want users to be enforced to alter their password every 6months, how to ?
Use parameter x_password_lifespan_days
fnd_user_pkg.createuser
(
    x_user_name => p_user_name
   ,x_owner => ''
   ,x_unencrypted_password => v_password
   ,x_description => p_person_description
   ,x_password_lifespan_days => 180
   ,x_employee_id => p_person_id
   ,x_email_address => p_email_address
);


The random password that is generated might have repeating characters, which will error if Profile "Signon Password Hard To Guess" is Set to Yes?
You can temporarily set the profile to N in the session during which concurrent program runs.
fnd_profile.put(NAME => 'SIGNON_PASSWORD_HARD_TO_GUESS' ,val => 'N');


Should I use Workflow to inform users?You might as well use SMTP. Be careful  that on Dev environment  business  users do not receive Emails.
This can be ensured by checking return of select instance_name from v$instance  to be PRD Database.
You can use procedure send_html_email in the Code Sample in link provided in the article.


Can I run the source code as is?
The source code provided is for allocating a responsibility named "XX HR Employee Self Service".I have removed all the  client specific bits from the code. Hence you will need to alter to make this to be of any use. The idea is to merely provide you a guideline for API Usage.

No comments:

Post a Comment

How to find all cancel Requisitions

SELECT prha . *   FROM po_Requisition_headers_all prha , po_action_history pah   WHERE      1 = 1        AND pah . object_id ...