I need to make a call to an external system (through SOAP) when a new
object is saved/updated/deleted. If the external call fails then I
would like the save to also fail.  I have looked at the documentation
and a MapperExtension cannot change the flush plan to cancel if the
external call fails.

I have looked at session extensions and it looks like they would work,
but it seems far removed from my object.
I would have to check each object in the session to see if it is the
correct type and then execute the external method and then remove the
object from the session if it fails. Is this the recommended way of
binding an external action when modifying an object?

I suppose I could add a before_insert method to my object and have a
session extension that just checks every object to see if it has
before_insert and if it does then execute it (and any errors would
remove the object from the session).


Thanks,

Landreville

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to