Once created and nested, the child Ports are always bound to the edge of the Parent Port on which they exist, during a resize or move of the parent element. Therefore we have to show them, on the Equation Port, in order to connect them. The Equation Block has a Port that takes a ComplexNumber, but we might want to connect the real and imaginary portions of that variable to different sources. This is represented by the ComplexNumber Block with two Ports, Real and Imaginary. The type of the Port is a Block (or one of its specializations) that also has Ports.'įor example, a complex number is made up of two members (of type Real) - the real value and the imaginary value. 'Ports nest other Ports in the same way that Blocks nest other Blocks. You could use this to let the Parameter be of type House, but the OutputPin-Type would be Flat.This statement is derived from the SysML 1.5 Specification: This is correct for InputPins, but should be the opposite for OutputPins. In your specific example there is an even easier solution: simply fork the ObjectFlow of Type Flat and omit the OutputPin of Assign Resident to Housing.Īs a side note: Due to a bug in Cameo, you can change the type of the OutputPin to a more specific Type than that of the ActivityParameter. Maybe this should be documented with a local postcondition. It is the modelers responsibility to ensure, that this cast will always work, since no exception handling can be defined here. Just assign an OpaqueBehavior that casts the Type House to the Type Flat. The solution is to use the transformation property of the ObjectFlow. Therefore the UML specification choose the easy road and simply doesn't allow to connect the pins. However, it would be really hard to define a complete set of compatibilty rules that takes into account all the global and local pre- and postconditions and the tools would also be hard pressed to validate a model according to these rules. The correct way to capture this fact would be to add a postcondition to Activity Assign Resident to Housing that states that the type of the input and output pin will be the same. I know, in your context it can only return a Flat, but how should the tool know that? Give Flat Floor expects a Flat and will not work with a House, but Assign Resident to Housing could return a House.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |