Come on, Doug, you know documentation is usually treated as an afterthought - way behind the software and usually incomplete. I'm glad you got your trigger working.

Now, since I have no interest in learning Java, am I 1 or 10 of those people? ;^)

Charlie

On 03-31-2011 10:55 AM, Doug Chanco wrote:
Thank you very much this was extremely helpful info

I have it working but does anyone besides me think the trigger info in the 
sysdesc manual is not very helpful?

I did not see any reference to setdiagnostics and why is there no "pick syntax" 
for working with triggers?

The SQL syntax works fine once you get used to it

Anyway thanks to everyone for their help and yes outside my world there are 
those that do not like or want to
Learn java ........

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 ......

On Mar 30, 2011, at 20:29, "Boydell, Stuart"<[email protected]>  
wrote:

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: [email protected] 
[mailto:[email protected]] 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
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users



_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to