How to set tagged values after applying a profile [message #1746477] |
Sun, 30 October 2016 14:35  |
Ferdinando Sodano Messages: 7 Registered: October 2016 |
Junior Member |
|
|
Hello everyone,
I have a sysml input model, in which there are a block element that satisfies two requisites, one of them is dependend by the other (see the attachment).
I want to build a transformation in a output model in which the input models are the input model and the profile model.
The rules are very trivial:
Foreach block, i have to obtain an element MyBlock, with all the requirements that satisfies as own Nested Classifiers.
Requirements are mapped in stereotyped class MyRequirement, having two tagged values: clients and suppliers.
Clients are depending MyRequirement-s from a single Requirement, suppliers are the inverse.
I'm able to generate the instances of MyBlock and MyRequirement, but i'm not able to set the tagged values clients and suppliers.
I tried something of this type:
mapping Class::toMyRequirements(inout parent:Class) : Class when {self.isStereotypeApplied(stereotype_requirement)}
{
name:= self.name;
parent.nestedClassifier += result;
end
{
result.applyStereotype(stereotype_my_requirement);
result.setValue(stereotype_my_requirement, "suppliers", inmodel[Dependency]->select(client->includes(self)).supplier->late resolveIn(Class::toMyRequirements) };
}
but it doesn't work.
Does exist a method to set tagged values in an appropiate mode? In intenet and in the community I didn't find no topic talking about this arguments.
Thanks to all for the help.
Attachment: Immagine.png
(Size: 48.79KB, Downloaded 257 times)
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02588 seconds