This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem with re-calculation logic

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

Parents Reply
  • At the end, I had to increase scripting config (first one) from 25 to 30. But somehow on our dev/test environment I miss "Scripting" option in Advanced Vault Settings. We have there exact the same version. Do you know if there is some registry settings to enable those. Perhaps I forgot what we changed there. Thanks!

Children
No Data