eclipse-tractusx / portal-backend

Portal Backend
Apache License 2.0
10 stars 21 forks source link

Split business logic into processes #1006

Open Phil91 opened 1 month ago

Phil91 commented 1 month ago

Description

To have the possibility to trigger transactional logic independently it makes sense to split those into separate processes / process steps

some time ago I did had a look at possible processes that make sense to be created as processes, those are:

InsertActiveAppUserRoleAsync /api/apps/appchange/ {appId}/role/activeapp

ModifyUserRolesInternal api/administration/user/owncompany/users/{companyUserId}/coreoffers/{offerId}/roles api/administration/user/owncompany/users/{companyUserId}/apps/{appId}/roles api/administration/user/app/{apiId}/roles (can that be removed?)

AddOwnCompanyUsersBusinessPartnerNumbersAsync api/administration/user/owncompany/users/ {companyUserId}/businessPartnerNumbers

UpdateOwnUserDetails api/administration/user/ownUser/{companyUserId}

-> UpdateSharedRealmUserAsync DeleteOwnUserAsync api/administration/user/ownUser/{companyUserId}

DeleteOwnUserBusinessPartnerNumbersAsync /api/administration/user/owncompany/users/{companyUserId}/businessPartnerNumbers/{businessPartnerNumber}

DeleteOwnCompanyServiceAccountAsync DELETE: api/administration/serviceaccount/owncompany/serviceaccounts/{serviceAccountId}

UpdateOwnCompanyServiceAccountDetailsAsync PUT: api/administration/serviceaccount/owncompany/serviceaccounts/{serviceAccountId} UpdateTenantUrlAsyncInternal /api/apps/appchange/{appId}/subscription/{subscriptionId}/tenantUrl

AutoSetupOfferAsync (should be removed, since we already have the new autosetup process in place) POST: /api/apps/autoSetup POST: /api/service/autoSetup

UpdateSingleInstance + SetInstanceType PUT: /api/apps/appreleaseprocess/instance-type/{appId}

ActivateSingleInstanceAppAsync PUT: /api/apps/appreleaseprocess/{appId}/approveApp PUT: /api/services/servicerelease/{serviceId}/approveService

CreateOwnCompanyIdentityProviderAsync POST: api/administration/identityprovider/owncompany/identityproviders

DeleteCompanyIdentityProviderAsync DELETE: api/administration/identityprovider/owncompany/identityproviders/{identityProviderId}

UploadOwnCompanyUsersIdentityProviderLinkDataAsync POST: api/administration/identityprovider/owncompany/usersfile

CreateOwnCompanyServiceAccountAsync POST: api/administration/serviceaccount/owncompany/serviceaccounts uses ServiceAccountCreation

ServiceAccountCreation -> maybe split in process steps CreateOwnCompanyIdpUsersAsync -> same as for ServiceAccountCreation

since its already been some time since creating the list each entry should be checked again

Acceptance Criteria

Phil91 commented 1 month ago

@MaximilianHauer as discussed in the meeting here is the list of endpoints which make sense to be split up

@evegufy @ntruchsess fyi

MaximilianHauer commented 2 weeks ago

@Phil91 as discussed please prepare some "sub-issues" do implement the processes step by step

Phil91 commented 2 weeks ago

@MaximilianHauer see above links