Any static enumeration

Prev Next

See also: Static enumeration, Any enumeration

Resolver – Abstract

Purpose: Returns a statically determined static enumeration value from an arbitrary static enumeration.

Tooltip

  • Usage: The resolver returns the static enumeration value selected per parameter. The input value is ignored.

  • Parameter: The single parameter allows static single selection from all values of all static enumerations.

images/download/attachments/128387088/image2023-1-11_12-10-14-version-1-modificationdate-1676010835666-api-v2.png

â–ºIMPORTANTâ—„ All resolvers for Static values ignore the input value. Within a resolver chain (see Chained resolver) this prevents the processing of all preceding resolvers (if any).

The Any static enumeration resolver returns a statically determined value from any static enumeration.

Since there is no parent class for 'static enumeration values', there is also no context for a value configuration in which the Any static enumeration resolver would be automatically suggested.

This means that the Any static enumeration resolver can only be accessed specifically (via a context menu in a value configuration) to insert a static enumeration value without any reference to a specific static enumeration in the context.

â–ºNOTEâ—„

  • Unlike Enumerations, static enumerations are defined exclusively in Java code, so there is no overview of all static enumerations in Lobster Data Platform / Orchestration. They cannot be listed via Search API either. The Combobox element in the Any static enumeration resolver is the only way to access all static enumerations and their values via the user interface.

  • Often the enumeration type is uniquely determined by the context when a value configuration statically assigns a static enumeration value. Then a Static enumeration resolver automatically appears instead of the Any static enumeration resolver. This also applies if the context is only subsequently 'specified' by changes in the environment of an existing value configuration with the Any static enumeration resolver (for details, see the 'Configuration' section for the Static enumeration resolver).

  • The Any enumeration resolver provides access to the values of dynamic enumerations defined in Lobster Data Platform / Orchestration (see Enumerations).

Configuration

The Combobox element allows static single selection for values from all static enumerations.

Its search function looks for matches between the text input and the enumeration value labels listed in the dropdown. The label contains the following components:

  • The localization for the name of the static enumeration, e.g. 'Import action'.

  • The localization for the static enumeration value, e.g. 'Delete'.

  • The internal name of the static enumeration value, e.g. DELETE.

images/download/attachments/128387088/image2023-1-11_12-9-6-version-1-modificationdate-1676010835684-api-v2.png

The static enumeration to which a selected value belongs is identified as the class for the return value.

images/download/attachments/128387088/image2023-1-11_12-9-38-version-1-modificationdate-1676010835672-api-v2.png

Example

An If then else event action is intended to execute a block of event actions within an event handling exactly when the trigger registered at runtime is included in a positive list of events.

The event handling is executed as a whole by the 'Create', 'Update' and 'Delete' events. The specific event actions are triggered only on 'Create' or 'Update'.

Configuration:

The If then else event action is configured with an Entity property rule as shown on the right:

  • On the left side of the Entity property rule, the Triggering event resolver returns the triggering event.

  • Since the condition should be fulfilled for more than one triggering event, the In list comparison type is used so that a list is expected as the compare value (right).

  • A list of statically defined events from the static enumeration 'Common' (see Common action event) is compiled as a compare value (right). This is made possible by the Create list resolver, for which two entries must be created here by clicking on the images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/add.svg symbol.

  • The context is undefined for the value configuration per input. It is an arbitrary decision that only entries from the static enumeration 'Common' (CommonActionEvent) should be selected. Therefore, the Any static enumeration resolver must be selected via a context menu in order to be able to select the 'CREATE' and 'UPDATE' events.

images/download/attachments/128387088/image2023-1-11_12-6-52-version-1-modificationdate-1676010835687-api-v2.png

â–ºNOTEâ—„ Trying to set the context for the compare value by concatenating an Input object (type safe) resolver with the Type 'Common' (CommonActionEvent) and the Triggering event resolver does not have the desired effect, as shown in the image, that a Static enumeration resolver for the enumeration type 'Common' appears for each of the entries of the Create list resolver in the compare value.

However, this is only because the In list compare type is used here, which does not map the type in the context on the left to the contained entries.


In conjunction with the Equals compare type, however, the desired effect can be achieved by using two instances of the Entity property rule in an OR conjunction (see below):

images/download/attachments/128387088/image2023-1-11_12-5-52-version-1-modificationdate-1676010835693-api-v2.png

images/download/attachments/128387088/image2023-1-11_12-4-15-version-1-modificationdate-1676010835700-api-v2.png