Add constraint on Causality State for packing List
For invoicing and delivering, transition requiring a "solved" causality state were testing for "building" and "diverged" states. This lead to errors as causality state can be "calculating" and heading toward divergence, but if the user is fast enough, the transition can be used before the activity marking the element as diverged.
After discussion it has been decided to move this verification on Constraint for the following reasons:
- Having a message explain why the transition is blocked is simpler for users:
- No need to explain to current users why their transition has gone (no formation or documentation is needed for the update)
- Simpler for user to only remember their goal (doing the transition) and having a message explain them why they cannot
- Bonus: The condition is verified on the transition which improve reliability.