forked from AOT-Technologies/forms-flow-ai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
234 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
## Sequence flows for client user | ||
|
||
Below is the sequence diagram for a client user when they submit a form. | ||
|
||
```mermaid | ||
sequenceDiagram | ||
actor Client as Client | ||
participant web as Web | ||
participant web-api as Web API | ||
participant web-api-db as Web API Database | ||
participant forms-api as Forms API | ||
participant forms-db as Forms Database | ||
participant bpm-api as BPM Api | ||
participant bpm-db as BPM Database | ||
Client ->> web: Enter form data | ||
activate web | ||
web ->> web-api: Auto save drafts | ||
Note over web,web-api: "POST /draft" | ||
activate web-api | ||
web-api ->> web-api-db: Save draft and application | ||
web-api-db -->> web-api: | ||
deactivate web-api | ||
web-api ->> web: | ||
deactivate web | ||
Client ->> web: Submit Form | ||
activate web | ||
web ->> forms-api: Submit form data | ||
Note over web,forms-api: "POST /form/:form-id/submission" | ||
activate forms-api | ||
forms-api->>forms-db: Create form submission | ||
forms-db -->> forms-api: | ||
forms-api -->> web: Form submission created | ||
deactivate forms-api | ||
alt Drafts enabled | ||
web ->> web-api: Submit application | ||
Note over web,web-api: "POST /draft/:id/submit" | ||
activate web-api | ||
web-api->>web-api-db: Mark draft as INACTIVE | ||
web-api-db -->> web-api: | ||
web-api->>web-api-db: Update application | ||
web-api-db -->> web-api: | ||
else Drafts not enabled | ||
web ->> web-api: Submit application | ||
Note over web,web-api: "POST /application/create" | ||
web-api->>web-api-db: Create application | ||
web-api-db -->> web-api: | ||
end | ||
web-api->>bpm-api: Start process instance | ||
activate bpm-api | ||
Note over web-api,bpm-api: "POST /process-definition/key/:key/start" | ||
bpm-api ->> bpm-db: Start process instance | ||
bpm-db -->> bpm-api: Started process instance | ||
bpm-api -->> web-api: Process response | ||
deactivate bpm-api | ||
web-api ->> web-api-db: Update application with process instance id | ||
web-api-db -->> web-api: | ||
deactivate web-api | ||
web-api -->> web: | ||
deactivate web | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
## Sequence flows for designer user | ||
|
||
Below is the sequence diagram for a designer user when they create and save a form and associate its workflow. | ||
|
||
```mermaid | ||
sequenceDiagram | ||
actor Designer as Designer | ||
participant web as Web | ||
participant web-api as Web API | ||
participant web-api-db as Web API Database | ||
participant forms-api as Forms API | ||
participant forms-db as Forms Database | ||
Designer ->> web: Create Form | ||
activate web | ||
web ->> web-api: Save form design | ||
Note over web,web-api: "POST /form/form-design" | ||
activate web-api | ||
web-api ->> forms-api: Save form data to form.io | ||
Note over web-api,forms-api: "POST /form" | ||
activate forms-api | ||
forms-api->>forms-db: Save form data | ||
forms-db-->>forms-api: | ||
forms-api -->> web-api: Form created | ||
deactivate forms-api | ||
web-api ->> web-api-db: Create audit records | ||
web-api-db -->> web-api: | ||
deactivate web-api | ||
web-api ->> web: Form records created | ||
deactivate web | ||
web -->> Designer : Form Design saved | ||
Designer ->> web: Save form mapper | ||
activate web | ||
web ->> web-api : Create form mapper | ||
Note over web,web-api: "POST /form" | ||
activate web-api | ||
web-api ->> web-api-db : Create records in form process mapper | ||
web-api-db -->> web-api : | ||
deactivate web-api | ||
web-api -->> web : | ||
web ->> web-api : Create authorization | ||
Note over web,web-api: "POST /authorizations/resource/<form-id>" | ||
activate web-api | ||
web-api ->> web-api-db : Create authorization records | ||
web-api-db -->> web-api : | ||
web-api -->> web : | ||
deactivate web-api | ||
web -->> Designer : | ||
deactivate web | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
## Sequence flows for reviewer user | ||
|
||
Below is the sequence diagram for a reviewer user when they work on tasks. | ||
|
||
```mermaid | ||
sequenceDiagram | ||
actor Reviewer as Reviewer | ||
participant web as Web | ||
participant web-api as Web API | ||
participant web-api-db as Web API Database | ||
participant forms-api as Forms API | ||
participant forms-db as Forms Database | ||
participant bpm-api as BPM Api | ||
participant bpm-db as BPM Database | ||
Reviewer ->> web: Access tasks | ||
activate web | ||
web ->> web-api: Get authorized filters | ||
Note over web,web-api: "GET /filters/user" | ||
activate web-api | ||
web-api ->> web-api-db: Get filter based on user roles | ||
web-api-db -->> web-api: | ||
deactivate web-api | ||
web-api -->> web: | ||
deactivate web | ||
activate web | ||
web ->> bpm-api: Get filter tasks | ||
Note over web,bpm-api: "POST /task-filters" | ||
activate bpm-api | ||
bpm-api->>bpm-db: Get filtered tasks | ||
bpm-db -->> bpm-api: | ||
bpm-api -->> web: Return tasks | ||
deactivate bpm-api | ||
deactivate web | ||
Reviewer ->> web: Select a task | ||
activate web | ||
web ->> bpm-api: Get task details | ||
Note over web,bpm-api: "GET /task/:id" | ||
activate bpm-api | ||
bpm-api ->> bpm-db: Get task details | ||
bpm-db -->> bpm-api: | ||
deactivate bpm-api | ||
bpm-api -->> web: | ||
deactivate web | ||
activate web | ||
web ->> forms-api: Get form details | ||
Note over web,forms-api: "GET /form/:form-id" | ||
activate forms-api | ||
forms-api ->> forms-db: Get form data | ||
forms-db -->> forms-api: | ||
deactivate forms-api | ||
forms-api -->> web: | ||
deactivate web | ||
activate web | ||
web ->> forms-api: Get form submission | ||
Note over web,forms-api: "GET /form/:form-id/submission/:submission-id" | ||
activate forms-api | ||
forms-api ->> forms-db: Get form submission data | ||
forms-db -->> forms-api: | ||
deactivate forms-api | ||
forms-api -->> web: | ||
deactivate web | ||
activate web | ||
web ->> forms-api: Get form submission | ||
Note over web,forms-api: "GET /form/:form-id/submission/:submission-id" | ||
activate forms-api | ||
forms-api ->> forms-db: Get form submission data | ||
forms-db -->> forms-api: | ||
deactivate forms-api | ||
forms-api -->> web: | ||
deactivate web | ||
Reviewer ->> web: Claim a task | ||
activate web | ||
web ->> bpm-api: Claim | ||
Note over web,bpm-api: "POST /task/:id/claim" | ||
activate bpm-api | ||
bpm-api ->> bpm-db: Update task details | ||
bpm-db -->> bpm-api: | ||
deactivate bpm-api | ||
bpm-api -->> web: | ||
deactivate web | ||
Reviewer ->> web: Complete task | ||
activate web | ||
web ->> forms-api: Update form | ||
Note over web,forms-api: "PUT /form/:id/submission/:id" | ||
activate forms-api | ||
forms-api ->> forms-db: Update submission data | ||
forms-db -->> forms-api: | ||
deactivate forms-api | ||
forms-api -->> web: | ||
web ->> bpm-api: Submit task | ||
Note over web,bpm-api: "POST /task/:id/submit-form" | ||
activate bpm-api | ||
bpm-api ->> bpm-db: Update task | ||
bpm-db -->> bpm-api: | ||
Note over bpm-api: "Listeners executed as per configuration" | ||
deactivate bpm-api | ||
bpm-api -->> web: | ||
deactivate web | ||
``` |