Show TOC

Creating Attribute DefinitionsLocate this document in the navigation structure

Prerequisites

  • You are familiar with the basics of attribute definitions and custom attributes. For more information, see Custom Attributes .

  • You have set the value of the aii property com.sap.aii.ibrep.server.mme.swcv to the ID of the software component version under which you want to create attribute definitions.

    Note

    The software component version ID is available in the editor of the software component version in the ES Builder.

    For more information on how to set the value of the aii property, see Modifying Properties for Managers and Services section in Java System Properties .

    .

Context

You create attribute definitions if you want to customize or extend the SAP delivered SOA entity types to suit your needs.

Note

You can create attribute definitions only in the SAP NetWeaver Developer Studio.

Procedure

  1. In the Metamodel Explorer view, from the context menu of an interface object, choose New Attribute Definition .
  2. In the dialog that appears, enter the following data:

    Field

    Description

    Name

    Name of the attribute definition.

    Category

    Value used to group similar attributes. For example, to group governance related attributes, enter the Governance . Use this value to search for attributes.

    Value Type

    Defines the type of value that you can assign to the attribute. Select from the following value types:

    • Boolean

    • Date

    • Integer

    • String

    • URL

      Select this value type if you want to assign a Java URL to the attribute definition.

    • Lifecycle status

      Select this value type if you want to define and track the different states of an interface object.

  3. Choose Finish .

    The Attribute Definition editor appears.

  4. In the Behavior section, select the required check box.

    Field

    Description

    Export with Content

    Allows export of this attribute definition along with the interface objects.

    Deselect this check box, for example, if you have an attribute that is internal to a system and you do not want it to be transported to other systems.

    Allow Multiple Values

    Allows user to enter multiple values for a single attribute.

  5. If you want to predefine the values that a user can assign to the attribute, proceed as follows:
    1. In the Values section, choose Add .

    2. In the dialog that appears, enter a value and choose OK .

    3. Repeat the above step to define the required values.

  6. Assign this attribute definition to different types of interface objects by following the steps below:
    1. In the Associated Entities section, choose Add.

    2. In the dialog that appears, select the type of interface object and choose OK.

      Note

      You can select multiple types of interface objects using the CTRL key.

  7. If you want to assign constraints on the values that the user can enter, proceed as follows:
    1. On the Constraints tab page, choose Add .

    2. Depending on the value type chosen for the attribute definition, you can select from one or more of the following constraint types:

      • Pattern Constraint - Defines the format for string and URL values.

      • Integer Range Constraint - Defines the permissible range of the integer values.

      • Transition Constraint - Defines the transition from one lifecycle state to another.

        For a transition constraint, you can assign authorizations to users to execute the defined transitions.

    3. Choose OK .

  8. Based on the type of constraint you choose in step 7, enter the relevant values for the constraints using the description below:

    Selection

    Values

    Pattern Constraint

    Enter the constraint for string or URL values.

    For example, for a URL constraint, you can provide the value https://* . You can use * and ? as wild characters while defining pattern constraints.

    Integer Constraint

    Enter the minimum and maximum permissible values of the integer.

    Transition Constraint

    Enter the Target State for every Source State .

    Note
    • You can enter the Target State values only if you have assigned values to the attribute definition in step 5.

    • The first value in Values table is considered as the Initial state.

  9. If you choose Transition Constraint in step 7, proceed as follows to assign authorizations to users to execute transitions:
    1. In the Transition Constraint table, select the row for which you want to assign authorizations.

    2. In the Authorizations for Transitions table, specify the user, group, or role to execute the selected transition.

    3. Repeat the above two steps to assign authorizations for all the defined transitions.

Results

Assign values to the defined attributes in the interface objects. You can assign values to attributes in both the ES Builder and SAP NetWeaver Developer Studio.

For more information on how to assign values to custom attributes in ES Builder, see Assigning Values to Custom Attributes .