Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: adjust documentation for registration approval process #391

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/static/application-requests-overview-narrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/static/application-requests-popup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,35 +1,43 @@
## Registration Approval Flow

<br>
The company registration approval flow is covering the manual and automatic check of the company application including the setup of the company to participate inside the dataspace.
<br>

The list below shows an overview of all application approval steps:

<br>
<br>
<p align="center">
<img width="800" alt="image" src="https://raw.githubusercontent.com/eclipse-tractusx/portal-assets/main/docs/static/application-confirmation-workflow.png">
</pr>
<br>
<br>
```mermaid
flowchart LR
A[Input: Company Application] ~~~ B(("`Manually Validate Registration`"))
B --> D(("`Create Managed Identity Wallet`"))
A ~~~ C
C(("`Create Business Partner Number
(if necessary)
Option A: via BPN IF
Option B: add manual (interim workflow)`")) --> D
D --> E(("`Request BPNL Credential`"))
E --> F(("`Request Membership Credential`"))
F --> G(("`Clearinghouse check & VC`"))
G --> H(("`Self Description creation Legal Person`"))
H ~~~ I("`Automatic Company Access to Catena-X (notification via mail)
start to participate and share`")
```

As highlevel displayed above; the registration approval flow consist out of 6 steps. Which can partially run in parallel or must run in the predefined sequence.
The six registration approval flow steps are implemented in a kind of an checklist worker which automatically triggers the relevant services as per the current state of the company application. To ensure that the operator knows the status of the company application, each step can be in the status
As highlevel displayed above; the registration approval flow consist out of 7 steps. Which can partially run in parallel or must run in the predefined sequence.
The seven registration approval flow steps are implemented in a kind of an checklist worker which automatically triggers the relevant services as per the current state of the company application. To ensure that the operator knows the status of the company application, each step can be in the status

- Open
- In Progress
- Done
- Failed

In case of an failed scenario; the error code (if available) is getting recorded for the registration application workflow step and can get viewed by the operator.
<br>
<br>

For the Self Description creation there was a special status `Skipped` introduced. This step is only set if the clearinghouseConnectDisabled is true.

### Checklist Stepper

<img width="1406" alt="image" src="https://raw.githubusercontent.com/eclipse-tractusx/portal-assets/main/docs/static/application-requests-popup.png">

By clicking on one of the process steps, the overlay wth process step details gets displayed.
By clicking on the process step overview on the right side, the overlay wth process step details gets displayed.
Depending on the status, the user can execute a number of action / next steps. In general 3 action states are possible and defined below

<img width="1540" alt="image" src="https://raw.githubusercontent.com/eclipse-tractusx/portal-assets/main/docs/static/status-frontend-options.png">
Expand Down Expand Up @@ -137,6 +145,59 @@ Depending on the API response, the system will behave in the following way:
<br>
<br>

##### Details "Request BPNL Credential"

The "Request BPNL Credential" is getting automatically triggered when following prerequisites are met:

- application checklist status "Business_Partner_Number" = "DONE"
- application checklist status "Registration_Verification" = "DONE"
- application checklist status "Identity_Wallet" = "DONE"
- application checklist status "Request BPNL Credential" = "TO_DO"
- application is in status "submitted"

The BPNL Credential is requested via the SSI Credential Issuer, after successfully triggering the credential request the status of the checklist is set to `IN_PROGRESS`.

After the SSI Credential Issuer created the credential a callback is made:

```diff
! POST: api/administration/registration/issuer/bpncredential
```

{
"bpn": "string",
"status": "string",
"message": "string"
}

The status can only get changed/updated; if the status of the application checklist attribute "request bpnl credential" is "IN_PROGRESS".

##### Details "Request Membership Credential"

The "Request Membership Credential" is getting automatically triggered when following prerequisites are met:

- application checklist status "Business_Partner_Number" = "DONE"
- application checklist status "Registration_Verification" = "DONE"
- application checklist status "Identity_Wallet" = "DONE"
- application checklist status "Request BPNL Credential" = "DONE"
- application checklist status "Request Membership Credential" = "TO_DO"
- application is in status "submitted"

The Membership Credential is requested via the SSI Credential Issuer, after successfully triggering the credential request the status of the checklist is set to `IN_PROGRESS`.

