MetricSuite Using Active Validation for Parent & Child Req't

MagicDraw OpenAPI, scripting related questions and discussions

Moderator: Moderators

MetricSuite Using Active Validation for Parent & Child Req't

Postby christopher.m.weisser@lmco.com » Thu Feb 18, 2021 8:27 am

I'm looking for some guidance on how to create a MetricSuite that includes the following:
# of Requirements
# of Requirements without a Parent
# of Requirements without a Child

I would prefer to use a validationRule for each of the inner elements and have no issues with gathering the # of requirements. My issue has been using the Derived relationship to create the metric.

I'm fairly new to MetricSuites and Validation Rules, and have spent hours trying different methods (Metachain Navigation, Implied Relation, Test Type, etc.) to no avail. Detailed instructions would be appreciated.

Thank you for your help.
christopher.m.weisser@lmco.com
Forum Newbie
Forum Newbie
 
Posts: 3
Posts Rating:0
Joined: Wed Dec 02, 2020 12:57 pm

Re: MetricSuite Using Active Validation for Parent & Child Req't

Postby averyberge89@gmail.com » Sat Feb 20, 2021 12:39 am

have you solved it yet? friv
averyberge89@gmail.com
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Sat Feb 20, 2021 12:37 am
Full name: Amie Gusikowski

Re: MetricSuite Using Active Validation for Parent & Child Req't

Postby christopher.m.weisser@lmco.com » Tue Feb 23, 2021 5:24 am

Not from a ValidationRule perspective, no. We were able to write a Groovy script, but it's not exactly what we want to do as it requires us to hard-code in a generalization to the <<abstract requirement>> stereotype that we're using. In our use case, we extend the abstract requirement through several levels such that it can be customized thrroughout the organization through inheritance.

abstract requirement -> requirement -> company requirement -> department requirement -> program requirement

If someone were to change the name of the program requirement, the script no longer would work. All the other metrics can use the department requirement as the base stereotype and the ValidationRule knows to include the program requirements as well. We are creating standardized metrics for all our programs at the department level for consistency across all programs.
christopher.m.weisser@lmco.com
Forum Newbie
Forum Newbie
 
Posts: 3
Posts Rating:0
Joined: Wed Dec 02, 2020 12:57 pm

Re: MetricSuite Using Active Validation for Parent & Child Req't

Postby jennyreed1995@gmail.com » Thu Mar 04, 2021 10:49 pm

n the code below, my aim is to have the creation of the parent model (Image or Video) fail if the validation of the child model(Content) fails.
jennyreed1995@gmail.com
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Thu Mar 04, 2021 10:45 pm


Return to Programmatic Extendibility

Who is online

Users browsing this forum: No registered users and 2 guests