Chapter 3 Building Structural Diagrams


Operation property sheet Parameters tab

The Parameters tab lists the parameters of your operation. A parameter is a specification of a variable that can be changed, passed, or returned. It has a type that indicates the flow of information, a name, and a code.

Steps To create an operation parameter:

  1. Select the Parameters tab in the operation property sheet.
  2. Click the Add a Row tool, and then double-click the arrow at the beginning of the new parameter row to open its property sheet.
  3. Enter any necessary properties (including the required "Parameter Type" property) as follows:

    Property Description
    Parent To which the operation belongs
    Name Specifies the name of the item, which should be clear and meaningful, and should convey the item's purpose to non-technical users.
    Code Specifies the technical name of the object, which is used for generating code or scripts.
    Comment Descriptive comment for the object.
    Data type Set of instances sharing the same operations, abstract attributes, relationships, and semantics
    Array When selected, turns attributes into table format
    Array size Specifies an accurate array size when the attribute multiplicity is greater than 1.
    Variable Argument Specifies that the method can take a variable number of parameters for a given argument. You can only select this property if the parameter is the last in the list.
    Parameter Type Direction of information flow for the parameter. Indicates what is returned when the parameter is called by the operation during the execution process. You can choose from the following:

    • In - Input parameter passed by value. The final value may not be modified and information is not available to the caller
    • In/Out - Input parameter that may be modified. The final value may be modified to communicate information to the caller
    • Out - Output parameter. The final value may be modified to communicate information to the caller
    Default value Default value when a parameter is omitted. For example:

    Use an operation oper(string param1, integer param2) , and specify two arguments oper(val1, val2) during invocation. Some languages, like C++, allow you to define a default value that is then memorized when the parameter is omitted during invocation.

    If the declaration of the method is oper(string param1, integer param2 = default), then the invocation oper(val1) is similar to oper(val1, default).
    WSDL data type Only available with Web services. Defines the XML-Schema/SOAP type used during invocation of a Web method (using http or Soap)
  4. In - Input parameter passed by value. The final value may not be modified and information is not available to the caller
  5. In/Out - Input parameter that may be modified. The final value may be modified to communicate information to the caller
  6. Out - Output parameter. The final value may be modified to communicate information to the caller
    Property Description
    Parent To which the operation belongs
    Name Specifies the name of the item, which should be clear and meaningful, and should convey the item's purpose to non-technical users.
    Code Specifies the technical name of the object, which is used for generating code or scripts.
    Comment Descriptive comment for the object.
    Data type Set of instances sharing the same operations, abstract attributes, relationships, and semantics
    Array When selected, turns attributes into table format
    Array size Specifies an accurate array size when the attribute multiplicity is greater than 1.
    Variable Argument Specifies that the method can take a variable number of parameters for a given argument. You can only select this property if the parameter is the last in the list.
    Parameter Type Direction of information flow for the parameter. Indicates what is returned when the parameter is called by the operation during the execution process. You can choose from the following:

    • In - Input parameter passed by value. The final value may not be modified and information is not available to the caller
    • In/Out - Input parameter that may be modified. The final value may be modified to communicate information to the caller
    • Out - Output parameter. The final value may be modified to communicate information to the caller
    Default value Default value when a parameter is omitted. For example:

    Use an operation oper(string param1, integer param2) , and specify two arguments oper(val1, val2) during invocation. Some languages, like C++, allow you to define a default value that is then memorized when the parameter is omitted during invocation.

    If the declaration of the method is oper(string param1, integer param2 = default), then the invocation oper(val1) is similar to oper(val1, default).
    WSDL data type Only available with Web services. Defines the XML-Schema/SOAP type used during invocation of a Web method (using http or Soap)
  7. Click OK to add the parameter to the operation.

 


Copyright (C) 2006. Sybase Inc. All rights reserved.