错误结束程序而不是继续
我有一个应用程序引擎,分为三个步骤: 1)peoplecode(加载模型用户偏好) 2)选择& peoplecode(将模型用户偏好复制到用户列表的偏好中) 3) peoplecode(将最终结果附加到日志中)
第二步中的 peoplecode 操作针对“do select”操作检索到的每个用户循环执行。
如果所有记录和值都正确,则程序运行正确。但我正在尝试测试遇到错误时的情况,并且在这种情况下我遇到了问题:
当我尝试通过在 peoplecode 中使用 &CompInt.Save() 来插入数据库中已存在的值时在第二步中,出现此错误:
添加的数据与现有数据冲突。 (18,2)
保存组件接口时出错。 {Z09_CI_OPR_DEFN} (91,37)
过程 18256 在步骤 Z09_USERPREF.MAIN.Step02 (PeopleCode) 处异常结束 -- RC = ? (108,524) 留言集号码:108 留言号码:524 消息原因:进程 18256 在步骤 Z09_USERPREF.MAIN.Step02 (PeopleCode) 处异常结束 -- RC = ? (108,524)
问题是,此后,第二步中的 peoplecode 完成执行,但对于“do select”操作检索到的以下值,不再执行该 peoplecode 的迭代。 正确的行为应该显示错误,然后继续以下迭代。
有谁知道会发生什么?第二步的错误参数设置为“忽略”。
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".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
CI 错误可能损坏了您的 SQL 游标。与其采用单独的 do select 步骤,不如将数据加载到行集中,并且只为第二步提供一条 peoplecode 语句。如果您可以发布代码示例,那么会更容易提供更好的建议。
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.