After the SSI Credential Issuer created the credential a callback is made:

```diff
! POST: api/administration/registration/issuer/membershipcredential
```

{
"bpn": "string",
"status": "string",
"message": "string"
}

The status can only get changed/updated; if the status of the application checklist attribute "request membership credential" is "IN_PROGRESS".

##### Details "Clearinghouse Check"

<br>
Expand Down Expand Up @@ -199,7 +260,7 @@ the clearinghouse need to be able to store an fail/success message. the message
<br>

```diff
! PUT ????
! POST: api/administration/registration/clearinghouse
```

{
Expand All @@ -211,28 +272,24 @@ the clearinghouse need to be able to store an fail/success message. the message
The bpn inside the request body is used to fetch the correct application Id. (application in status "submitted")
The status can only get changed/updated; if the status of the application checklist attribute "clearing_house" is "IN_PROGRESS".

<br>
<br>

##### Details "Self-Description Creation LegalPerson"

<br>
The "Self_Description_Legal_Person" is getting automatically triggered when following prerequisites are met:
<br>

- application checklist status "Business_Partner_Number" = "DONE"
- application checklist status "Registration_Verification" = "DONE"
- application checklist status "Identity_Wallet" = "DONE"
- application checklist status "Request BPNL Credential" = "DONE"
- application checklist status "Request Membership Credential" = "DONE"
- application checklist status "Clearinghouse_Check" = "DONE"
- application checklist status "Self_Description_LP" = "TO_DO"
- application is in status "submitted"
<br>

with the endpoint; the SD Factory is getting triggered and a self description of the legal person is getting submitted back. The portal backend is storing the self-description inside the portal db linked to the company.
<br>
Before executing the application checklist item a check for `clearinghouseConnectDisabled` is active, if `clearinghouseConnectDisabled` is true the status of the application checklist item is set to `SKIPPED` and the logic won't be executed.

With the endpoint; the SD Factory is getting triggered and a self description of the legal person is getting submitted back. The portal backend is storing the self-description inside the portal db linked to the company.

With triggering the endpoint, the status of the checklist item "Self_Description_LP" is set to "IN_PROGRESS"
<br>

Response "Error" => store the error message in the checklist table under checklist.comment and set the status to "FAILED"
Response "Success" => set status to "DONE"
Expand Down Expand Up @@ -262,9 +319,19 @@ Response "Success" => set status to "DONE"

##### Details "Activation"

<p align="center">
<img width="687" alt="image" src="https://raw.githubusercontent.com/eclipse-tractusx/portal-assets/main/docs/static/identity-wallet-overview.png">
</p>p>
```mermaid
flowchart TD
subgraph cx [CX Platform]
A[Portal Backend]
B[(DB)]
subgraph iw [Identity Wallet]
C[(DB)]
end
A --> |3. Update invitation, application and company record| B
A --> |1. POST /membership| C
C --> |2. Success| A
end
```

<br>
The complete company account activation (as result of the successful application checklist finalization) is automatically executed when following pre-requisites are fullfilled:
Expand All @@ -273,14 +340,15 @@ The complete company account activation (as result of the successful application
- application checklist status "Business_Partner_Number" = "DONE"
- application checklist status "Registration_Verification" = "DONE"
- application checklist status "Identity_Wallet" = "DONE"
- application checklist status "Request BPNL Credential" = "DONE"
- application checklist status "Request Membership Credential" = "DONE"
- application checklist status "Clearinghouse_Check" = "DONE"
- application checklist status "Self_Description_LP" = "DONE"
- application is in status "submitted"
<br>

With the execution of the application activation, the system will:

- call POST /api/credentials/issuer/membership to create membership credential for the registration party
- set company status inside portal.companies to "ACTIVE"
- set application status inside portal.company_application to"CONFIRMED"
- set company_application time stamp
Expand All @@ -290,16 +358,6 @@ With the execution of the application activation, the system will:
- add bpn to user(s)
- send welcome email

<br>

> **_NOTE:_**
>
> - if the activation is not successful (due to any reason) the membership credential should not get set/send
> - if the membership credential call is unsuccessful, the "registration activation" should not take place. (rare scenario - since this would only happen if the wallet is down or the wallet has a major internal service error)

<br>
<br>

### Add/Update BPN for the registration company

<br>
Expand Down