OCL evaluation error message

Other topics that do not fit in any of categories.

Moderator: Moderators

OCL evaluation error message

Postby raghavendran.tue@gmail.com » Thu Oct 01, 2020 3:48 pm

I have an enterprise edition of Cameo Systems Modeler and I am trying to use OCL for validating my DSL and model. Here is what I am trying to do:
In my DSL, I have two stereotypes, namely, System and Deployed System. System stereotype is an extension of a class and also, it inherits from a block. DeployedSystem stereotype is an extension of a part property. In my model, I have SystemA which is a DeployedSystem, so, its applied stereotype is set to DeployedSystem. Also, I have SystemB which is a System, so, its applied stereotype is set to System. Now, in the specification window of SystemA, its type value is set to SystemB.

I have written a OCL statement to validate the above requirement. The requirement is that any element with the applied stereotype of DeployedSystem should have a type, where the value specified in the type should have an applied stereotype of System. Here is the OCL statement I have written for it:

Code: Select all

context Main1 inv:   
self.base_class.getAllProperties()->forAll(p:Property|p.getAppliedStereotype('AHFW_Profile1::DeployedSystem') <> null)


In the above statement, Main1 is a block whose part property is SystemA. On trying to evaluate the OCL statement in the evaluation mode, I get this error message: Context Metaclass is not specified.
I am really not sure what metaclass it is referring to or what I am missing here. So, it would be really great if someone could help me with this issue.
raghavendran.tue@gmail.com
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Fri Aug 28, 2020 6:13 am

Return to Other

Who is online

Users browsing this forum: No registered users and 0 guests

cron