Profile call


Value resolver – Abstract

Purpose: This converts the data of the input value into a "server XML", which is passed in a synchronous profile call to the lobster_data profile identified by Profile name.

See also: Call profile (Event action)

images/download/attachments/201662293/image-2025-3-14_10-25-10-version-1-modificationdate-1741944310421-api-v2.png

The Profile call value resolver converts the data of its input value into a 'server XML' (see Object to server xml) to pass it to the Lobster_data profile identified by Profile name.

  • Optionally, the values of the Variables MSG_CALL can be specified via value resolvers during the Profile call (see 'Configuration' for details).

The profile is always called synchronously. The processing context of the value resolver is therefore interrupted until the called profile has been processed.

  • The processing context is canceled with an error message ('Failed to call profile...') if the called profile does not exist, which causes a rollback for the surrounding transaction.

  • If the called profile exists but is not 'unlocked (active)', the processing context is immediately continued. The value resolver then returns 'No value'.

  • If an error occurs during the execution of the called profile or is specifically triggered, the processing context is canceled or continued (with 'No value' as the return value of the resolver) depending on the selection for the Fail on profile error? option.

A return value from the profile can optionally be considered, provided the profile serves an active response path for Lobster_pro – e.g. via SCM:de.lobster.scm.dw.util.CronPassBackDataResponse.

Depending on its parameters, the value resolver returns one of the following data types as a return value via the options Parse result and Use as string – possibly in interaction with further details within the profile configuration:

  • Action event content, e.g. with the binary data of a graphic or file supplied as the target file of the profile (in the body field).

  • A data object created by 'parsing' a 'server XML' target file of the profile (see Server xml to object).

  • Text (string) obtained either directly from the target file returned by the profile or from the data object parsed from it.

images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/warning.svg CAUTIONimages/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/warning.svg From a strictly technical point of view, the Profile call value resolver can be used like any other value resolver at all positions in configurations where a 'value' is supposed to be resolved. However, with respect to performance, caution should be exercised when used in contexts where the value in question must be 'resolved' paticularly frequently. This applies especially to the definition of Association criteria, which are not configured as logic components (see Association criteria of type 'Logical component' type) and are therefore typically evaluated by the system with a very high frequency..

Special use case: update an entity passed as input value

If the input value for the value resolver is an 'entity' as a data object, a suitable XML target structure can be interpreted as an update for this entity, in the same way as the logic applicable for an Import. Whether this mechanism takes effect or not depends on the selection for the option Parse result – possibly in interaction with the profile variables VAR_PROCESS_XML und VAR_APPLY_TO_INPUT – with the following case distinction:

Option 'Parse result'

VAR_PROCESS_XML

VAR_APPLY_TO_INPUT

Impact on input value (entity)

Return value (note below!)

images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg Parse result


(Haken) trueor
empty or not used

(Haken) trueor
empty or not used

Update
based on the target structure

Updated entity (parsed)

(Fehler) false

Input value unchanged

Target structure (parsed as entity)

(Fehler) false

irrelevant

Input value unchanged

images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg

Do not parse result

(Haken) true

(Haken) true

Update
based on the target structure

Target structure as text(file)
in the body of an 'contact' object

all alternative combinations

Input value unchanged

NOTE◄ If the Use as string option is set, then the return value specified in the table is subsequently converted to a string:

  • Then its string conversion appears instead of an entity, e.g. 5751:en.lobster.scm.order.bto.Order@658e4a20 for the data object of an 'order' with the ID 5751 (and the Java Object Id 654e4a20).

  • The string conversion for a 'Content' object that contains the base64-encoded text of a target structure in the body provides the 'server XML' for the target structure (and not for the updated entity, for example).

IMPORTANT◄ While an Import implicitly saves the updated entity, an update via the Profile call value resolver only affects the volatile data object of the entity in question. If a Profile call value resolver is used within the 'Validating rule' of an event handling, the updated state is crucial for all subsequent rules, if any, and also for event actions executed when the validation is passed. Whether the update is saved, and therefore permanently effective, depends on the further context of the call. Within an event handling, the entity in question can be marked to be saved upon successful completion of the transaction via the Save changes later event action, if required.

Assignments to MSG_CALL variables in the profile:

Information about the applicable login context (company, role, user) is automatically assigned to the MSG_CALL variables predefined in profiles – as usual for profile calls from Lobster_pro. These are automatically filled with values at runtime depending on the session's login data as well as, if necessary, taking into account any adjustments made by the Ausführen als event action:

Data object

Value

Variable nname
(in Lobster_data)

Data type
(in Lobster_data)

Company of session

ID (id) of the company account

MSG_CALL_SCM_Company_id

BigInteger

Company account data object as XML (text)

MSG_CALL_SCM_Company_xml

String

Role of session

ID (id) of the role

MSG_CALL_SCM_Role_id

BigInteger

User of session

ID (id) of the user account

MSG_CALL_SCM_User_id

BigInteger

User name (username)

MSG_CALL_SCM_User_username

String

Data object of the user account as XML (text)

MSG_CALL_SCM_User_xml

String

Optionally, value assignments can be configured for further Variables to provide additional data to the called profile.

Configuration

In the Profile name parameter, the profile to be called must be identified by a static direct entry or by selecting an entry from the drop-down list activated via 'Auto-complete'.

NOTE◄ In contrast to calling profiles in the context of forms, access control for profiles based on Profile securities is not guaranteed. All available profiles can be selected and executed.

images/download/attachments/201662293/image-2025-3-14_10-24-32-version-1-modificationdate-1741944271920-api-v2.png

