This content has been marked as final. Show 11 replies
To clarify, do you require the element type to end after 3 months of the effective start date, or do you require the element entries to end 3 months after the entry start date? If it's the latter, and you are running payroll, you could easily do it using a formula (or a change to the existing formula if there is one already against that element)
If you really want to do it programatically like through pl/sql, then use pay_element_entry_api.delete_element_entry (with a date-track mode of 'DELETE') - the entry will then be end-dated as at the supplied p_effective_date value.
There are ways to execute formulas via a standard Oracle pl/sql wrapper, but I suspect stop rules won't work. It may be possible to do such a thing via OAB, unfortunately I don't know enough about OAB to be able to say with any confidence.
Assuming OAB wouldn't allow this, then it sounds like you need a piece of custom pl/sql to run every month so as to end date any that are 3 months old, using the api I mentioned earlier. You could of course schedule that to run via concurrent manager at some convenient time of the day.
Requirements are: new employees have to have an element assigned for three month only.
HR admins do not want to enter non-recurring elements for three month. Because it's hard to maintain they want to assign or enroll person once and end date it automatically in three month.
There are other ways of doing it as well -
1.You can write a user hook on Element Entries, and whenever you create this element entry, you can end-date it at the same time(with end-date = start_date + 90 days). This way you wont have to write another process which runs every day.
2. If you were running payroll, then you can check if the date range matches and then insert the non-recurring element(for the first 3 months).
might be other options, based on what your requirements are..
You can achieve this via OAB.
1. Create a derived factor with the 3 Months criteria[Eg. Period of Service <= 3 Months]
2. Create a Eligibility Profile with the above derived factor
3. Attach the above eligibility profile to a plan with option
4. Create a Standard Rate for the option in plan
So after 3 months the Plan will become ineligible and element entries will not be created for this plan.
Hope this was your query and I have clarified the same.