UML Modeling Techniques > General flow diagrams - DEPRECATED > Working with activities > Using an activity signature to specify name and parameters
Using an activity signature to specify name and parameters
Through the Signature of an Activity, you can perform the following tasks:
Specify the Name of the Activity.
Create Parameters for the Activity.
Set the Mechanism
Name and Default of each Parameter.
You specify the Name and Parameters of an Operation by typing the Signature in the following format:
<activity name> ( [<parameters>] )
<activity name> is the Activity's Name.
<parameters> - is the Activity's Parameters. For each parameter, type the following information:
<mechanism> <parameter name> [: <parameter type>] [= <default>]
<mechanism> is the Parameter's Mechanism. Type either 'in', 'out', or 'in out'. If you do not type a mechanism, Modeler sets the Mechanism to 'in'.
<parameter name> is the Parameter's Name.
<parameter type> is the Parameter's Type. Modeler attempts to match the text you type with items that can be used as Types in the model. If a match is found, the item is referenced as the Type. If no match is found, an uninterpreted type is created. If you do not type any text for <parameter type>, the Type is left blank. Ensure that you prefix the parameter type with a colon.
<default> is the Parameter's Default. If you do not type any text for <default>the Default is left blank.
If the Parameter's signature is greater than 200,000 characters, the Default value is not included in the signature. If the Default value is not included and you change the signature, the Default value will not be changed. If the Default value is not included and you want to clear the Default value through the signature, you must include '= ' at the end of the signature. Ensure that you prefix a default value with an equals character.
You can change the Activity's Signature through the Activity's Property Pages.
After creating an Activity, type the following text in the Signature property: Set Alarm (in Status : short = off)
The preceding Activity Signature performs the following tasks:
Changes the Name of the Activity to Set Alarm.
Creates a Parameter named Status:
Sets the Mechanism of the Parameter to 'in'.
Sets the Type of the Parameter to short, referencing the short Basic Type.
When a Parameter appears on the Items tab of an Activity's Property Pages, you can specify the Parameter's Mechanism, Name, Type and Default through the <mechanism> <parameter name> [: <parameter type>] [= <default>] syntax.