From 744714e5f05a662961e9b40a563ebdc50043fdc0 Mon Sep 17 00:00:00 2001 From: mk Date: Wed, 22 Nov 2023 17:37:10 +0100 Subject: [PATCH 1/2] fix(diagram):[TRI-1715] Remove hops count as not needed --- ...ident_scenario_ess-bottom_up-activity.puml | 21 ++- ...bottom-up-sequence-customer-highlevel.puml | 1 - ...ttom-up-sequence-originator-highlevel.puml | 151 +++++++----------- 3 files changed, 77 insertions(+), 96 deletions(-) diff --git a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/activity/1_incident_scenario_ess-bottom_up-activity.puml b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/activity/1_incident_scenario_ess-bottom_up-activity.puml index 4a4a262dd5..cf509f9ce7 100644 --- a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/activity/1_incident_scenario_ess-bottom_up-activity.puml +++ b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/activity/1_incident_scenario_ess-bottom_up-activity.puml @@ -30,7 +30,8 @@ endif : Extract and collect globalAssetIds for own twins (AsPlanned); : Request batch call for globalAssetIds -POST /ess/customers/investigations/orders; +POST /irs/ess/orders; + : Filter for incident BPNS in PartSiteInformationAsPlanned; @@ -58,7 +59,23 @@ endif tier level upwards; : aggregateBPNLs Aggregate bpns numbers for each bpnl; -: increment hops count for each twin ; + note left + { + customers : [ + { + businessPartnerNumberLegalEntity : , + "customerParts" [ + { + globalAssetId: , + sites : [ + {}, + ], + }, ... + ] + }, + ] + } + end note stop @enduml \ No newline at end of file diff --git a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-customer-highlevel.puml b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-customer-highlevel.puml index d256bd4332..a7a724b761 100644 --- a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-customer-highlevel.puml +++ b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-customer-highlevel.puml @@ -27,7 +27,6 @@ note left "incidentBPNSs" : ["BPNS123456"] "concernedCatenaXIds" : [ { globalAssetId : , - hopsCount: , bpns: [ ] diff --git a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-originator-highlevel.puml b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-originator-highlevel.puml index 26d169e943..55f025a53b 100644 --- a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-originator-highlevel.puml +++ b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-originator-highlevel.puml @@ -7,58 +7,17 @@ autonumber "[000]" actor "Client" as User -participant "Client App (Script)" as ClientApp -box Incident Company (Tier 4) -participant "Digital Twin Registry" as dDTR_Tier_N -participant "IRS Incident" as IRS_Tier_N -end box - -participant EDC +User -> IncidentApp : Incident notification (incidentID) +activate IncidentApp -box Tier3 Company -participant "Digital Twin Registry" as dDTR_Tier_3 -participant "SubmodelServer" as SubmodelServer_Tier_3 -participant "IRS Customer Tier 3" as IRS_Tier_3 +box Incident Company (Tier 4) +participant "IRS" as IRS_Tier_N +participant "dDTR_Tier_N" as dDTR_Tier_N +participant "SubmodelServer_Tier_N" as SubmodelServer_Tier_N end box - -User -> ClientApp : Incident notification (incidentID) -activate ClientApp - -ClientApp -> dDTR_Tier_N : getAAShells () -ref over dDTR_Tier_N - GET AAShells from dDTR for own BPNL -end ref -ClientApp <-- dDTR_Tier_N : Array [{AAS shells}] - -ClientApp -> ClientApp : Extract globalAssetId - - -ClientApp <-- dDTR_Tier_N : return array of {aasIdentifier} - -ClientApp -> ClientApp : filter aas for submodelDescriptor (asPlanned) - note left - semanticId/ - ["type"="ExternalReference"]/ - keys["type"="GlobalReference"]/ - ["value".contains("SingleLevelBomAsPlanned")] - SingleLevelBomAsPlanned (only downwards supported!!) - end note - -opt aas is asPlanned - - ClientApp -> ClientApp : add aas to aasResultSet - note right - Requesting all twins for a given "bomLifecycle" - end note - -end opt - -ClientApp <-- ClientApp : aasResultSet - - -ClientApp -> IRS_Tier_N : /ess/customers/investigations/orders +IncidentApp -> IRS_Tier_N : /irs/ess/orders note left Investigation of customers who must be notified about an incident. parameters: @@ -79,50 +38,57 @@ ClientApp -> IRS_Tier_N : /ess/customers/investigations/orders } end note - IRS_Tier_N -> IRS_Tier_N : Check PartSiteInformationAsPlanned if BPNS matches - note left - Check if bpns contains any catenaXsiteId in PartSiteInformationAsPlanned - end note - opt "!bpns.containsAny(catenaXsiteIds) then" - IRS_Tier_N -> IRS_Tier_N : skip twin; - end - - ref over dDTR_Tier_N, dDTR_Tier_3, SubmodelServer_Tier_3 - Determining relationships 1 tier level upwards - end ref - - IRS_Tier_N -> IRS_Tier_N : validityPeriodChecker - note left - validityPeriodCheck: Checks if passed timestamp is in validity period defined with - validityPeriod.validFrom and PartAsPlanned.validityPeriod.validTo - - PartAsPlanned.validityPeriod.validFrom - >= validityTimestamp - >= PartAsPlanned.validityPeriod.validTo - end note - - IRS_Tier_N -> IRS_Tier_N : aggregateBPNLs - note left - Aggregate bpns numbers for each bpnl - end note - IRS_Tier_N -> IRS_Tier_N : incrementHopsCount - note left - increment hopsCount on twin level - end note - - - IRS_Tier_N <-- IRS_Tier_N : [{globalAssetId,businessPartnerNumberLegalEntity, [businessPartnerNumberSite]}] - - - - - ClientApp --> IRS_Tier_N : GET /irs/orders/{orderId} - ClientApp <-- IRS_Tier_N : Get a batch order for a given orderId. - ClientApp --> IRS_Tier_N : GET /irs/orders/{orderId}/batches/{batchId} - ClientApp <-- IRS_Tier_N : Get a batch with a given batchId for a given orderId. - ClientApp --> IRS_Tier_N : GET /irs/jobs/{id} - ClientApp <-- IRS_Tier_N : Return job with item graph for the requested id. - User <-- ClientApp : Return job with item graph for the requested id. + loop over globalAssetIds + ref over IRS_Tier_N, dDTR_Tier_N + GET aas for globalAssetId from dDTR + end ref + IRS_Tier_N -> IRS_Tier_N : detect endpoint for submodel "PartAsPlanned" + IRS_Tier_N -> IRS_Tier_N : validityPeriodChecker + note left + validityPeriodCheck: Checks if passed timestamp is in validity period defined with + validityPeriod.validFrom and PartAsPlanned.validityPeriod.validTo + + PartAsPlanned.validityPeriod.validFrom + >= validityTimestamp + >= PartAsPlanned.validityPeriod.validTo + end note + opt validityCheck == false + IRS_Tier_N -> IRS_Tier_N : skip globalAssetId; + else + IRS_Tier_N -> IRS_Tier_N : detect endpoint for submodel "PartSiteInformationAsPlanned" + ref over IRS_Tier_N, SubmodelServer_Tier_N + GET PartSiteInformationAsPlanned for globalAssetId from dDTR + end ref + IRS_Tier_N -> IRS_Tier_N : Check PartSiteInformationAsPlanned if BPNS matches + note left + Check if bpns contains any catenaXsiteId in PartSiteInformationAsPlanned + end note + opt "!bpns.containsAny(catenaXsiteIds) then" + IRS_Tier_N -> IRS_Tier_N : skip globalAssetId; + else + + ref over dDTR_Tier_N, dDTR_Tier_Customer, SubmodelServer_Tier_Customer + Determining relationships 1 tier level upwards + end ref + + + + IRS_Tier_N -> IRS_Tier_N : aggregateBPNLs + note left + Aggregate globalAssetIds and bpns numbers for each bpnl + [{globalAssetId,businessPartnerNumberLegalEntity, [businessPartnerNumberSite]}] + end note + end opt + end opt + end loop + + IncidentApp --> IRS_Tier_N : GET /irs/orders/{orderId} + IncidentApp <-- IRS_Tier_N : Get a batch order for a given orderId. + IncidentApp --> IRS_Tier_N : GET /irs/orders/{orderId}/batches/{batchId} + IncidentApp <-- IRS_Tier_N : Get a batch with a given batchId for a given orderId. + IncidentApp --> IRS_Tier_N : GET /irs/customer/investigation/{id} + IncidentApp <-- IRS_Tier_N : Return job with item graph for the requested id. + User <-- IncidentApp : Return job with item graph for the requested id. note left { customers : [ @@ -131,7 +97,6 @@ ClientApp -> IRS_Tier_N : /ess/customers/investigations/orders "customerParts" [ { globalAssetId: , - hopsCount: , sites : [ {}, ], From b89ed9b7950a488507f8c5968af7233462defda7 Mon Sep 17 00:00:00 2001 From: mk Date: Fri, 24 Nov 2023 14:40:37 +0100 Subject: [PATCH 2/2] fix(diagram):[TRI-1715] update concepts --- .../1_incident_scenario_ess-bottom_up-activity.puml | 7 +++++-- .../ess-bottom-up-sequence-customer-highlevel.puml | 3 --- .../ess-bottom-up-sequence-originator-highlevel.puml | 5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/activity/1_incident_scenario_ess-bottom_up-activity.puml b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/activity/1_incident_scenario_ess-bottom_up-activity.puml index cf509f9ce7..7cbabcae22 100644 --- a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/activity/1_incident_scenario_ess-bottom_up-activity.puml +++ b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/activity/1_incident_scenario_ess-bottom_up-activity.puml @@ -31,10 +31,11 @@ endif : Extract and collect globalAssetIds for own twins (AsPlanned); : Request batch call for globalAssetIds POST /irs/ess/orders; +: Call POST /ess/customer/investigation for each globalAsset; : Filter for incident BPNS -in PartSiteInformationAsPlanned; +in PartSiteInformationAsPlanned on own parts; if(!twin.contains(incidentBpns)) then (no) : skip twin; @@ -42,7 +43,7 @@ else (yes) : add twin; endif -: ValidityPeriodChecker in own aas; +: ValidityPeriodChecker in own PartAsPlanned; if(timestamp is in validity period) then (yes) note left PartAsPlanned.validityPeriod.validFrom @@ -78,4 +79,6 @@ endif end note stop +: Request for results "ESSCustomerNotificationsSubmodel "; + @enduml \ No newline at end of file diff --git a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-customer-highlevel.puml b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-customer-highlevel.puml index a7a724b761..756a98fd25 100644 --- a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-customer-highlevel.puml +++ b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-customer-highlevel.puml @@ -14,7 +14,6 @@ participant EDC box Customer Company (Tier 3) participant "Incident App" as BusinessApp_Tier_3 - BusinessApp_Tier_4 -> BusinessApp_Tier_3 : notification BusinessApp_Tier_4 <-- BusinessApp_Tier_3 : 200 ack note left @@ -61,6 +60,4 @@ end note end ref BusinessApp_Tier_3 <-- IRS_Tier_3 : Return job with item graph for the requested id. - - @enduml \ No newline at end of file diff --git a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-originator-highlevel.puml b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-originator-highlevel.puml index 55f025a53b..3f4735e252 100644 --- a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-originator-highlevel.puml +++ b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-originator-highlevel.puml @@ -13,8 +13,8 @@ activate IncidentApp box Incident Company (Tier 4) participant "IRS" as IRS_Tier_N -participant "dDTR_Tier_N" as dDTR_Tier_N -participant "SubmodelServer_Tier_N" as SubmodelServer_Tier_N +participant "dDTR_Tier_Incident" as dDTR_Tier_N +participant "SubmodelServer_Tier_Incident" as SubmodelServer_Tier_N end box IncidentApp -> IRS_Tier_N : /irs/ess/orders @@ -39,6 +39,7 @@ IncidentApp -> IRS_Tier_N : /irs/ess/orders end note loop over globalAssetIds + IRS_Tier_N -> IRS_Tier_N : /ess/customer/investigation ref over IRS_Tier_N, dDTR_Tier_N GET aas for globalAssetId from dDTR end ref