--- title: "Execute with" slug: "core-with-actor" updated: 2026-03-31T06:50:30Z published: 2026-03-31T06:50:30Z canonical: "docs.lobstersoftware.com/core-with-actor" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Execute with > [!NOTE] > Event action – Abstract > > **Purpose:** Executes event actions with an alternative reference object (entity). > > > [!TIP] > > Tooltip > > > > - **Usage**: The object value resolver determines the alternative reference object with which to execute a block of event actions. The previous reference object can be assigned to the object variable. > > - **Parameters**: object variable; object value resolver; event actions. The event action [Execute with](/v1/docs/en/core-with-actor) enables the temporary change of the *reference object* within an event handling in order to execute a block of event actions with an *alternative reference object*. ![images/download/attachments/177911205/image-2024-9-12_15-52-0-version-1-modificationdate-1726149119904-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-9-12_15-52-0-version-1-modificationdate-1726149119904-api-v2.png) ## Parameter ### Save Object in variable The **Save Object in variable** parameter can optionally be used to specify the name of a variable that can be used to access the *previous reference object* while the *alternative reference object* applies. **NOTE:** - Assigning the *previous reference object* as the value of the variable named in the **Save Object to variable** parameter only affects the execution context within the [Execute with](/v1/docs/en/core-with-actor) block. After completion of the block, this variable is assigned the previously valid value again (possibly 'no value'). - In general, however, assignments to variables are valid inside and outside the block. Another exception, however, is the variable managed by the system `entity` which always refers to the respectively valid *reference object*. - The label of the parameter reflects the type of the *previous reference object*. If a more specific entity type than 'object' results from the context of the configuration, its name appears before '... save in variable' and at the interface to the event actions. ### Object resolver The **Object resolver** defines the *alternative reference object* valid within the [Execute with](/v1/docs/en/core-with-actor) block for the execution of the event actions contained therein. After their completion, the previously valid reference object applies again. In relation to the event actions executed within the [Execute with](/v1/docs/en/core-with-actor) block, the 'reference object' has the following significance: - If other events are triggered within the [Execute with](/v1/docs/en/core-with-actor) block, they receive the *alternative reference object* as 'Input value'. - Value resolvers that refer to an inbound object process the *alternative reference object*, unless otherwise specified. Thus, an [Object property](/v1/docs/en/core-property-resolver) value resolver resolves a specific field of the *alternative reference object* if it is not used within a concatenation. **NOTE:** The [Execute with](/v1/docs/en/core-with-actor) event action can be used in cascade to override the *alternative reference object* in steps. In each level of a cascade, there is access to the reference objects of the parent levels, provided that different variable names are used in the **Save object in variable** parameter in each case. ### Event actions In the block below the parameters, event actions can be added via the ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/add.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/add(24).svg) symbol, which are executed at runtime with the *alternative reference object.* ## Examples ### Trigger notification to the owner of a business object As soon as a business object of the 'Order' type (see [Orders](/v1/docs/en/ord-order)) is assigned the 'Released' working state, the company that is considered to be the owner of the order should receive an advice note. The form of the notification should depend on the settings in the company account of the owner company. Details should control an event handling that reacts to a [Custom action event](/v1/docs/en/core-custom-action-events) ('Send advice') and expects the following data context: - As input value (`entity`) the company account of the company is to be passed, which – in the form defined in the company account – is to be notified. - A variable with the name `order` should contain the data of the order for which an advice note is to be sent. The following configuration only shows how the notification is triggered using the [Execute with](/v1/docs/en/core-with-actor) event action. Notification details are omitted here. | - The **Triggering event** here is the assignment of the working state 'Released' to any business object ([Working state (Events)](/v1/docs/en/base-working-state)). --- - The **Validating rule** includes a [Check type](/v1/docs/en/core-check-type-rule) to ensure that event handling is only active for [Orders](/v1/docs/en/ord-order). --- - Under **Actions on passed rule**, an event action of type [Execute with](/v1/docs/en/core-with-actor) is used here, which is essentially used to define the company account of the company that owns the just released order as a *reference object*. - Via the **Save Order in variable** parameter, the released order is first saved in the `order` variable. - The **Object Resolver** reads the field 'owner' (`ownerId`) from the order via an [Object property](/v1/docs/en/core-property-resolver) value resolver and passes its value to the concatenated [Input object (type safe)](/v1/docs/en/core-root-entity-resolver) value resolver, which returns the respective company account. - The **Company account** is therefore the reference object for the following block of event actions. Only one [Dispatch action event](/v1/docs/en/core-dispatch-action-event-actor) is required here, which triggers the 'Send advice ...' **Event** selected. - No value resolver needs to be specified for the **Entity**, since the **Company account** defined as the reference object serves as the input value of the event. **NOTE:** An event handler that reacts to the 'Send advice ...' event also receives, together with the input value (company account), access to the variable order with the details of the `order`, which can therefore be used as the content of a message or also in connection with a [Print document](/v1/docs/en/core-print-document-content-builder). | ![images/download/attachments/177911205/image2021-2-8_9-21-36-version-1-modificationdate-1726149008308-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2021-2-8_9-21-36-version-1-modificationdate-1726149008308-api-v2.png) | | --- | --- | ### Value assignments for multiple fields of the same object Detailed data for a new flight are requested via a modal portal (see the following screenshot), which requires the IATA code and the ICAO code as required information: | ![images/download/attachments/177911205/image2021-2-8_9-25-52-version-1-modificationdate-1726149008303-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2021-2-8_9-25-52-version-1-modificationdate-1726149008303-api-v2.png) | Clicking the **Create** button triggers a [Custom action event](/v1/docs/en/core-custom-action-events), in the data context of which the form data shown below is passed as the value of the `formData` variable: Form data (formData) ```json { "codes": { "IATA": "BER", "ICAO": "EDDB" } } ``` | | --- | --- | For further processing, the following structure is to be created from the input in the form: Target structure (newAirportObject) ```json { "iataCode": "BER", "icaoCode": "EDDB" } ``` Configuration: The transformation of the given form data into the target structure should be done within the event handling that reacts to the event triggered by the **Create** button in the portal. | Several fields must be transferred from the source structure in the variable `formData` into the fields of a target structure, which is to be newly created for this purpose in advance and stored in the variable `newAirportObject`. The entire process can be implemented in an [Execute with](/v1/docs/en/core-with-actor) action as shown on the right: - In the **Object Resolver**, a value resolver of the [Create instance](/v1/docs/en/core-create-instance-resolver) type is first used to create a new **Client object**. This new data object is assigned to the variable `newAirportObject` via a concatenated value resolver of the [Store value as variable](/v1/docs/en/core-store-value-resolver) type. - --- The new **Client object** is then used to make several value assignments via a [Set value](/v1/docs/en/core-set-value-actor) event action. The source fields (right) are read via an [Object property](/v1/docs/en/core-property-resolver) value resolver, which accesses the [Variable](/v1/docs/en/core-storage-value) `formData` via concatenation. --- - The target field can be addressed by the [Object property](/v1/docs/en/core-property-resolver) value resolver without concatenation, since the data object is considered to be an *alternative reference object* within the [Execute with](/v1/docs/en/core-with-actor) block. **NOTE:** The **Save Object in variable** (at the top) parameter is not used here, because the portal does not provide an independent reference object anyway, but only the form data in the variable `formData`. | ![images/download/attachments/177911205/image2021-2-8_9-29-49-version-1-modificationdate-1726149008287-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2021-2-8_9-29-49-version-1-modificationdate-1726149008287-api-v2.png) | | --- | --- | ### Cascading use of 'Execute with' The cascading use of the [Execute with](/v1/docs/en/core-with-actor) event action is demonstrated here with a simple example. In practice, the 'nested' use of the event action often results in much more complex structures. Based on the previous example, here is how an event handling could look like, which triggers the notification of a company, if a [Custom action event](/v1/docs/en/core-custom-action-events) of the type 'Send advice' is triggered. The following configuration assumes that this event gets a company account as 'input value' and the data object of an order in the variable `order` as described above. | - Due to a type check in the **Validating rule** not shown here, the event actions should only be executed if a **Company account** has been passed as a reference object. --- - This company account is passed to the variable `company` by the first step of the [Execute with](/v1/docs/en/core-with-actor) cascade, before the 'address' (field `address`) of the company is defined as an *alternative reference object.* - In the associated [Execute with](/v1/docs/en/core-with-actor) block, the next stage of the [Execute with](/v1/docs/en/core-with-actor) cascade already begins here by assigning the `address` to the **Save address in variable** in order to change the reference object again. Within the address a certain element within the 'Communication info' (plural attribute) is searched. - For this purpose, the [Rule list resolver](/v1/docs/en/core-list-rule-resolver) is used, which delivers the first match for the contained [Entity property rule](/v1/docs/en/core-entity-property-rule) as a new reference object here. This looks for a value with the 'Context' (`communicationContext`) 'ADVICE'. - If **Communication info** with the context 'ADVICE' is found, further event actions are to be executed with this as reference object. As indicated here, a case differentiation according to the [Communication type](/v1/docs/en/base-communication-type) (e-mail, fax, etc.) is initially provided as an introduction to more concrete 'measures'. **NOTE:** Provisions for the possibility that no communication information with the context 'ADVICE' is found at all would be additionally recommended. The [Execute with](/v1/docs/en/core-with-actor) block is executed in this case with the value 'no value' (`null`) anyway. | ![images/download/attachments/177911205/image2021-2-8_9-41-51-version-1-modificationdate-1726149008283-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2021-2-8_9-41-51-version-1-modificationdate-1726149008283-api-v2.png) | | --- | --- |