Add Event Service to diagrams
[nonrtric/plt/sme.git] / capifcore / docs / diagrams / registerpoviderandpublishservice.plantuml
1 @startuml Register Provider
2 actor rAppCatalogue
3 actor rApp
4 participant rAppManager
5 box "CAPIF Internal"
6 participant capifcore
7 participant providermanager
8 participant helmmanager
9 participant publishservice
10 participant invokerservice
11 participant discoverservice
12 participant securityservice
13 participant eventservice
14 end box
15
16 rAppCatalogue->rAppManager: Start rApp, with rApp\n descriptor specifying which\n services to expose and consume
17 alt#paleGreen #paleGreen Provider Enrolment
18     rAppManager->capifcore: Register provider with\n APIProviderEnrolmentDetails
19     capifcore->providermanager:Register provider
20     providermanager->providermanager: Create apiProvDomId\n and apiProvFuncIds\n for provided functions
21     providermanager->capifcore: Provider with\n apfId and aefIds
22     capifcore->rAppManager: Provider with\n apfId and aefIds
23 end
24 alt#LightBlue #LightBlue Publish Service
25     rAppManager->capifcore: Publish services\n with providerId\n andServiceAPIDescription
26     capifcore->publishservice: Publish services
27     publishservice->providermanager: Are AEFs are\n registered for provider?
28     providermanager->publishservice: Ok
29     publishservice->publishservice: Create apiId
30     publishservice->helmmanager: Install chart
31     note right: Optional and not decided yet
32     helmmanager->publishservice: Ok
33     alt#Orange #Orange Subcribed Event Handling
34         publishservice->eventservice: Service published
35         eventservice->rApp: CAPIFEventDetail
36     end
37     publishservice->capifcore: ServiceAPIDescription\n with apiId
38     capifcore->rAppManager: ServiceAPIDescription\n with apiId
39 end
40 alt#coral #coral Register Invoker
41     rAppManager->capifcore: Register invoker with\n APIInvokerEnrolmentDetails
42     capifcore->invokerservice: Register invoker
43     invokerservice->invokerservice: Create apiInvokerId and\n onboardingSecret
44     invokerservice->publishservice: Get available services
45     publishservice->invokerservice: Available services
46     alt#Orange #Orange Subcribed Event Handling
47         invokerservice->eventservice: Invoker registered
48         eventservice->rApp: CAPIFEventDetail
49     end
50     invokerservice->capifcore: Services available\n for the invoker
51     capifcore->rAppManager: Invoker with invokerId\n and available services
52 end
53 rAppManager->rAppCatalogue: Ok
54
55 alt#Yellow #Yellow Discover Services
56     rAppManager->capifcore: Discover services for an\n invoker with apiInvokerId\n and filter parameters
57     capifcore->discoverservice: Get services available\n for the invoker
58     discoverservice->invokerservice: Get services available\n for the invoker
59     invokerservice->publishservice: Get available services
60     publishservice->invokerservice: Available services
61     invokerservice->discoverservice: Services available \nfor the invoker
62     discoverservice->capifcore: Services available for the\n invoker matching the\n filter parameters
63     capifcore->rAppManager: Services available for the\n invoker and matching the\n filter parameters
64 end
65
66 alt#Pink #Pink Security Service
67     rApp->securityservice: Request token\n for service with\n AccessTokenReq
68     securityservice->invokerservice: Is invoker registered?
69     invokerservice->securityservice: Ok
70     securityservice->invokerservice: Is secret valid?
71     invokerservice->securityservice: Ok
72     securityservice->providermanager: Is function providing\n service registered?
73     providermanager->securityservice: Ok
74     securityservice->publishservice: Is service published?
75     publishservice->securityservice: Ok
76     securityservice->rApp: AccessTokenRsp with\n token
77 end
78
79 alt#Orange #Orange Event Service
80     rApp->eventservice: Subscribe to event with EventSubscription
81     eventservice->eventservice: Create subscriptionId
82     eventservice->rApp: subscriptionId
83 end
84 @enduml