If you want to force the trigger to issue a rollback I think you need to 
execute the SetDiagnostics function.

Something like...
subroutine TRIGGER.HANDLER(triggerName,schema,tableName,
                           event,eventTime,
                           newRecordID,newRecord,oldRecordID,oldRecord,
                           association,associationEvent,
                           triggerCount,chainCascade,cascade)

if someCheckCondition then
call updateThirdPartyApp(xxx, returnStatus)
if returnStatus < 0 then
*// rollback and gracefully end processing.
z = setDiagnostics('[999] Third Party App update failed with: ': returnStatus)
end
end
return
end




-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Doug Chanco
Sent: Thursday, 31 March 2011 03:05
To: U2 Users List
Subject: [U2] Trigger questions

I am sure I can do this but I am trying to figure out the best way ........

I need to write a WRITE trigger that does the following

Call a java web service to update an SQL table (no problem)

But if the update fails do NOT update the pick record and if possible notify 
the user

My question is what would be the best method/way to do this?

Do triggers use transaction logging that I could roll back the record or should 
I do something more manual? Copy the record (for example)

Any thoughts/suggestions/ideas welcomed and appreciated

Dougc

<email signature>

There are 10 kinds of people in the world, those that know binary and those 
that do not.  Along the same lines there are those who know java and those who 
want to learn java ......
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to