Function type:
STRING
Extracts the action part of the specified reaction (the label of the transition or static reaction). The syntax of a reaction is trigger/action.
●
The reaction is achieved by the single-element function
stm_r_st_reactions
orstm_r_tr_labels
.
●
The function returns an empty string when the action is missing.
Input/Output Assume thatS1
has several static reactions and you want to list all the actions that are triggered when in this state. Include the following statements in your template:VARIABLE
STATE st_id;
INTEGER status;
LIST OF STRING reactions;
STRING rct;
st_id := stm_r_st (’S1’, status);
reactions := stm_r_st_reactions (st_id, status);
WRITE (’\n Actions of reactions in S1:’);
FOR rct IN reactions LOOP
WRITE (’\n’, stm_action_of_reaction (rct, status));
END FOR;