2

I have an application engine which has three steps: 1) peoplecode (load model user preferences) 2) do select & peoplecode (copy model user preferences into the preferences of a list of users) 3) peoplecode (append final results to the log)

the peoplecode action in the second step is executed in a loop for each user retrieved by the "do select" action.

if all the records and the values are correct, the program runs correctly. but i'm trying to test the cases when an error is encountered, and i have a problem in this case:

when i try to insert values that already exist in the database by doing it with &CompInt.Save() in the peoplecode inside the second step, this error appears:

Data being added conflicts with existing data. (18,2)

Error saving Component Interface. {Z09_CI_OPR_DEFN} (91,37)

Process 18256 ABENDED at Step Z09_USERPREF.MAIN.Step02 (PeopleCode) -- RC = ? (108,524) Message Set Number: 108 Message Number: 524 Message Reason: Process 18256 ABENDED at Step Z09_USERPREF.MAIN.Step02 (PeopleCode) -- RC = ? (108,524)

the problem is, after that, the peoplecode inside the second step finishes its execution but no more iterations are executed of that peoplecode for the following values retrieved by the 'do select' action. the correct behaviour should show the error and then continue with the following iterations.

does anyone know what could be happening? the On error parameter for the second step is set to "Ignore".

Neets
  • 4,094
  • 10
  • 34
  • 46
  • Since this is a common issue with CIs and AE, I've put up a repo on Github that has all the logic necessary to manage rowset-based AE to CI work in an Application Class, along with sample code. https://github.com/jpeyret/ae2ci – JL Peyret Sep 16 '17 at 23:30

1 Answers1

2

It's likely the CI error has destroyed your SQL cursor. Rather a separate do select step it would be better to load the data into a rowset and just have one peoplecode statment for the 2nd step. If you could post a code example it would be easier to provide better suggestions.

Brett B
  • 46
  • 1
  • 2
  • Yes, that's the case. Since I couldn't make it work with that approach, I replaced the do select action with a do while and did some adjustments accordingly, and now it works. i still think that the behaviour of the do select in that case makes no sense, but that's the way it works. same thing doesn't happen with the do while since every time the peoplecode is executed, a new cursor is created. thanks for your insight! – Neets Nov 30 '11 at 15:56