> For the complete documentation index, see [llms.txt](https://docs.eximee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/przeplywy/akcje.md).

# Actions

## Actions section <a href="#akcje-sekcjaakcje" id="akcje-sekcjaakcje"></a>

The section **Actions** allows adding actions to the form for selected components that trigger events.

To define an action on the form, first add to the form the component for which we want to define the action (e.g. [Trigger](/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/biblioteka-komponentow-bazowych/6-interakcje-i-akcje/trigger.md)) and the component to which the action applies (e.g. [Popup](/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/biblioteka-komponentow-bazowych/6-interakcje-i-akcje/popup.md)).

<figure><img src="/files/43fc41ef9705782b588462b498c5f9c4ccc54686" alt=""><figcaption><p><em><strong>Figure 1.</strong> Section with defined actions</em></p></figcaption></figure>

## Adding an action <a href="#akcje-dodanieakcji" id="akcje-dodanieakcji"></a>

After clicking the button **Add action** at the top of the section above the remaining actions (if there were any already on the form), an empty row is added, in which we first select the action source in the field **Select action source**. Only the form components for which an action can be defined will be available on the list.

<figure><img src="/files/3ff2d2fe03e94adf2cda0c0438dbe63b02e3eace" alt=""><figcaption><p><em><strong>Figure 2.</strong> Row for defining a new action</em><br></p></figcaption></figure>

***Figure 2.** Row for defining a new action*<br>

<figure><img src="/files/40419c22e1807a0ad8538dc089f1171ceae12209" alt=""><figcaption><p><em><strong>Figure 3.</strong> Example row of a SHOW_POPUP action after clicking the checkbox</em></p></figcaption></figure>

## Defining an event for the Next button <a href="#akcje-definiowaniezdarzeniadlaprzyciskudalej" id="akcje-definiowaniezdarzeniadlaprzyciskudalej"></a>

When defining an action on clicking the Next button, remember to also provide an action that will be executed when the condition specified for the action is not met, because otherwise the user would not be able to go to the next page when the event condition is not met. It is enough to add an action with the opposite condition for the FORWARD\_PAGE action.

<figure><img src="/files/d987744df0c254c333396a284ee5d56b45d396ff" alt=""><figcaption><p><em><strong>Figure 4.</strong> Example of a popup-opening action for the clicked Next button on Page1</em></p></figcaption></figure>

<figure><img src="/files/0cfcc296ac7fc0db0dc42480c29360e23f9941f4" alt=""><figcaption><p><em><strong>Figure 5.</strong> Example of an action for the opposite condition allowing you to proceed in the standard way from Page1</em></p></figcaption></figure>

{% hint style="info" %}
Demo form: demoPopup
{% endhint %}

## Defining actions for the Statements component <a href="#akcje-definiowanieakcjidlakomponentuoswiadczenia" id="akcje-definiowanieakcjidlakomponentuoswiadczenia"></a>

For [Statements - Statements](https://github.com/Consdata/eximee-docs/blob/main/budowanie-aplikacji/interfejs-uzytkownika/formularze/biblioteka-komponentow-bazowych/oswiadczenia-statements/README.md) in a specific statement, in **actionBindings** add an event equal to **EDIT**. A statement that has such an event defined will display a special data editing option, and clicking it will display a popup.

<figure><img src="/files/f75c78a520f778793197167237a41cf9ced7d5d5" alt=""><figcaption><p><em><strong>Figure 6.</strong> Example statement with a defined action</em></p></figcaption></figure>

{% hint style="info" %}
Demo form: demoStatementsPopup
{% endhint %}

## Defined events for the Slider <a href="#akcje-zdefiniowanezdarzeniadlaslidera" id="akcje-zdefiniowanezdarzeniadlaslidera"></a>

[Slider](https://github.com/Consdata/eximee-docs/blob/main/budowanie-aplikacji/interfejs-uzytkownika/formularze/biblioteka-komponentow-bazowych/slider.md) is able to handle an event defined in the validator (it must send the EMIT\_EVENT action in its error message). When adding an action, select from the action dropdown the item from the list of allowed events, which in turn is defined in the validator implementation.

## Defined events for the contextual help of the Text Field and Value Selection from List Field <a href="#akcje-zdefiniowanezdarzeniadlapomocykontekstowejpolatekstowegoipolawyboruwartoscizlisty" id="akcje-zdefiniowanezdarzeniadlapomocykontekstowejpolatekstowegoipolawyboruwartoscizlisty"></a>

For components: [Text Field - TextField](https://github.com/Consdata/eximee-docs/blob/main/budowanie-aplikacji/interfejs-uzytkownika/formularze/biblioteka-komponentow-bazowych/pole-tekstowe-textfield.md) and [Value selection field from list - Combobox](https://github.com/Consdata/eximee-docs/blob/main/budowanie-aplikacji/interfejs-uzytkownika/formularze/biblioteka-komponentow-bazowych/pole-wyboru-wartosci-z-listy-combobox.md) containing a label, you can define an action to open a popup when clicking the contextual help button. Before defining the action, add contextual help (tooltip) to the component.

<figure><img src="/files/42b8c8a83fdbf1dc637f865e27e4d0126289217f" alt=""><figcaption><p><em><strong>Figure 7.</strong> Example of an action defined for the tooltip of the Text Field component</em></p></figcaption></figure>

{% hint style="info" %}
Demo forms: demoTextField, demoCombobox, demoPopup
{% endhint %}

## PageService as an action <a href="#akcje-pageservicejakoakcja" id="akcje-pageservicejakoakcja"></a>

If we define PageService on the form, we can choose it in the section **Properties** - after selecting it, it is possible to choose the CALL action.

## Action redirecting to a defined returnUrl <a href="#akcje-akcjaprzekierowanianazdefiniowanyreturnurl" id="akcje-akcjaprzekierowanianazdefiniowanyreturnurl"></a>

It is possible to attach an action (e.g. on clicking the Trigger) that will trigger a redirect to ***returnUrl*** (REDIRECT\_TO\_RETURN\_URL), whose value is taken from the session variable with that name (the session variable ***returnUrl*** must be exposed).

## Action redirecting to a defined URL <a href="#akcje-akcjaprzekierowanianazdefiniowanyurl" id="akcje-akcjaprzekierowanianazdefiniowanyurl"></a>

It is possible to attach an action (e.g. on clicking the Trigger) that will trigger a redirect to the URL specified by the user, whose value is determined at the time the action is defined - REDIRECT.

The action will be executed even if a validator highlights some data as invalid.

## Parking action upon entering a specific page <a href="#akcje-akcjaparkowaniapowejsciunakonkretnastrone" id="akcje-akcjaparkowaniapowejsciunakonkretnastrone"></a>

It is possible to define a parking action upon entering a specific page: PARK\_FORM\_WITH\_PROVIDED\_HASH. Then you need to specify the action for the page component (e.g. with the ON\_PAGE\_ENTER event). For the parking mechanism to work, remember to set the value of the session variable ***hashForUnparking***, which is needed to unpark the form.

## Action of entering a new form powered with a data model from the given process <a href="#akcje-akcjawejsciananowywniosekzasilonymmodelemdanychzpodanegoprocesu" id="akcje-akcjawejsciananowywniosekzasilonymmodelemdanychzpodanegoprocesu"></a>

It is possible to define an action for entering a new form, which on start will be populated with a data model from a specific process. Then you need to specify the START\_FORM\_BASED\_ON\_PROCESS action on the Trigger component. As part of this action, configure the form name (**formName)** and **processInstanceId,** from which the model will be retrieved. Remember that **processInstanceId** must be a reference to a session variable, because only **the session variable is supported.**\
Currently, action configuration is not possible from the Designer level; use the "Source" tab. Example configuration below.

```
<formAction id="5392a77a-5b2b-4664-b918-b2b65004736f" handler="START_FORM_BASED_ON_PROCESS" event="CLICK">
  <formActionSources>
    <formActionSource>GesTrigger1</formActionSource>
  </formActionSources>
  <formActionParameters>
    <formActionParameter name="formName" value="esg_test_preview_wniosek"/>
    <formActionParameter name="processInstanceId" value="nazwaZmiennejSesyjnej"/>
  </formActionParameters>
</formAction>
```

## Actions - starting the Application <a href="#title-text" id="title-text"></a>

{% hint style="info" %}
Availability of functionality depends on the license and may not be available in all deployments.
{% endhint %}

The START\_APPLICATION action is responsible for starting the process set as the start point.

<figure><img src="/files/d2a74006df85ab412a3049e73f0bc114af065217" alt=""><figcaption><p><em><strong>Figure 8.</strong></em> <em>START_APPLICATION action definition row</em></p></figcaption></figure>

The START\_APPLICATION action takes the following parameters:

|                                   |                                                                                                                        |
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| Application name                  | Indication of the process to be started.                                                                               |
| Redirect to the next process step | JAVASCRIPT condition. Specifies whether an automatic redirect to the next user task should occur. Default value: false |

## Action of starting a process instance

The START\_PROCESS\_AND\_RESUME action is responsible for starting a process instance and redirecting to a user task. As part of the action, you need to define the name of the process to be started.

<figure><img src="/files/c3ee702b74fa87f2a1d638e556772e3c772a91de" alt=""><figcaption><p><em><strong>Illustration 9.</strong></em> <em>START_PROCESS_AND_RESUME action definition row</em></p></figcaption></figure>

The START\_PROCESS\_AND\_RESUME action takes the following parameters:

|                            |                                               |
| -------------------------- | --------------------------------------------- |
| Process definition key     | Name of the process definition to be started. |
| Case number (Business key) | Business case identifier                      |

After the process is started, a process variable is set in the instance `sys_process_start_user_id`, containing the identifier of the user starting the process. This variable can be used e.g. in BPMN configuration (candidate users) for a user task, so that the user creating the process has access to that task.

## Action of approving a user task in the process

The COMPLETE\_TASK\_AND\_RESUME action is responsible for approving the user task and redirecting to the next task.

<figure><img src="/files/3dea3afd0b74a10fc6c16fac59d65ffe35e456ff" alt=""><figcaption><p><em><strong>Figure 10.</strong></em> <em>COMPLETE_TASK_AND_RESUME action definition row</em></p></figcaption></figure>

## Action redirecting to a new form

The LOAD\_NEW\_FORM action allows redirecting to a new form. As part of the action, define the name of the form (**formName**) to which to redirect. You can also add additional parameters that will be passed to the new form (currently this is not possible from the Designer level; to do this, use the "Source" tab and add another "formActionParameter" in the action).

## Example components sending events <a href="#akcje-przykladowekomponentywysylajacezdarzenia" id="akcje-przykladowekomponentywysylajacezdarzenia"></a>

| Component (action source)                       | Possible event    | Description                                                        |
| ----------------------------------------------- | ----------------- | ------------------------------------------------------------------ |
| Page (page)                                     | NEXT              | Action on clicking the next button on the form page                |
| <p><br></p>                                     | ON\_EXIT          | Action on exiting the page                                         |
| <p><br></p>                                     | ON\_PAGE\_ENTER   | Action of entering a specific page                                 |
| <p><br></p>                                     | SAVE\_DRAFT       | Action on clicking the temporary save button of the form           |
| Popup                                           | SAVE              | Action on clicking the save button on the Popup component          |
| <p><br></p>                                     | HIDDEN            | <p><br></p>                                                        |
| Statements                                      | EDIT              | Action on clicking the edit button on the statements component     |
| Statements fed from the service (FedStatements) | EXPAND\_STATEMENT | Action on clicking the expander on the component of fed statements |
| Text Field (GesTextField)                       | TOOLTIP\_CLICKED  | Action on clicking the component tooltip                           |
| Value Selection from List (GesCombobox)         | TOOLTIP\_CLICKED  | Action on clicking the component tooltip                           |
| <p><br></p>                                     | VALUE\_CHANGED    | Action on combobox value change                                    |
| Trigger                                         | CLICK             | Action on clicking the component                                   |
| Checkbox                                        | CLICK\_MORE\_INFO | Action on clicking the more info link of the checkbox component    |
| <p><br></p>                                     | CHECK             | Action on checking the checkbox                                    |
| <p><br></p>                                     | UNCHECK           | Action on unchecking the checkbox                                  |
| RadioGroup                                      | VALUE\_CHANGED    | Action on changing the value of the component                      |
| TileGroup                                       | VALUE\_CHANGED    | Action on changing the value of the component                      |
| TileGroup                                       | TILE\_CLICKED     | Action on clicking a single tile in a tile group                   |

## Example components receiving events <a href="#akcje-przykladowekomponentyodbierajacezdarzenia" id="akcje-przykladowekomponentyodbierajacezdarzenia"></a>

| Component handling actions                      | Type of form action              | Description                                                                                                                              |
| ----------------------------------------------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| Checkbox                                        | CHECK                            | Checking the checkbox                                                                                                                    |
| <p><br></p>                                     | UNCHECK                          | Unchecking the checkbox                                                                                                                  |
| <p><br></p>                                     | TOGGLE                           | Changing the checkbox value to the opposite                                                                                              |
| Statements fed from the service (FedStatements) | CHECK\_FED\_STATEMENT            | Selects the required statement from the list of statements                                                                               |
| Page (page)                                     | FORWARD\_PAGE                    | Go to the next page (same as clicking the button **Next**, **Submit application** etc.)                                                  |
| <p><br></p>                                     | BACKWARD\_PAGE                   | Go to the previous page (same as clicking the button **Undo**, **Back** etc.)                                                            |
| <p><br></p>                                     | REDIRECT\_TO\_RETURN\_URL        | Redirect to the URL defined in the session variable ***returnUrl***                                                                      |
| <p><br></p>                                     | REDIRECT                         | Redirect to the URL defined in the field available after selecting the REDIRECT action type                                              |
| <p><br></p>                                     | SAVE\_DRAFT                      | Temporary save of the form                                                                                                               |
| PageService                                     | CALL                             | Service call                                                                                                                             |
| Popup                                           | SHOW\_POPUP                      | Opening the popup component defined in the field **Component handling the action**                                                       |
| <p><br></p>                                     | CLOSE\_POPUP                     | Closing the popup component                                                                                                              |
| <p><br></p>                                     | SAVE\_POPUP                      | Saving the popup component                                                                                                               |
| Attachments (Uploadfile)                        | CLEAR\_UPLOAD\_FILE              | Clearing the added attachment (works for the ON\_PAGE\_ENTER action)                                                                     |
| Form                                            | PARK\_FORM\_WITH\_PROVIDED\_HASH | Parking the form                                                                                                                         |
| Trigger                                         | START\_APPLICATION               | Starting the process (the process set as the start point) of the application indicated in **applicationName** application                |
| Trigger                                         | START\_FORM\_BASED\_ON\_PROCESS  | Action of entering a new form (formName parameter) populated with a model from the given process instance (processInstanceId parameter). |

{% hint style="info" %}
Demo forms: demoAkcje, demoTooltipy
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/przeplywy/akcje.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
