Sunday, April 27, 2008
Restartable Application engine and Global Variables in Peopleocode
In addition to state record, variables defined in Peoplecode as Global variables are also saved in the database.
Application Engine Commits
At my work, I realized that while application engines were being created, people did not know exactly how commits work in application engine.
I therefore set out to undertand application engine commits better. Here is what I have figured out so far:
If you create a new App. Engine program and do nothing for handling commits, the ae is automatically configured to commit after the application engine completes. This means that if the program aborts, everything is rolled back. It also means that there is additional burden on the database to keep track of uncommitted data.
However, there are settings at the section and step level that can be used to commit at specific points in time in the program.
An understanding of the commits is helpful.
1. At Section Level :
1. Turn on commit after step to get AE to commit after every step in that section.
2. Commit even n rows: Foe sections that contain do while, do until and do select, set the
commit frequency to commit after every n rows. The commit fired here is in addition to
commits fired in the loop.
Restriction: For Action of Do Select of type select/fetch where the restart is enabled, the
commits within the loop is ignored.
2. At Step
1. Default: based on the setting at the section.
2. After Step : To override the setting at section and commit after the step completes.
3. Later: To override the setting at section and not commit after step. ( when at section, you
have defined for commit after step. )
I therefore set out to undertand application engine commits better. Here is what I have figured out so far:
If you create a new App. Engine program and do nothing for handling commits, the ae is automatically configured to commit after the application engine completes. This means that if the program aborts, everything is rolled back. It also means that there is additional burden on the database to keep track of uncommitted data.
However, there are settings at the section and step level that can be used to commit at specific points in time in the program.
An understanding of the commits is helpful.
1. At Section Level :
1. Turn on commit after step to get AE to commit after every step in that section.
2. Commit even n rows: Foe sections that contain do while, do until and do select, set the
commit frequency to commit after every n rows. The commit fired here is in addition to
commits fired in the loop.
Restriction: For Action of Do Select of type select/fetch where the restart is enabled, the
commits within the loop is ignored.
2. At Step
1. Default: based on the setting at the section.
2. After Step : To override the setting at section and commit after the step completes.
3. Later: To override the setting at section and not commit after step. ( when at section, you
have defined for commit after step. )
Saturday, April 19, 2008
Additional Pay
Continuing my previous post, when does P/S give addional pay ?
1. EFFDT should be less than or equal to the PAY END DT on pay calendaer.
2. END DATE should fall after the Pay begin date. Note that this is different from general deduction where the deduction end date is compared against the pay end dt.
1. EFFDT should be less than or equal to the PAY END DT on pay calendaer.
2. END DATE should fall after the Pay begin date. Note that this is different from general deduction where the deduction end date is compared against the pay end dt.
When to take general deduction
There are so many dates in peoplesoft that it is difficult to understand the relationship between all those dates.
For e.g. when does P/S take general deductions configured for en employee?
This depends on the following:
1. effective date of the general deduction record setup.
2. whether the general deduction has a deduction end dt ornot.
3. pay end dt of the pay calendar for which the employee isbeing paid.
Payrollprocess compares only the following dates
1. Pay end dt on the Pay calendar.
2. Effdt on the general deduction table.
3.deduction end date on the generaldeduction table is it is populated.
Itlooks for a gen deduction table maexeffdtd row less than or equal to the pay end dt.
If the row does not have a deduciton end dt or the deduction end dt falls after or on the pay end dt,it takes the general deduction.Deduction is not prorated.
Other dates like pay period begin date and check date do not matter.
However, it is worth mentioning that if an employee is terminated during a pay period ( a job row wiht effdt ( and action which terminates the employee ) between the pay begin date and pay end dt , then based on whether the dedcd has been setup to stop deduction when employee is terminated, the deduction is stopped or taken.
For e.g. when does P/S take general deductions configured for en employee?
This depends on the following:
1. effective date of the general deduction record setup.
2. whether the general deduction has a deduction end dt ornot.
3. pay end dt of the pay calendar for which the employee isbeing paid.
Payrollprocess compares only the following dates
1. Pay end dt on the Pay calendar.
2. Effdt on the general deduction table.
3.deduction end date on the generaldeduction table is it is populated.
Itlooks for a gen deduction table maexeffdtd row less than or equal to the pay end dt.
If the row does not have a deduciton end dt or the deduction end dt falls after or on the pay end dt,it takes the general deduction.Deduction is not prorated.
Other dates like pay period begin date and check date do not matter.
However, it is worth mentioning that if an employee is terminated during a pay period ( a job row wiht effdt ( and action which terminates the employee ) between the pay begin date and pay end dt , then based on whether the dedcd has been setup to stop deduction when employee is terminated, the deduction is stopped or taken.
Tuesday, February 19, 2008
Inactivating Work Flows
Recently, I was required to inactivate workflow that were delivered ACTIVE.Since we are not using workflow, we will eventually have to inactivate all the events.
While I got to manually inactivate a few that were causing errors, I identified a peopletools table that could potentially be used for the purpose.
PSEVENTDEFN stored this information.
Instead of manually opening up each workflow, you could update the ACTIVE field to 0. But be sure that you are not really using thr work flow.
If you have a better way of doing it, please share with me and I will thank you for it!
Till next time.
While I got to manually inactivate a few that were causing errors, I identified a peopletools table that could potentially be used for the purpose.
PSEVENTDEFN stored this information.
Instead of manually opening up each workflow, you could update the ACTIVE field to 0. But be sure that you are not really using thr work flow.
If you have a better way of doing it, please share with me and I will thank you for it!
Till next time.
Sunday, February 3, 2008
How do you get an AE program to abort?
In certain situation, you want to stop processing and fail the program ?
There are certain places where you can accomplish this:
1. SQL Action with On Error set to Abort.
Other values are
Continue: Continue processing. It will continue processing the next action within the step.
Skip step: Skip this step and go to the next.
Section break: Stop processing the current section and pass control back to calling section.
2. Peoplecode Action with OnReturn set to abort and exit(1) fired within the peoplecode on encuntering the error condition.
3. SQL Action which returns no rows can be flagged to Abort.
Other possible value for Peoplecode On Return are Skip Step, Break.
With break, subsequent steps in section are not processed and control is returned to calling section.
With skip step, the existing step and ( subsequent actions ) are skipped and control is passed on to the subsequent step.
There are certain places where you can accomplish this:
1. SQL Action with On Error set to Abort.
Other values are
Continue: Continue processing. It will continue processing the next action within the step.
Skip step: Skip this step and go to the next.
Section break: Stop processing the current section and pass control back to calling section.
2. Peoplecode Action with OnReturn set to abort and exit(1) fired within the peoplecode on encuntering the error condition.
3. SQL Action which returns no rows can be flagged to Abort.
Other possible value for Peoplecode On Return are Skip Step, Break.
With break, subsequent steps in section are not processed and control is returned to calling section.
With skip step, the existing step and ( subsequent actions ) are skipped and control is passed on to the subsequent step.
%TruncateTable
%TruncateTable
While we know that oracle implicitly commits after the execution of a Truncate statement, one might wonder the impact of using this in an AE program and causing issues.
Per peoplebooks, AE is smart enough to recognize that and converted a %TruncateTable to a delete!
Wondering whether it will add a where clause ( where process_instance = %processinstance ) ?
Anyone who has worked on it can comment ?
While we know that oracle implicitly commits after the execution of a Truncate statement, one might wonder the impact of using this in an AE program and causing issues.
Per peoplebooks, AE is smart enough to recognize that and converted a %TruncateTable to a delete!
Wondering whether it will add a where clause ( where process_instance = %processinstance ) ?
Anyone who has worked on it can comment ?
Subscribe to:
Posts (Atom)