--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/progress.puml Wed Dec 05 13:13:47 2018 +0100
@@ -0,0 +1,73 @@
+@startuml
+
+participant browser
+participant submit_action
+participant progress_action
+participant HTTP_Session
+
+note over submit_action: <servlet>\nLong time action...
+note over progress_action: <servlet>
+
+browser -> progress_action: check(progress_id)
+note right of HTTP_Session #ff4444: first check can be\nstarted before commit\nis effective
+activate progress_action
+progress_action -> HTTP_Session: get(progress_id)
+note right of HTTP_Session: status: "unknown"
+HTTP_Session --> progress_action
+
+progress_action --> browser: JSON status "unknown"
+deactivate progress_action
+...
+
+browser -> submit_action: submit(progress_id)
+activate submit_action
+
+submit_action -> HTTP_Session: set(progress_id, status, message, length, current)
+activate HTTP_Session
+
+note right of HTTP_Session: status: "running"\nmessage: "Loading elements: "\nlength: 100\ncurrent: 1
+
+HTTP_Session --> submit_action: OK
+
+...
+
+submit_action -> HTTP_Session: set(progress_id, status, message, length, current)
+
+note right of HTTP_Session: status: "running"\nmessage: "Loading elements: "\nlength: 100\ncurrent: 10
+
+HTTP_Session --> submit_action: OK
+
+...
+
+browser -> progress_action: check(progress_id)
+activate progress_action
+progress_action -> HTTP_Session: get(progress_id)
+HTTP_Session --> progress_action
+
+progress_action --> browser: JSON status "running"
+deactivate progress_action
+...
+
+submit_action -> HTTP_Session: set(progress_id, status, message, length, current)
+HTTP_Session --> submit_action: OK
+
+...
+
+submit_action -> HTTP_Session: finish(progress_id)
+note right of HTTP_Session: status: "finished"
+HTTP_Session --> submit_action: OK
+
+submit_action --> browser: HTTP 200: OK
+deactivate submit_action
+
+browser -> progress_action: check(progress_id)
+activate progress_action
+progress_action -> HTTP_Session: get(progress_id)
+HTTP_Session --> progress_action
+
+deactivate HTTP_Session
+
+progress_action --> browser: JSON status "finished"
+deactivate progress_action
+
+@enduml