The Fail on profile error? option decides how event processing reacts to an error while executing the profile:

  • If the Fail on profile error? option is selected, then an error that occurs or is triggered during a profile execution will result in a ProcessException in the processing context of the value resolver. Within Event handling, this always causes a rollback for the current transaction in addition to the output of an error message, unless errors are specifically handled in the context of the value resolver ((Try/Catch actor) or ignored across the board (e.g. when defining attachments in a send mail event action).


  • If the Fail on profile error? option is not selected (default), then the occurrence or triggering of an error in the course of profile execution does not lead to a cancellation.

  • In the event of an error, the return value of the value resolver depends on the origin of the error (see notes on the right) and the selection for the options Parse result and Use as string.

images/download/attachments/201662293/image-2025-3-14_10-23-49-version-1-modificationdate-1741944228909-api-v2.png

Notes on error handling:

  • If a ProcessException occurs or is triggered in the course of a profile call, the error message is always 'Failed to call Profile: (...)'. Details about the cause of the error can be found in the generated error report under 'Caused by (...)'.

  • The error report for a ProcessException can optionally be downloaded in the message dialog or displayed by clicking on 'More' and evaluated with a browser search, if necessary.


images/download/attachments/201662293/image-2025-3-14_10-23-31-version-1-modificationdate-1741944211272-api-v2.png

Notes on error handling:

  • Errors during profile execution are ignored. However, a ProcessException (possibly with rollback) may occur, e.g. if the addressed profile does not exist.

  • If, according to the configuration, a 'Content' is expected as a return value of the value resolver (the options Parse result and Use as string not selected), the value resolver returns an 'empty' data object of this type in the event of errors, whose fields contain the value null ('no value') but not a total of 'no value' (null). A Default value resolver can therefore only be used with reference to a field (e.g. body) to assign a default return value for the error case. If the Use as string option is selected, the value resolver returns the string conversion of the body value by default, so that "no value" (null) is returned in case of error. Then a Default value resolver takes effect even without explicit reference to a field of the 'Content' object.

  • If an 'object' is expected as a return value (option Parse result is selected), then the type of the return value depends on how the error occurred during profile execution:

    • If an error defined for Lobster_data occurs in one of the phases when executing the profile, or if a function such as throw exception is executed in the mapping, then a specific error object is returned to Lobster_pro. Lobster Data Platform / Orchestration identifies this error type after parsing via an entityClass variable. However, a specific Check type is not supported for the object types in question.

    • However, a profile cancellation can also be triggered by assigning the XML structure of an 'error response' object (ErrorResponse) to the VAR_ERROR_RESPONSE profile variable. Then the parser in the value resolver returns this object, which can be determined by Check type.

The option Parse result specifies that a text in XML format is expected as the return value of the profile, which can be interpreted in Lobster Data Platform / Orchestration as the 'server XML' of an object.

  • Provided that the input data for the profile refers to an entity defined in Lobster Data Platform / Orchestration, the target structure of the profile can be interpreted as an update for the volatile data of this entity. As shown in the above table under 'Special use case', an update can be used with and without selecting the Parse result option. However, the Parse result option is typically selected so that the updated entity is immediately available as the return value of the value resolver.


  • If the Parse result option is not selected (default), then the return value of the profile will be returned by the value resolver either as 'Content' or as text (see Use as string).

images/download/attachments/201662293/image-2025-3-14_10-22-34-version-1-modificationdate-1741944153721-api-v2.png

  • If the Parse result option is selected, the profile should return a target XML structure that is read as 'server XML' if it runs without errors. Lobster SCM templates (e.g. DEFAULT:list for a 'list') are available for building the suitable target structure. In addition, the input data of a profile addressed by Profile call reflects the 'server XML' structure of the associated input value.


images/download/attachments/201662293/image-2025-3-14_10-23-8-version-1-modificationdate-1741944187857-api-v2.png

  • If the called profile returns binary data (e.g. the content of a graphic or a specific application file), the Parse result option should not be selected.

The Use as string option determines whether the return value of the value resolver should return the data obtained from the profile call directly or formatted as text.

  • If the Use as string option is selected, the value resolver returns the string conversion of the actual return value.


  • If the Use as string option is not selected (default), the data (a parsed data object or the binary data from the profile as the body of a 'Content' object) will be used directly as the return value.

images/download/attachments/201662293/image-2025-3-14_10-22-9-version-1-modificationdate-1741944128906-api-v2.png

  • If the Use as string option is selected, data from the profile can be displayed in Lobster Data Platform / Orchestration as a text value, assigned or further processed e.g. via concatenation with other value resolvers.


images/download/attachments/201662293/image-2025-3-14_10-21-43-version-1-modificationdate-1741944102820-api-v2.png

  • If the called profile provides binary data (e.g. the content of a graphic or a specific application file), the Use as string option should not be selected.

In the Variables area, the symbols images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/add.svg and images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/forbidden.svg assignments of values to profile variables can be added or removed. The following specifications are provided for each variable:

  • A Variable name (required field) must be specified. The specified name is prefixed in the profile with MSG_CALL_. Corresponding variables (in the illustrated case e.g. MSG_CALL_FILENAME_PREFIX) must be explicitly created in the called profile so that a Value is assigned.

  • A Value resolver must be configured as a value (required field), the evaluation of which determines the value for the addressed profile variable at runtime.

  • The Send as file option appears if the configuration for the Value refers to a data type (such as 'Content') that can optionally pass a reference to a temporary file that is automatically deleted after the profile call, instead of a direct assignment.

images/download/attachments/201662293/image-2025-3-14_10-20-31-version-1-modificationdate-1741944031332-api-v2.png