Creating Attribute Definitions 
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.
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.
.
You have opened the Enterprise Services Repository perspective in SAP NetWeaver Developer Studio. For more information, see Working with Enterprise Services in SAP NetWeaver Developer Studio
In the Metamodel Explorer view, from the context menu of an interface object, choose New Attribute Definition.
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:
|
Choose Finish.
The Attribute Definition editor appears.
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. |
If you want to predefine the values that a user can assign to the attribute, proceed as follows:
In the Values section, choose Add.
In the dialog that appears, enter a value and choose OK.
Repeat the above step to define the required values.
Assign this attribute definition to different types of interface objects by following the steps below:
In the Associated Entities section, choose Add.
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.
If you want to assign constraints on the values that the user can enter, proceed as follows:
On the Constraints tab page, choose Add.
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.
Choose OK.
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.
End of the note. |
If you choose Transition Constraint in step 7, proceed as follows to assign authorizations to users to execute transitions:
In the Transition Constraint table, select the row for which you want to assign authorizations.
In the Authorizations for Transitions table, specify the user, group, or role to execute the selected transition.
Repeat the above two steps to assign authorizations for all the defined transitions.
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.