Page 1 of 1

CST UserGuide example doesn't work

PostPosted: Tue Jul 16, 2019 8:25 am
by FlokiViking
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...

Re: CST UserGuide example doesn't work

PostPosted: Fri Aug 06, 2021 8:57 am
by paul.j.lotz@nasa.gov
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.

Re: CST UserGuide example doesn't work

PostPosted: Fri Aug 06, 2021 3:55 pm
by paul.j.lotz@nasa.gov
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.

Re: CST UserGuide example doesn't work

PostPosted: Tue Aug 17, 2021 9:43 pm
by arnon_l
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,