Use Case Sequence Diagram

@startuml
Title Application LCM Step 2 - Package Validation
skinparam sequenceArrowThickness 2
skinparam ParticipantPadding 5
skinparam BoxPadding 10
skinparam ArrowColor #blue
autonumber

Box Personnel #lightblue
Actor sOP as "SMO Operator" <<INT OTF>>
End box

Box "SMO" #gold
Participant sPMGR as "Package Manager" <<RICAPP>>
Boundary MC as "Model Catalog" <<SMO MVC State Manager>>
end box

== Validate ==

sOP -> sPMGR : ValidateStructure (packageFilename)
sPMGR -> sPMGR :
Note Left: Validate Package contents and structure

alt if Structure is Valid then
sOP -> sPMGR : ValidateVersion (packageFilename, modelCatalogEndPoint)
sPMGR -> sPMGR :
Note Left: Extract Application Version from package

sPMGR -> MC : GET ../applications/<ApplicationversionId>
alt if version not found (rc = 404) then
sPMGR -> MC : PUT ../applications/<ApplicationversionId> {State=VALIDATED}
else
note over sPMGR : Change to established version not allowed, version in package should be updated
end if
else
note over sPMGR : Package structure is not valid unable to create a record in Model Catalog
end if

@enduml