Adding a Call Operation element to a flowchart

You can add Call Operation elements to flowcharts, and IBM® Engineering Systems Design Rhapsody® will generate the appropriate code based on the information that you entered in the Features window for the element.

To add a call operation to a flowchart:

  1. On the Drawing toolbar, select the Call Operation tool and use it to draw the element on the flowchart.
  2. Open the Features window for the Call Operation element that you created.
  3. If you plan to call an operation that belongs to another class, open the Target list and select the relevant class.
  4. Open the Operation list and select the operation that should be called.
  5. If the operation you are calling takes arguments, use the Arguments table to provide values for the arguments.
  6. If necessary, modify the code that appears in the Code Pattern field. For example, if the operation you are calling has a value it returns, you can add code to assign the value to a variable: int heatStatus = $target$goArr$operation
Flowchart containing a Call Operation element

For this sample flowchart, the following code is generated:

void ClimateController::turnOnHeat() {
    // State call_operation_heat
    //#[ state turnOnHeat().call_operation_heat.(Entry) 
    int heatStatus = itsHeater->startHeating();
    //#]
    return;
    
}