IBM Support

How to return a value from activity diagram in Rational Rhapsody

Question & Answer


Question

How do you return a value from activity diagram in IBM Rational Rhapsody?

Answer

Procedure:

  1. Have an operation return int
    (Only int and all types that can be casted to int is allowed)

  2. Open the activity diagram.
    (This is applicable to Activity diagrams located within operations and functions)

  3. Right click and select Show/Hide diagram frame. A frame should be displayed around the diagram

  4. Right click on the frame and select 'Update/Create Activity Parameters'


Result: A line is added at the bottom of the activity operation:  return theActivity.getRETURN();

Note: This is currently only supported for Activity Diagrams in C++. Rhapsody in C is not supported.

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.0.1;8.0.2;8.0.3;8.0.4;8.0.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21660995