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.

Application engine Issue

4 replies [Last post]
shilpa's picture
User offline. Last seen 11 years 22 weeks ago. Offline
Joined: 02/18/2009
Posts: 2

Hi

In AE I have one of the step to delete the data from Temporary table.
After the Delete STEP I have one more STEP with PeopleCode action to Load data from inbound file.

I have added some validations in peoplecode action if those validations are not passed forcing AE step to exit(1) and setting on Return to Abort.

When the validations are not passed AE is failing (what I expected) but one of the table in the earlier step where I deleted data from also remaining empty all the data is deleted from that table.
I don't want table to loose the data if AE abends. I don't have any COMMIT coded in AE
I think AE will commit the transactions only IF it runs to success.

Please suggest me how can I keep the data in the table(where I have deleted in the 1 step) even though AE fails.

Lepa's picture
User offline. Last seen 1 year 42 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: Application engine Issue

What database are you on? Oracle? Are you using %TruncateTable? Some databases, such as Oracle, issue an implicit commit for a truncate command. Try using the delete from syntax instead.

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

abhi10aug's picture
User offline. Last seen 5 years 11 weeks ago. Offline
Joined: 06/11/2008
Posts: 10
Re: Application engine Issue

If this is the structure.
SECTION
STEP 1 SQL (Delete from temp table)
STEP 2 PeopleCode (Validations)

You can set the Auto commit property of SECTION = Y.
just try this and check..

shilpa's picture
User offline. Last seen 11 years 22 weeks ago. Offline
Joined: 02/18/2009
Posts: 2
Re: Application engine Issue

we are on Oracle
I have PeopleCode action with SQLExec
code like below:

SQLExec("DELETE FROM PS_xxxxxx WHERE BUSINESS_UNIT = :1", PS_XXXX_AET.BUSINESS_UNIT);

Lepa's picture
User offline. Last seen 1 year 42 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: Application engine Issue

I think SQLExec is what is causing the commit on your table. The SQLExec interacts directly with the database. Try to execute your Delete in an SQL step just like abhi10aug mentioned in post #2.

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog