# Running an application

If you do not want to start by launching the form but only the application, then the first step to perform will be setting **the starting point** of the application (form or process).

## Setting the application's starting point

The starting point can be set directly in the module **Applications** – in the tabs **Forms** or **Processes**.

{% hint style="info" %}
To properly launch the application, it is necessary to create the data model beforehand, as described in [Data model](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/model-danych).
{% endhint %}

### Setting the form as the application starting point (recommended) and launching the application

As the starting point, we can set one of the forms added to a given application. After entering the tab **Forms** we click the context menu of the appropriate request and select the option **Set starting point**:

![Figure 1. Context menu with the option to set the request as the starting point.](https://content.gitbook.com/content/2CssJT0zIo4SJQLbSZ6l/blobs/KbMvaMEF7wh7FaEnjaUW/wniosek_jako_start_app_pliki/image2024-4-23_12-59-6.png)

{% hint style="warning" %}
Note! After changing the starting request, it may be necessary to "invalidate cache" in webforms (if the application has already been run before). To do this, run the following cURL command (replace USER and PASSWORD with the appropriate data):
{% endhint %}

{% code title="Invalidate cache" %}

```bash
curl -u USER:PASSWORD -X POST "http://webforms-dev.consdata.local/cache/invalidate?cacheType=PUBLISHED_TEMPLATE"
```

{% endcode %}

To run an application, e.g. named wiki\_przyklad\_app, use the following link:

```
https://przykladowy.link.demo/stkn=#/wiki_przyklad_app
```

When the application is launched, **form**will be opened, which has been set as the starting point.

### Setting a process as the starting point and launching the application

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

In some cases, the application should start with a process that controls the business logic.

To set a process as the starting point, after entering the tab **Processes** we click the so-called "kebab menu" and in the context menu of the appropriate process select the option **Set starting point**:

![Figure 2. Context menu with the option to set the process as the starting point.](https://content.gitbook.com/content/2CssJT0zIo4SJQLbSZ6l/blobs/e9TRZvRVf31katSFcbAV/proces_jako_start_app_pliki/image2024-12-4_11-12-37.png)

If a process is set as the application's starting point instead of a request, additionally in the tab **Properties** of the form, go to the tab **Flows** and in the section [**Actions**](https://wiki.consdata.pl/display/IED/Akcje) define the following event:

* **Component handling the action:** e.g. *Trigger or Page*
* **Event type** *:* *depends on the selected component triggering the change*
* **Form action:** *START\_APPLICATION*
* **Application name:** name of the application to be launched (the application will start **the process** set as the starting point) or the name of the process to be started
* **Redirect to the next step of the process:** condition *JAVASCRIPT* - specifies whether automatic redirection to the next step should occur (*user task*); default value: *false.*

![Figure 3. Example of defining the START\_APPLICATION action triggered by clicking the Trigger.](https://content.gitbook.com/content/2CssJT0zIo4SJQLbSZ6l/blobs/X2vByfdD4195LeDDpmIP/uruchamanie_app_pliki/image2025-5-27_10-43-38.png)

*The application will start after the event that handles the START\_APPLICATION action is triggered.*
