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

History entries with M-Files Server as user

Hi all, 

In one of use cases covered with VAF applications, we experience weird situations where additional history entries are created  with M-Files server as an user. 

In this particular VAF, we have OnCreate event and OnChange events both quite optimized setting properties only when needed. In all cases, we set current user at the end of creation event and also after all set properties (it is described somewhere in documentation). This helped us to get proper user in history in the most cases. We also have some mitigation logic to take the user from previous history entry in cases when we use automatic transitions done on server side by M-Files user. In those cases, we get correct user from previous history entry.

Unfortunately, sometimes (completely non-deterministic) it happens that M-Files creates additional version in the history even though it is not expected. These entries have of course in history M-File server as an user. This is very annoying and one of problems for our users. This happens even on the beginning of the workflow when user creates entry for the first time; we get one entry (version 1) with correct user and the version 2 with M-Files server as an user. As mentioned, this does not happen always. 

Why is this happening? Are those events all synchronously executed? Can this be somehow better controlled?

Thanks for your experience and suggestions.

Dejan

  • Objects shouldn't be versioned for no reason.  Versions created by "(M-Files Server)" are typically caused by either code or automatic state transitions.

    You need to dig into why those other versions are appearing.

  • Hi Craig,

    I've double checked our logic. It is probably that we miss some specific location on update event, as this is the location where we re-calculates certain metadata (if needed). We have many metadata and have tried to optimize re-calculation as much as possible.

    I also found out that in most cases when someone update assignment (approve/reject) that we re-calculate certain properties. In case we miss setting current user this causes again M-Files user entry.

    Best,

    Dejan