DispatchProEventPostExecuter – Dispatch event (Phase 5)

See also: DispatchProEventPreParser – Dispatch event (Preprocessing), DispatchProEventResponse – Dispatch event (Response path)

In phase 5 (_data profile), the Integration Unit data can be transferred directly to the Lobster_pro system via an event. The data can be further manipulated there or completely different data can be returned to the output paths.
The event is executed in the context of a Lobster_pro user, which must be specified in the configuration.

If the IU data is a known entity in the Lobster_pro system, it is loaded and transferred to event handling as input data. Otherwise, the data is written to the 'data' event handling variable.
All profile variables are included in the 'profileVariables' variable and can be accessed directly via the Object property value resolver (variable name = field name).

Data that is to be transferred to the output paths must be written to the 'result' variable.
Result types are treated as follows:

  • String – Forwards this in text format

  • Content – Forwards this in binary format

  • Other – An attempt is made to serialize as XML or JSON. The format depends on the Integration Unit or the targetFormat parameter (see configuration).

In the 'Configuration file' field, both the path to a file and the configuration can be specified directly in 'Name=Value' pairs, separated by semicolons (Name1=Value1;Name2=Value2).
Folgende Konfigurationsparameter werden unterstützt:

Parameter name

Optional

Description

eventName


The name of the Custom action events to be triggered.

userName


The name of the Lobster_pro user in whose context the event is processed.

selectedRole

If the user has only one role assigned.

The ID of the role used by the user.

selectedCompany

If the user has only one company assigned.

The ID of the company used by the user.

locale

Yes

The language of the user as a locale code (e.g. 'de_DE'). Default: User locale.

useRaw

Yes

true or false (default):

If true, the data is passed directly in raw form (binary, as a content object) to event handling.
Tip: A content object can also be read directly as a string by value resolvers and actions (e.g. set value to string variable).

If false, an attempt is made to read the data as text and to read it as an object. JSON and XML are supported.

charSet

Yes

The character coding of the integration unit and the output format.
If useRaw=true, the character encoding for reading in the data is ignored.
If a content object is returned by event handling, the encoding for the output data is ignored.

targetFormat

Yes

XML or JSON

Specifies the format in which output data that is not of the string or content type is written.