|
From: | [Kreiz IT] Cédric GROSS |
Subject: | Re: [Dolibarr-dev] Triggers |
Date: | Tue, 24 Jun 2014 10:04:46 +0200 |
Humm.. It’s quite a mess with error management. What is difference between $error and $errors in CommonObject ? Does $error is last error and $errors array of error ? Usage are not same across files. Cedric De : address@hidden [mailto:address@hidden De la part de Destailleur Laurent Dolibarr should cancel action if return code of triggers are < 0. If at least one trigger return < 0, then actions are canceled. So we must test if return of $interface->run_trigger is < 0 to know if we rollback or not. This logic may not be implemented everywhere but this is how it should. 2014-06-23 17:22 GMT+02:00 [Kreiz IT]Cédric GROSS <address@hidden>: Hello there, I have a look on ton of bugtrack opened by Marcos about trigger. I started by supplier and mainly trigger doesn’t cancel action attached to it. So my question is: is it by design or Dolibarr should cancel action if trigger failed ? I had a quick look on wiki but I didn’t find anything about what could be the “official” way of managing trigger failure. Logically, if trigger fail action should be canceled but I prefer asking you before doing all correction. Thanks for your advice. Cedric
-- Laurent Destailleur (alias Eldy) ------------------------------------------------------------------------------------ Social networks of my OpenSource projects: Dolibarr Google+: https://plus.google.com/+DolibarrOrg/ Dolibarr Facebook: https://www.facebook.com/dolibarr Dolibarr Twitter: http://www.twitter.com/dolibarr AWStats Google+: https://plus.google.com/+AWStatsOrgPoject/ AWStats Facebook: https://www.facebook.com/awstats.org AWStats Twitter: http://www.twitter.com/awstats_project |
[Prev in Thread] | Current Thread | [Next in Thread] |