Skip to content

Commit

Permalink
Merge pull request #665 from catenax-ng/chore/TRI-1715-concept-adjust…
Browse files Browse the repository at this point in the history
…ments-

Chore/tri 1715 concept adjustments
  • Loading branch information
mkanal authored Nov 24, 2023
2 parents fda0f11 + b89ed9b commit 383f0dc
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,20 @@ endif

: Extract and collect globalAssetIds for own twins (AsPlanned);
: Request batch call for globalAssetIds
POST /ess/customers/investigations/orders;
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;
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
Expand All @@ -58,7 +60,25 @@ endif
tier level upwards;

: aggregateBPNLs Aggregate bpns numbers for each bpnl;
: increment hops count for each twin ;
note left
{
customers : [
{
businessPartnerNumberLegalEntity : <bpnl>,
"customerParts" [
{
globalAssetId: <globalAssetId>,
sites : [
{<bpns>},
],
}, ...
]
},
]
}
end note
stop

: Request for results "ESSCustomerNotificationsSubmodel ";

@enduml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -27,7 +26,6 @@ note left
"incidentBPNSs" : ["BPNS123456"]
"concernedCatenaXIds" : [ {
globalAssetId : <globalAssetId>,
hopsCount: <hopsCount>,
bpns: [
<bpns>
]
Expand Down Expand Up @@ -62,6 +60,4 @@ end note
end ref
BusinessApp_Tier_3 <-- IRS_Tier_3 : Return job with item graph for the requested id.



@enduml
Original file line number Diff line number Diff line change
Expand Up @@ -7,58 +7,17 @@ autonumber "<b>[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_Incident" as dDTR_Tier_N
participant "SubmodelServer_Tier_Incident" 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:
Expand All @@ -79,50 +38,58 @@ 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
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
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 : [
Expand All @@ -131,7 +98,6 @@ ClientApp -> IRS_Tier_N : /ess/customers/investigations/orders
"customerParts" [
{
globalAssetId: <globalAssetId>,
hopsCount: <hopsCount>,
sites : [
{<bpns>},
],
Expand Down

0 comments on commit 383f0dc

Please sign in to comment.