You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

To capture Logical Errors from Component Interface

8 replies [Last post]
dkubba1's picture
User offline. Last seen 8 years 5 weeks ago. Offline
Joined: 08/23/2012
Posts: 1

Hi,

I need to capture logical errors which occurs in CI which is in a section of Application engine.

Here is the scenrio: This all is in one Application Engine

1. I have done the data cleaning in section 1.
2. In section 2 -- I am loading the data in component bysing CI code from staging tbl.
3. It works perfect when data is correct.
---Errored scenerio: example : I am trying to load Country as USA and state as PUNJAB
--In this case, it throws error beacuse PUNJAB is not the state of USA and it doesn't come under resppective prompt.

My requirement: I need to capture this type of erros and need to insert into one detail_error record.

Can anyone guide me , how can i capture these type of logical errors in CI code.

Thanks in advance,
Deepika

Saiyed 's picture
Saiyed (not verified)
Re: To capture Logical Errors from Component Interface

Try using try catch ...

dSexton's picture
dSexton (not verified)
Re: To capture Logical Errors from Component Interface

You just need to evaluate the PSMessages object.
&CIErrors = &oSession.PSMessages;
&ErrorCount = &CIErrors.Count;
For &I = 1 To &ErrorCount
&ErrorText = &CIErrors.Item(&I).Text;
&ErrorType = &CIErrors.Item(&I).Type;
&ErrorMsgSet = &CIErrors.Item(&I).MessageSetNumber;
&ErrorMsgNbr = &CIErrors.Item(&I).MessageNumber;
&ErrorSource = &CIErrors.Item(&I).Source;
/* process the errors however you want */
End-For;
&CIErrors.DeleteAll();

Guest's picture
Guest
Re: To capture Logical Errors from Component Interface

1. try catch doesnt work for this case
2. ps messages shows error messages but makes my AE to no success, which i want to avoid.

My secenerio is :

i have 10 rows to load in personal data and on 5th row some data or as an exmaple national id format is wrong.. for that 5th row my AE shows no success .

How CI( works is : when it gets required fields for the component, it saves the componenet and then give all other fields valiues.... so my wrong value is getting saved but going to no success too....... I am unabel to capture this because, my CI dont not go to If NOT Save() CI clause.

Please SUggest,

Thanks,
Deepika
I want to avoid this no success...

Hari_aindian's picture
User offline. Last seen 6 years 32 weeks ago. Offline
Joined: 08/02/2010
Posts: 84
Re: To capture Logical Errors from Component Interface

You can set up the AE step level property like On error skip so that AE skips the error row and proceeds to next row.

If you are processing all the rows with in one PeopleCode step then You can catch CI error and write in to error log file and proceed to next row.

Regards,
Hari.A

Guest's picture
Guest
Re: To capture Logical Errors from Component Interface

Hi,
We had a similar requirement where we need to process a set of rows and for each row call a CI to load data in various tables.

For this , we created a standalone rowset and just iterate each row calling the CI with each row data.
We had set the property of this step as On error - IGNORE.So,even when a particular row is erroring out the AE is not failing and continue to process the row.

You can also use a do select instead of standalone rowset ,in our case the AE was not running properly when used do select.It is a issue with certain PTOOLs version.

Also using try catch properly ,the same thing can be achieved.

Thanks
Saiyed

Guest's picture
Guest
Re: To capture Logical Errors from Component Interface

I realize this thread is years old, but I am having the exact same problem now. Application HCM 9.1, Tools 8.52. AE calling CI. I have try/catch in place. I have the steps set to On Error = Ignore, and the process is still ending in No Success. Ideas?

Ashar's picture
User offline. Last seen 4 years 31 weeks ago. Offline
Joined: 03/26/2008
Posts: 227
Re: To capture Logical Errors from Component Interface

I believe you have a Do-Select and a PeopleCode combination in the AE Step.

If this is the case, there are two options you can consider to fix the AE abend on CI error.

1. Avoid Do Select and write a looping logic inside PeopleCode (using a standalone rowset)
2. Choose "Reselect" in "Do Select Type" option.

This was discussed in http://peoplesoft.ittoolbox.com/groups/technical-functional/peopletools-l/error-saving-component-interface-4987204

Guest's picture
Guest
Re: To capture Logical Errors from Component Interface

Yep, I did. Thanks!! Also found Oracle Support Doc ID 613029.1 that talks about this.