From 2965ebb1145a07996032948c124d5c23007647b6 Mon Sep 17 00:00:00 2001 From: Martin Lehmann Date: Fri, 29 Nov 2024 22:27:49 +0100 Subject: [PATCH] feat(mm): Add Scenario realization links --- capellambse/metamodel/interaction.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/capellambse/metamodel/interaction.py b/capellambse/metamodel/interaction.py index 030b02f5..b80f1211 100644 --- a/capellambse/metamodel/interaction.py +++ b/capellambse/metamodel/interaction.py @@ -93,6 +93,14 @@ class Scenario(m.ModelElement): time_lapses = m.Containment("ownedTimeLapses", aslist=m.MixedElementList) postcondition = m.Association(capellacore.Constraint, "postCondition") precondition = m.Association(capellacore.Constraint, "preCondition") + realized_scenarios = m.Allocation["Scenario"]( + "ownedScenarioRealization", + "org.polarsys.capella.core.data.interaction:ScenarioRealization", + attr="targetElement", + backattr="sourceElement", + aslist=m.ElementList, + ) + realizing_scenarios: m.Backref[Scenario] @property def related_functions(self) -> m.ElementList[fa.AbstractFunction]: @@ -200,4 +208,9 @@ class AbstractFunctionAbstractCapabilityInvolvement(AbstractInvolvement): """An abstract CapabilityInvolvement linking to SystemFunctions.""" +Scenario.realizing_scenarios = m.Backref( + Scenario, "realized_scenarios", aslist=m.ElementList +) + + from . import fa