Hello,
We are currently using a custom application to send email notifications to external users, based on workflow triggers.
This application relies on the AfterCheckinChangesFinalize event.
In some situations, we observe that an email is sent even though the object update is ultimately not validated. To clarify the scenario:
-
The workflow transition itself is validated.
-
However, during the persistence to the SQL database, a SQL deadlock can occur.
-
This causes the transaction to fail and be rolled back.
-
As a result, no change is visible in the object history.
-
Despite this rollback, the email notification has already been sent.
From our understanding, this means that AfterCheckinChangesFinalize is triggered even though the overall transaction is not fully completed or committed.
We therefore have two questions:
-
Is this behavior expected and considered normal?
-
If so, what would be the recommended best practice to avoid sending notifications in such cases?
Related to this, we would also like to confirm whether M-Files Advanced Notifications rely on the same AfterCheckinChangesFinalize trigger, or if a different mechanism is used to ensure transactional consistency.
Thank you in advance for your feedback.
Best regards,
Allan Mietton
