Hi,
I need to copy some classes from one package to another, all in the same model.
This is the code:
module AddClassesCIM2PIM;
create OUT : UML refining IN : UML;
rule CopySomeClasses {
from
ma: UML!Package (ma.oclIsTypeOf(UML!Package))
to
ta : UML!Package (
name <- 'IN!PIM'
),
ca : UML!Class (
name <- ma.name
)
}
Problems:
P1 - At execution, a new UML!Package of the name 'IN!PIM' is created.
How can I have a reference to always the same package ?
P2 - I tryed to find the UML!Class reference to its direct parent package, without success.
How can I get/set the package owning a class ?
Regards.