We are migrating into OTL from Selfservice time for Projects.
Oracle has given extension paroutingx.route_to_extension to do so.
PROCEDURE route_to_extension (
x_expenditure_id IN NUMBER,
x_incurred_by_person_id IN NUMBER,
x_expenditure_end_date IN DATE,
x_exp_class_code IN VARCHAR2,
x_previous_approver_person_id IN NUMBER DEFAULT NULL,
p_timecard_table IN pa_otc_api.timecard_table
p_module IN VARCHAR2 DEFAULT NULL,
x_route_to_person_id OUT NUMBER
In OTL, there is an approval style called "Project Manager". It routes the timesheet into project manager.
if the resource entered three different projects in in the same timecard, OTL sends the approval to three different project managers automatically.
Here we need to send the notification to Line manager if the uses "Admin" Project type.
User Xavier entered the timesheet using the Project code "X","Y","Z". X and Y are Client Projects and Z is Administrative Project.
If he submits, OTL sends notific ation to Project managers of X,Y and Z. But we need X and Y should go to their Projects and Z should go to Line Manager.
In OTL Document, Oracle has provided the client Extension to do so.However there is no documentation /examples to do this.
You should be able to use this extension. By having expenditure_id, find out the project id for that expenditure. Then based on the project type, get the person_id of the person whom you want to send the approval from per_all_people_f table and assign it to x_out_person_id.
For a given timecard, the project_id is checked against the project for the project manager id (from pa_project_players) and the project manager id is the person_id in per_all_people_f and you can get the full_name from there.