If I use the action button to set an entity’s state to final using fibery.setStateToFinal
what happens if there is more than workflow state for which ‘Final’ is true?
Hi, Chris!
Sorry for the long answer
Well, it will select a random one and will throw an error at you. Never thought about this situation, telling the truth, and not sure about expected behaviour for this case
I would expect first match when picking, and when checking true
if any.
To get around the above problem, I would instead add a boolean to the state to check against. I am actually doing this as we have two complete states: completed and archived.
In this case it would make sense that final
match the first, which is Completed as it’s before Archived. Then for checking Archived state, I check for a “Archived” boolean on the states.