Dynamic enumerations
When user interfaces of Lobster Data Platform / Orchestration feature settings, assignments or selections based on a predefined list of options, dynamic enumerations often determine the choices available.
Each dynamic enumeration is a an extendible list of elements, composed for a specific purpose in Lobster Data Platform / Orchestration. Often the enumeration serves as a 'catalogue', that explicitly defines permitted values for a certain property or types available within a category.
Per installation the system already provides a variety of dynamic enumerations, e. g. for Company type, Document type, several types of Units as well as enumerations for managing custom attributes per type of data (Text, Numeric, Date, Flag, Reference and Free enum type). These preset dynamic enumerations cannot be deleted as a whole, but may be 'adjusted' as required by editing existing and appending own elements.
Dynamic enumerations and the elements contained may be localized by Localization or Company specific localization, so users maintaining data or configuring the system encounter plain text labels rather than technical identifiers.
In the most simple an common case a dynamic enumeration contains a simple and more or less extensive list of elements, identified by a name, that must be unique within the enumeration and is also used as key value, e.g. to store in data objects. The dynamic enumeration for 'salutation' (internally identified as: de.lobster.scm.base.address.Salutation), may serve as a comprehensible example, with preset elements 'Company', 'Mr.', 'Ms.' (internally named COMPANY,MR, MS).
It is possible to add dynamic enumerations of this simple type to the system, to introduce own categories including elements. For example, a new dynamic enumeration could be created by the name ORIENTATION, localized as "Orientation" in English and initially populated with elements named N/E/S/W (localized as 'North', 'East', 'South', 'West'). Should the need arise, this scale could be easily refined by adding elements NE/SE/SW/NW or maybe NNE/ENE/ESE/SSE/SSW/SWS/WNW/NNW to the list.
Some of the dynamic enumerations predefined by the extend the enumeration by adding specific parameters to define values for per each element. Units use parameters for Unit conversion (see highlighted columns in screenshot below), each Working state can be linked to a hexadecimal color code and each Delivery instruction type can use its own validation rule and messaging. At the bottom of this page a list of help entries for predefined dynamic enumerations is provided, which specify details for parameters where applicable.
►NOTE◄ Parameter extensions are not supported for custom dynamic enumerations. In the context of the above example ('Orientation') it is not possible to simply add a parameter column 'compass heading', to assign heading values 360/090/180/270 for elements N/E/S/W.
Localization
Dynamic enumerations are subject to localization by Localization and, if required, Company specific localization with respect to the name of the enumeration as such as well as the individual elements contained.
The previously introduced example of an enumeration for 'Orientation' might be localized as follows:
The Enum name defines the Resource bundle. Predefined enumerations use a longer class name, such as de.lobster.scm.utils.LengthUnit for the enumeration for length units. The name for the enumeration can be localized by Resource name '$name'.
The element names appear as Resource names for the same Resource bundle.
►NOTE◄ When featured in forms, the elements of an enumeration appear are sorted alphabetically (ascending) according to localization. To force the given choices for 'Orientation' into the typical order (clockwise from 'North'), an index number is used as a prefix in all localization entries. This also ensures that options appear in the given order independent of language.
Editing dynamic enumerations
This screenshot shows the overview of 'Dynamic enums'.
Clicking New (1) in the Ribbon opens the 'Dynamic enums (definition)' view, with a new dynamic enumeration object.
When a single item is selected in the list (2), the ribbon button Edit (3) opens the same view (see next screenshot) for editing the enumeration and its elements.
Delete (4) is only available for a selection of one or more 'custom' enumerations in the list. Enumerations predefined by the system may be edited but not deleted.
►WARNING◄ Deleting custom dynamic enumerations may lead to inconsistencies, if the enumeration is already referenced by instances of business objects.
The list (1) shows all existing elements of the dynamic enumeration.
Parameters for an element are shown and edited in the Details (2) section. The Name field appears as 'read-only' for entries already saved, because this internal name serves as a key value, which should not be changed once the element is referenced by business objects, forms, etc. Instead, the language specific plain text presented to users may be redefined by adjusting localization whenever necessary. To enable corrections, the write-protection for element names can be unlocked temporarily by clicking the 'Padlock' button. However, this function should only be applied before putting elements in use.
Elements can be added by clicking the New (3) button and deleted by clicking Remove (4).
Changes to the enumeration or the listed elements are applied effectively when Save (5) is clicked.
►NOTE◄ Only 'custom' elements may be deleted. Elements predefined by the system cannot be deleted. Users access to specific predefined elements of a dynamic enumeration should be prevented by configuring Dynamic enum filters or restrictions per Combobox in Form designer.
►WARNING◄ It is not recommended to remove elements already referenced by data objects with regard to data consistency and to prevent the risk of ambiguity, since the name of a removed element might be re-introduced into the same enumeration in the future for a different purpose. Again, Dynamic enum filters or restrictions per Combobox in the Form designer should be configured to prevent user access instead of deleting them from the system.