Hi All,
I'd like to implement some business logic in our Shotgun instance. That means I want to check data changes BEFORE the change event ends.
If the change event is illegal in terms of the business logic, it will be rolled back automatically and will raise an appropriate error message.
Let's see a simple example for better understanding! Business rule: A project cannot be active till its start date is filled in. However the UI user can set the Status field to 'Active' for a project which Start Date field is empty. I want to ban this status change and show an error message like "Please fill in the Start Date before activating the project"!
My question is: How can I implement it in Shotgun?
I've already searched the Forums here for the solution, but I found only a non-perfect workaround. If I implement an event driven trigger, I can notice the illegal changes just AFTER the event commited. At that point I can execute an inverse operation only instead of banning it and - of course - it is not possible to show an error message.
It can be done for example by database (e.g. postgres) like before event triggers where man can raise an exception, if he wants to ban the transaction.
But I'd be happy with any solution!
Thanks in advance, Jana