CST UserGuide example doesn't work

Moderator: Moderators

CST UserGuide example doesn't work

Postby FlokiViking » Tue Jul 16, 2019 8:25 am

Running Cameo v19.0
Trying to run CST UserGuide example from paragraph 2.9.2 Creating a model for interaction simulation.
After creating the model per the instructions, I get the following Console messages:

00:00:00,000 : **** Instance Specification Sys is initialized. ****
00:00:00,000 : **** Instance Specification Sys is started! ****
00:00:00,031 ERROR: Cannot evaluate Opaque Behavior Add: ReferenceError: "par1" is not defined in <eval> at line number 1 expression body: print(par1+par2)
00:00:00,031 : **** Opaque Behavior Add execution is terminated. ****
00:00:00,031 : **** Interaction System execution is terminated. ****
00:00:00,031 : **** Instance Specification Sys execution is terminated. ****
WARN: Lifeline b1 object can't be found!

What's the problem?

I originally tried this example using SysML Blocks, rather than UML classes, but had the same issue.

Thanks for any help you can provide on this...
You do not have the required permissions to view the files attached to this post.
FlokiViking
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Thu Jun 27, 2019 9:15 am

Re: CST UserGuide example doesn't work

Postby paul.j.lotz@nasa.gov » Fri Aug 06, 2021 8:57 am

Did anyone find an answer to this?

I see a similar warning when executing a method inside a referenced interaction (SysML). I've put much effort into this but have not found a solution.
paul.j.lotz@nasa.gov
Forum Newbie
Forum Newbie
 
Posts: 3
Posts Rating:0
Joined: Fri Apr 30, 2021 7:25 pm

Re: CST UserGuide example doesn't work

Postby paul.j.lotz@nasa.gov » Fri Aug 06, 2021 3:55 pm

Open the sequence diagram SimpleIntUseSim3System within the block of that name. Right click on the diagram and choose Simulation... Run With Context. The first interaction use works but not the second. (The second works if it also invokes SubA and SubB.) It seems the core problem really is that the simulator does not know how to find the SubsystemB1 block. (I have tried including the lower-level lifelines on the upper level diagram and such things, but this appears simply not to work.) I think I am stuck.
paul.j.lotz@nasa.gov
Forum Newbie
Forum Newbie
 
Posts: 3
Posts Rating:0
Joined: Fri Apr 30, 2021 7:25 pm

Re: CST UserGuide example doesn't work

Postby arnon_l » Tue Aug 17, 2021 9:43 pm

Hello,

Sorry for the late response.

If "Add" opaque behavior is a classifier behavior of B, it will be executed when Object B is created during the initialization phase.
And no values are passed ("part1" and "part2"), then error are occurred.

I think you may only want "Add" opaque behavior will be called via a call message.
So just simply set "classifier behavior" field of block B as "Undefined" could solve the problem.

Sincerely,
arnon_l
Customer Support
Customer Support
 
Posts: 86
Posts Rating:10
Joined: Thu Aug 30, 2012 3:39 am


Return to Cameo Simulation Toolkits

Who is online

Users browsing this forum: No registered users and 1 guest