Read data from file and then process row by row using component interface inside application engine


Requirement (I am on HCM 9.1 and peopletools 8.51.08)

Read from a file – EMPLID and Full-time / part-time student flag – only two columns

Call CI for personal data and update the flag if the latest row (current row) has a flag different from the one in the file


Pseudo logic

  • Create an application engine program
  • Get CI for PERSONAL_DATA
  • Save
  • *Handle exceptions and store error messages into a log file


Approach 1

Store file data into a table

Create a step with two actions: Do-select and Peoplecode

Write Do-select with select/fetch to get one row at a time

Next Action – Peoplecode to process the Personal data CI

Issue – (I am on tools 8.51)

If for some reasons CI fails, do-select cursor is closed and application engine abends irrespective of the way you handle that error. Even try-catch block does not seem to work

Approach 2

Store file data into a table

Create a step with only one action: Peoplecode

Peoplecode to process the Personal data CI and error handling


No issues with this as far save is concerned. Rows with no errors save successfully and the ones with errors are logged correctly into a log file

Approach 3

Store file data into a table


Create a step with two actions: Do-select with 'reselect' (frequency value does not matter) and peoplecode

Write Do-select to get one row at a time

Next Action – peoplecode, first delete the current selected row so that it would be skipped in the next iteration of 'reselect', otherwise do-select would practically never end.
next write a logic to process personal data CI

No issues with this as far save is concerned. Rows with no errors save successfully and the ones with errors are logged correctly into a log file
Note:

There is a popular discussion within peoplesoft community around the web on this issue.
Popular searches are 'application engine abends when CI save fails' or  'application engine component interface combo error or issue'

I remember using Approach 1 prior to 8.50 people tools without any issues, so may be this is happening only with newer tools versions.

2 comments:

  1. hank you for sharing such great information with us. I really appreciate everything that you've done here and am glad to know that you really care about the world that we live in :) custom software application development

    ReplyDelete