Search This Blog

Thursday, April 14, 2011

First Responder wins Approval in Oracle SSHR AME

First Responder wins Approval in Oracle SSHR AME:

Requirement - My client requirement is once personal details are updated through self-service page, it should go to HR for approval. As of now I am able to send notification to one person in HR dept. Now I want notification should go to many HR people and one first person approves it, request should get approved. If no one is taking action within three working days then it should get rejected. Please let me know how this can be achieved. Steps:
1.       Login by SYSADMIN
2.       Go to Approval Manager Administrator -> Configuration Variables -> Select Transaction Type - Oracle Self Service Human Resources -> Allow All Approver Type Set to Yes  Both Default and Transaction Type
3.       Go to Approver Type Quick Link and Add PQH_ROLE there i.e. Position Control Roles
4.        Define Roles: Using HRMS Manager Responsibility define roles and assign the Person names to the roles that are part of an approver group. For each approver group for which parallel notification is required, define a corresponding role in the Maintain Roles form with the same members assigned to the role as in the approver group.
Navigation: HRMS Manager responsibility -> Transaction Maintenance ->Roles -> Maintain
Roles -> Users
5.       Approver Group set up:
Using Approvals Management Business Analyst responsibility within AME, select the
Transaction Type and define attributes/conditions as required for the business case. Define the Approver group with Voting regime ‘first-responder-wins and add the Roles defined in Step 1

6.       Approver group members with Approver Type ‘Position Control Roles’. Add those roles to which the corresponding group members were assigned whom we want to be the members of the approver group. Give order number for the roles so that if we are using multiple roles/groups for approval, the members of each of role will be notified based on the order number assigned to the roles. Define Approval Rule with action type set to require approval from the approver groups. Navigation: Approvals Management Business Analyst responsibility -> Business Analyst Dashboard -> Select Transaction Type -> Define Attributes -> Conditions ->Define Approver Groups -> Add Group Members (Roles) ->Define Rule
 7.     In Action Type – Ordering Mode – Parallel and Voting Method -> First Responder Wins

Reference - http://www.scribd.com/doc/38609690/Whitepaper-Parallel-Approvers-Notification

11 comments:

  1. Can you please tell me if I want query for dynamic approval instead of the hard coded values, then how can I do it?

    ReplyDelete
  2. Dear Varun,
    1. Create one database function and call it in approval group of AME. Pass :transactionId as parameter.

    I am pasting the sample code:
    FUNCTION find_old_dept_manager(p_transaction_id IN NUMBER)
    RETURN NUMBER
    IS

    ln_user_id number;

    BEGIN
    SELECT usr.user_id
    INTO ln_user_id
    FROM per_people_extra_info pei,
    per_all_people_f ppf,
    fnd_user usr,
    pqh_roles rls
    WHERE information_type = 'PQH_ROLE_USERS'
    AND pei.person_id = ppf.person_id
    AND TRUNC (SYSDATE) BETWEEN ppf.effective_start_date
    AND ppf.effective_end_date
    AND usr.employee_id = ppf.person_id
    AND rls.role_id = TO_NUMBER (pei.pei_information3)
    AND rls.role_name =
    (SELECT hatv.original_varchar2_value
    FROM hr_api_transactions hat,
    hr_api_transaction_steps hats,
    hr_api_transaction_values hatv
    WHERE hat.transaction_id = hats.transaction_id
    AND hats.transaction_step_id = hatv.transaction_step_id
    AND hatv.NAME = 'P_ORG_NAME'
    AND hat.transaction_id = p_transaction_id);

    RETURN ln_user_id;
    EXCEPTION
    WHEN OTHERS
    THEN
    SELECT user_id
    INTO ln_user_id
    FROM fnd_user
    WHERE user_name = 'SYSADMIN';

    RETURN ln_user_id;
    END;

    ReplyDelete
  3. We have a requiremnt to send parallel approval to dynamic approvers and First Responder wins. As per your blog we need to hardcode the person in the role but in our requiremnt person in the role should be dynamic. I understand we can't add persons dynamically too a role. So is it possible to send parallel approvals to more than one person derived using a SQL.

    ReplyDelete
  4. Oracle is gonna support parallel approval in SSHR through "first responder win" voting from next release (12.1 RUP5) and R12.2 onwards.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. I've raised today SR and they are saying that it is still under Enhancement Request !!!

      Delete
  5. Thank you Sandip & Anonymous for your valuable inputs, actually I am facign the same issue for paralell approval and I've defined new roles as per your notes above but I am not able to see it in AME when I am defining a new action type and approal group !!!
    Can you pls help me in this !!
    I apprecciate mailing me directly on akr1967@yahoo.com
    Thanks in advance
    BR
    Akram

    ReplyDelete
    Replies
    1. I could see it now and it is working fine..
      Thanks
      Akram

      Delete
  6. I have tried these steps and after I have tried the ame it has gave me an error:
    Error in Workflow EAMWPREL/5018 398: Invalid user name 'PQH_ROLE:3'

    do you know what is the problem ?!

    ReplyDelete
  7. Hi Sandip,

    Nice document , I followed the same step to achieve and I ahve one problem while creating Rule and in Add action by default only one value (supervisory level) is appearing , I am not able to select Approval - group chain of authority.
    Is there any other setupe needs to be done for this. Kindly help me.

    Regards,
    Guru

    ReplyDelete