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:
- On the Drawing toolbar, select the Call Operation tool and use it to draw the element on the flowchart.
- Open the Features window for the Call Operation element that you created.
- If you plan to call an operation that belongs to another class, open the Target list and select the relevant class.
- Open the Operation list and select the operation that should be called.
- If the operation you are calling takes arguments, use the Arguments table to provide values for the arguments.
- 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
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;
}