Restrict the value range for strings

You can define a value range for an object class property of the type String or StringArray with one of the following methods:

If you define a query-based range definition for an object class property having an enumeration assigned, users can only select strings included both in the enumeration and in the query results.

If you define a range restriction for an object class property already in use, available settings not matching the restriction will persist in the database until a user manually changes them to an allowed value.

The restrictions will only be applied to data workbenches, property groups in data workbenches, and guided data entry views. If you have migrated an existing database from an Alfabet 10.15.x release, you need to additionally configure the restriction in your editors and wizards with the methods valid for editors and wizards.

  1. Go to the Presentation tab.
  2. In the explorer, expand the nodes Class Settings > the object class (stereotype) you would like to edit > the class settings you would like to edit.
  3. Right-click the Properties node and select Modify Property Behavior.
  4. The new property modification will be added as last child node of the Properties node with a random property assignment. Click the node and select the relevant object class property in the Property Name attribute.

    Each object class property can only be added once to the Properties node. If you do not find the object class property in the drop-down list, there is already a modification for this property. Change the existing property modification node.

  5. Open the editor of the Value Range Definition > Range As SQL Query attribute and define a native SQL query according to the following rules:
    • The query must return the string values in the first column of the dataset. All other columns will be ignored.
    • You can define an empty selection with a NULL value:
      • SELECT NULL AS 'Value'
      • UNION ALL
      • SELECT 'String 1' AS 'Value'
      • UNION ALL
      • SELECT 'String 2' AS 'Value'
    • You can use Alfabet query parameters except the BASE parameter and parameters related to specific context, like wizard or workflow related parameters.
    • The sorting of strings in the drop-down list on the user interface is identical to the order of strings returned by the query.
    • If an enumeration is assigned to the object class property in the Enumeration attribute, your query should only return strings defined in the enumeration. If the query defines values outside the enumeration scope, these values are ignored. The order of strings in the query supersedes the order of strings in the enumeration.
  6. Optionally, change the caption, hint and availability on the user interface for the object class property.

Enumerations restrict the value range for the object class property they are assigned to.

Enumerations consist of one enumeration item per allowed value. You can edit the number or order of enumeration items, and the display of values on the Alfabet user interface.

Go to the Meta-Model tab in Alfabet Expand and expand the Enumerations node in the explorer and do any of the following:

Add new enumeration items. Right-click the node of the enumeration and select Add New Enumeration Items. You can define one or multiple enumeration items in the editor. Separate enumeration items with a line break. An empty row will create an empty enumeration item for not setting any value. The enumeration item value is displayed on the user interface if no caption is defined in the attributes of the enumeration item.

Delete enumeration items. Right-click the enumeration item node and select Delete.

Change the order of enumeration items. Click the enumeration node and open the editor of the Sort Enumeration Items attribute. Select an item in the list and change its position with the arrow buttons on the right or sort the content lexicographically.

Change the caption and icon of enumeration items. Caption and icon are used to represent the enumeration on the user interface. A hint is currently not displayed for enumeration items on the user interface. Click the enumeration item node and change the attributes:

Change the colors used for enumeration items. Coloring is used to display enumeration items in data workbenches, content areas and business charts. Colors can be assigned directly in the enumeration item or assigned via style groups. Coloring defined in style groups can be adapted to the overall design of custom themes on the user interface. If the user selects a different theme to be applied, the colors used for enumeration items will change according to the setting for the style group in the selected scheme. Users may then see an enumeration item in dark green in one scheme and in light blue in another scheme. Scheme configuration is designed to consider 508 compliance and to provide a means to customers to adapt the styles to their corporate identity. The following description includes the definition of a new style group. For many protected enumerations, there is already a style group defined. You can then change the values in the existing style group instead of defining a new one.

  1. Go to the Reusable Elements tab.
  2. Right-click the User Interface Groups node and select Create New Style Group.
  3. Click the new style group node and set the attributes:
    • Name: Change the name to a meaningful name for display in the explorer in Alfabet Expand.
    • Caption: Change the caption to a meaningful caption for display in the Alfabet user interface in the views to edit the coloring for a new custom theme.
    • Type: Select Enum.
  4. For each enumeration item in your enumeration, do the following:
    1. Right-click the style group node and select Create Style.
    2. Click the new style node and change the Name and Caption attributes to match one of the enumeration item values in your enumeration.
    3. Expand the style node, click the child nodes and set the Default Color attribute for the following colors:
      • Chart Color: The color used in business charts to represent the enumeration item.
      • Background Color: The background color used in data workbenches and content areas for the enumeration item.
      •  Border Color: The border color used in data workbenches and content areas for the enumeration item.
      •  Color: The font color used for the text of the enumeration item in data workbenches and content areas.

      enumColor 

  5. Go to the Meta-Model tab.
  6. For each enumeration item in your enumeration, do the following:
    1. Click the enumeration item node and edit the attributes:
      • Style Group: Select the style group for the enumeration.
      • Style: Select the style of the enumeration item in the style group.

In Alfabet, the release status definition describes the approval process for objects in the company. You can define the different stages of the approval process and the allowed transitions between the stages. Each object class and object class stereotype can have a different release status definition. Usually, the release status of an object is subject to changes while the object is in a draft object state. Active objects are then fully approved and usually do not change the release status.

Alfabet offers a default release status configuration that you can adapt for each object type. You can define different approval processes for different kinds of objects, like applications, devices, and projects. Adaptation of the release status configuration is only mandatory if you define object class stereotypes for an object class having a release status definition.

This release status should be defined as part of the initial configuration of the Alfabet solution. The definitions for object classes or object class stereotypes users already work with should not be changed.

  1. Go to the Presentation tab.
  2. Double-click XML Objects > ReleaseStatusDefs.
  3. Alter the release status definition in the XML. The release status is defined with the XML attributes of the following XML elements:
    • <ReleaseStatusDef>
      • <StatusTransition/>
      • <Status/>
    • </ReleaseStatusDef>
    • ReleaseStatusDef: Defines the release status values for one or multiple object classes or object class stereotypes. You can define multiple XML elements ReleaseStatusDef to define different approval process statuses for different types of objects. Define the following attributes:
      • ClassNames: Define for which object classes or object class stereotypes the release status definition shall apply. You can define multiple object class names in a comma separated list. Object class stereotypes are defined as <opbject class name>:<stereotype name>, like for example ApplicationGroup:CloudServer.
      • StatusSet: Define all release status values for the approval process in a comma separated list of strings.

        Only ASCII characters made be used in the name of an enumeration item. Please note that NO error will be displayed if you use characters that do not conform to ASCII.

      • EditableStatusSet: Enter a comma-separated subset of release status values defined in the XML attribute StatusSet. An object having one of the defined status values will be editable for users with ReadWrite access permissions to the object. If you do not define an editable status set, objects will be editable regardless of the release status value.
      • RetiredStatusSet: Enter a comma-seperated subset of release status values defined in the XML attribute StatusSet . An object having one of the defined status values will be regarded as retired. Only retired objects can be deleted. If you do not define a retired status, only users with administrative access permissions will be able to delete objects. If retired objects shall not be editable, you must also add the relevant release status values to the XML attribute EditableStatusSet.
      • DefaultStatus: Enter one status that shall be the release status value of new objects upon creation.
    • StatusTransition: Defines the order of the release status values in the approval process.