1

I am new to Rahpsody/SysMl and I would like your support.

I have two blocks (B and C) that are parts of a bigger Block (A).

My goal is to call (from B) an operation (belonging to C) that will do some processing and returns a value.

I am not sure whether I need to create a triggered operation or a just simple one, so I went with the triggered option. I created a triggered operation in Block C and created an association relationship between Block B & C. Then from Block B's state machine I called the triggered operation.

The model builds successfully but during the simulation when the time comes to call the triggered operation, the simulation just terminates without any error message. If I remove the operation call, the simulation works normally.

Guys, am I missing something here ?

P.S : I'm using IBM Rhapsody 8.4

E_genin
  • 55
  • 4

1 Answers1

1

An association between B and C defines that some instances of B can be linked to some instances of C. It doesn‘t mean that all instances are linked. Therefore, the simulation engine cannot know, that you want the two instances who happen to be part of an instance of A to be linked. You have to specify this.

The easiest way to do it, is to model a connector between the parts of A in an internal block diagram. Then you have to type the connector with the association.

I haven’t tried whether Rhapsody will use this information. However, this is as it is specified in the Precise Semantics of Composite Structures specification, which supplements the UML and SysML.

Axel Scheithauer
  • 2,758
  • 5
  • 13
  • Thanks for the answer, it works :D !! Does this mean I should create a connection/association pair for each operation I want to call from the other part ? Another thing is that a triggered operation does not allow to specify an implementation, should I use a simple operation ? – E_genin Aug 01 '23 at 09:16
  • 1
    The connection defines that the parts shall be linked. If one part shall call operations on another part, there must be a link. All public operations can then be called accross this link. I don't know what Rhapsody means with "triggered operation". You say, that it cannot have an implementation. I guess you mean, it cannot have a behavior assigned directly as a method. This is true for operations used _in_ a trigger of a transition. So, calling the operation _triggers_ a transition, which in turn has the effect of invoking an _implementation_ behavior or simply transitioning to a new state. – Axel Scheithauer Aug 02 '23 at 11:23
  • Your assumption about "triggered operations" in Rhapsody is correct. My initial objective was to call a behavior that returns a value to its caller (B in the example), the problem with simple operations is that I was not able to see any values being returned to 'B' in the associated sequence diagram. That's why I used at the end these "triggered operations" since they have a "reply" feature that can be seen in the sequence diagram. Is it normal not to see the return value in the sequence diagram using simple operations ? – E_genin Aug 02 '23 at 15:16
  • 1
    No, this is not normal. An operation that is called synchroneously should create an implicit reply message, when it ends. – Axel Scheithauer Aug 02 '23 at 19:35