Hi community and M-Files,
I have a trouble with some re-calculation. We have quite a specific logic, with some calculation in pre-condition, state action of the state. But as well certain calculations in MFEventHandlerBeforeCheckInChangesFinalize event.
I use always Vault.ObjectPropertyOperations.SetLastModificationInfoAdmin to retain history and information about user making changes.
However when the execution happens in one specific case, I am getting an error:
"The maximum number of script executions permitted during a single operation was exceeded for the object "
What happens is following:
1. State pre-condition runs with calculations and SetLastModificationInfoAdmin is called
2. State action is called with calculations and SetLastModificationInfoAdmin is called
3. CheckIn Event is called with re-calculation and SetLastModificationInfoAdmin is called
If I remove SetLastModificationInfoAdmin in case 2), it works. However, sometimes there are no changes catched in checkIn event and then history is broken with entry for M-Files Server as the re-calculation is not running.
Code is very optimized and I only run SetLastModificationInfoAdmin if something is effectively changed.
Unfortunately, I can not correlate between event and state.
Is there any option to increase the maximum of script executions?
Best,
Dejan