Thanks for the reply —very interesting.
I haven’t dug too deep into
django-fsm, mostly browsed the code for inspiration.
Using the “lightweight” optimistic approach (as you call it) — does it mean I cannot reliably implement an action that dont trigger a state transition?
I’ve had several cases where more than one action were required before a transition could me made.
For example, applying for a student load requires updating personal information and uploading a student certificate. These are two seperate actions and only when both are completed the user can submit the request for approval:
create()-> state PRISTINE
submit_for_approval()-> state PENDING_APPROVAL
Using a lightweight optimisitc locking, can I prevent concurrancy issues in calls to
upload_student_certificate (given that both are executed at state PRISITINE)?