With the OOB behaviour of approval assignments in M-Files, the assignment is marked as rejected as soon as one assignee rejects, without collecting a response from the others.
This is causing some issues with a new workflow I am creating.
At the arrow going to 'Rejected', I have the below trigger.
The problem with this is that if there are multiple assignees for the approval, everyone else will miss it and not be able to review the document if someone rejects it straight away, as it will progress.
I do not wish to trigger the state transition as soon as someone rejects. I want to record a response from all assignees first, then mark as rejected if there is at least one assignee who marks as rejected, then trigger the transition once everyone has responded.
I believe that I may be able to script some logic to solve the above. For the logic I was thinking something like the below:
x = Total rejected responses to assignment
y = Total approved responses to assignment
z = Total number of assignees
If the sum of x + y = z (to check that all assignees have recorded a response)
And if x is equal to or greater than 1 (to make sure there is at least one reject)
Then trigger state transition.
I couldn't figure it out with the API documentation so I am unsure how to go about actually getting the values I need for the variables. I am also not a VBScript expert.
Sorry if I have described this in a really convoluted way.
Any help would be greatly appreciated.