|
1 @startuml |
|
2 |
|
3 participant browser |
|
4 participant submit_action |
|
5 participant progress_action |
|
6 participant HTTP_Session |
|
7 |
|
8 note over submit_action: <servlet>\nLong time action... |
|
9 note over progress_action: <servlet> |
|
10 |
|
11 browser -> progress_action: check(progress_id) |
|
12 note right of HTTP_Session #ff4444: first check can be\nstarted before commit\nis effective |
|
13 activate progress_action |
|
14 progress_action -> HTTP_Session: get(progress_id) |
|
15 note right of HTTP_Session: status: "unknown" |
|
16 HTTP_Session --> progress_action |
|
17 |
|
18 progress_action --> browser: JSON status "unknown" |
|
19 deactivate progress_action |
|
20 ... |
|
21 |
|
22 browser -> submit_action: submit(progress_id) |
|
23 activate submit_action |
|
24 |
|
25 submit_action -> HTTP_Session: set(progress_id, status, message, length, current) |
|
26 activate HTTP_Session |
|
27 |
|
28 note right of HTTP_Session: status: "running"\nmessage: "Loading elements: "\nlength: 100\ncurrent: 1 |
|
29 |
|
30 HTTP_Session --> submit_action: OK |
|
31 |
|
32 ... |
|
33 |
|
34 submit_action -> HTTP_Session: set(progress_id, status, message, length, current) |
|
35 |
|
36 note right of HTTP_Session: status: "running"\nmessage: "Loading elements: "\nlength: 100\ncurrent: 10 |
|
37 |
|
38 HTTP_Session --> submit_action: OK |
|
39 |
|
40 ... |
|
41 |
|
42 browser -> progress_action: check(progress_id) |
|
43 activate progress_action |
|
44 progress_action -> HTTP_Session: get(progress_id) |
|
45 HTTP_Session --> progress_action |
|
46 |
|
47 progress_action --> browser: JSON status "running" |
|
48 deactivate progress_action |
|
49 ... |
|
50 |
|
51 submit_action -> HTTP_Session: set(progress_id, status, message, length, current) |
|
52 HTTP_Session --> submit_action: OK |
|
53 |
|
54 ... |
|
55 |
|
56 submit_action -> HTTP_Session: finish(progress_id) |
|
57 note right of HTTP_Session: status: "finished" |
|
58 HTTP_Session --> submit_action: OK |
|
59 |
|
60 submit_action --> browser: HTTP 200: OK |
|
61 deactivate submit_action |
|
62 |
|
63 browser -> progress_action: check(progress_id) |
|
64 activate progress_action |
|
65 progress_action -> HTTP_Session: get(progress_id) |
|
66 HTTP_Session --> progress_action |
|
67 |
|
68 deactivate HTTP_Session |
|
69 |
|
70 progress_action --> browser: JSON status "finished" |
|
71 deactivate progress_action |
|
72 |
|
73 @enduml |