Database extraction function calls can appear anywhere in your template where expressions of the same type are valid.
This call retrieves the state whose name is
S1
from the database and assigns it to the variablestate_id
. (In actuality, the call retrieves the state’s ID. This ID is a value that Rational Statemate uses to identify each element in the database.)Function calls are frequently used in sequence. For example, because you have already retrieved the ID for state
S1
, you can now call the following function:sub_st := stm_r_st_physical_sub_of_st
({state_id}, status);This function call builds a list of substates contained in state
S1
and assigns the list to the variablesub_st
.At this point, you can print out a list of all substates of state
S1
. The list is to include the name of the individual state as well as the description appearing in the state’s form. To do this, include the following lines in your template: