Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
1f2ad4f6
Commit
1f2ad4f6
authored
Aug 19, 2017
by
Carsten Rose
Browse files
lockAdvisoryAlice+AliceBob.pu: simplified concurrent access states
parent
59742dc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
doc/diagram/lockAdvisoryAlice+AliceBob.pu
View file @
1f2ad4f6
...
...
@@ -40,54 +40,21 @@ form -> Bob: form
Bob -> Bob: edit (first change)
Bob -> dirty: action=lock
dirty -> Bob: status=**conflict_allow_force**,\nmessage=Record locked by user Alice
note right: User Bob can edit and save
Bob -> save: Post form
save -> dirty: lock valid?
dirty -> save: no
save -> save: store 'tokenForce=<uniqid>' in lock
save -> Bob: status=**conflict_allow_force**,\nmessage=Record locked by user Alice,\ntokenForce=<uniqid>
Bob -> Bob: UI question 'continue?'
alt Bob: force save
Bob -> save: Post form, GET Parameter 'tokenForce=<uniqid>'
save -> save: uniqId valid?
alt yes
save -> save: save form
save -> Bob: status=**succes**,redirect=client
else no
save -> Bob: status=**conflict_allow_force**,\nmessage=Record locked by user Alice,\ntokenForce=<uniqid>
save -> save: store 'tokenForce=<uniqid>' in lock
note over save: old <uniqid> will be overwritten
end
else Bob: cancel save
Bob -> Bob: none
end
note over save: no release: Bob does not own the lock
note right: User Bob can decide between a) reload and b) overwrite.
...
Alice -> save: POST form
save -> dirty: lock valid? yes!
dirty -> dirty: record modified since lock?
alt yes
save -> Alice: status=**conflict_allow_force**,\nmessage=Record has been modified,\ntokenForce=<uniqid>
...
Alice -> save: POST form, GET Parameter 'tokenForce=<uniqid>'
save -> save: uniqId valid?
alt yes
save -> save: save form
save -> dirty: action=release
save -> Alice: status=**succes**,redirect=client
else no
save -> Alice: status=**conflict_allow_force**,\nmessage=Record locked,\ntokenForce=<uniqid>
save -> save: store 'tokenForce=<uniqid>' in lock
note over save: old <uniqid> will be overwritten
end
else
alt Bob: overwrite
Bob -> Bob: can edit and receive no more warnings
Bob -> save: Post form
save -> dirty: lock type 'Advisory'? yes >> always allow write.
save -> save: save form
save -> dirty: action=release
deactivate dirty
save -> Alice: status=succes,redirect=client
save -> Bob: status=succes,redirect=client
else Bob: reload
Bob -> Bob: reload page
end
Alice -> save: Post form
save -> dirty: record modified. Message: Reload form.
@enduml
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment