Skip to content

Commit e9ea0b3

Browse files
committed
docs: add diagrams for RetryDownloading event
Relate to #1254 Fix #1255 [skip ci]
1 parent 5de0be1 commit e9ea0b3

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed

docs/import-series-flow.md

+52
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,58 @@ sequenceDiagram
8181
end
8282
```
8383

84+
```mermaid
85+
sequenceDiagram
86+
title Series import flow: stage 2a (re-run a failed page downloading)
87+
88+
participant Browser
89+
participant SeriesImportController
90+
participant SeriesImportService
91+
participant EventPublisher
92+
93+
opt POST /series/import/request?requestId=$id
94+
95+
Browser->>SeriesImportController: requestId
96+
activate SeriesImportController
97+
98+
SeriesImportController->>SeriesImportService: requestId
99+
activate SeriesImportService
100+
SeriesImportService->>SeriesImportController: ImportRequestDto
101+
deactivate SeriesImportService
102+
SeriesImportController->>EventPublisher: RetryDownloading
103+
SeriesImportController->>Browser: redirect to /series/import/request/{id}
104+
deactivate SeriesImportController
105+
106+
end
107+
```
108+
109+
```mermaid
110+
sequenceDiagram
111+
title Series import flow: stage 2b (re-downloading a page)
112+
113+
participant RetryDownloadingEventListener
114+
participant SeriesImportService
115+
participant DownloaderService
116+
participant EventPublisher
117+
118+
RetryDownloadingEventListener->>SeriesImportService: requestId
119+
activate SeriesImportService
120+
SeriesImportService->>RetryDownloadingEventListener: ImportRequestDto
121+
deactivate SeriesImportService
122+
RetryDownloadingEventListener->>DownloaderService: url
123+
activate DownloaderService
124+
DownloaderService->>RetryDownloadingEventListener: DownloadResult
125+
deactivate DownloaderService
126+
127+
RetryDownloadingEventListener->>SeriesImportService: content of downloaded page
128+
activate SeriesImportService
129+
SeriesImportService->>SeriesImportService:
130+
SeriesImportService->>RetryDownloadingEventListener:
131+
note right of SeriesImportService: DownloadingFailed -> DownloadingSucceeded
132+
deactivate SeriesImportService
133+
RetryDownloadingEventListener->>EventPublisher: DownloadingSucceeded
134+
```
135+
84136
## Parse page
85137

86138
```mermaid

src/main/java/ru/mystamps/web/feature/series/importing/SeriesImportController.java

-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ public String processRequestImportForm(
101101
return redirectTo(SeriesImportUrl.REQUEST_IMPORT_PAGE, requestId);
102102
}
103103

104-
// @todo #1254 Update workflow to mention RetryDownloading event
105104
@PostMapping(path = SeriesImportUrl.REQUEST_IMPORT_SERIES_PAGE, params = "requestId")
106105
public String rerunImport(
107106
@RequestParam("requestId") Integer requestId,

0 commit comments

Comments
 (0)