> 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/scriptcode/zadanie-skryptowe-scripttask.md).

# Script task

{% hint style="info" %}
The functionality is available from version 2.3316.0 of the Eximee platform.
{% endhint %}

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

Script tasks (so-called handlers) are used to invoke business logic within a process. A list of all defined script tasks is available in the tab ***Library*** → ***Script tasks***.

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2FljuKGFM3xWAbhheBygV4%2Fimage.png?alt=media&amp;token=a4a082e1-9d6c-4e23-8363-99dd686ac55f" alt=""><figcaption><p><em><strong>Figure 1.</strong> The "Script tasks" tab with an example task</em></p></figcaption></figure>

The script code should be written in **plain JavaScript (ES6 or newer)**. The code must be compatible with the version of the JavaScript engine **provided by Rhino** *(*[*http://mozilla.github.io/rhino/compat/engines.html*](http://mozilla.github.io/rhino/compat/engines.html)*)***.** Additionally **have been disabled** such elements as "eval".

## Creating a script task <a href="#zadaniaskryptowe-scripttask-tworzeniezadaniaskryptowego" id="zadaniaskryptowe-scripttask-tworzeniezadaniaskryptowego"></a>

After clicking the button **Add script task**, we will be taken to the script editor window (more information in [Script task editor](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/scriptcode/zadanie-skryptowe-scripttask/edytor-zadan-skryptowych.md)).

The edit window in the repository allows you to change the content of a script task.

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2FkAm2gtKhzef9IyzjlNiQ%2Fimage.png?alt=media&amp;token=fdc808e3-62aa-43f8-81c7-66c91b165f84" alt=""><figcaption><p><em><strong>Figure 2.</strong> Script task edit window</em></p></figcaption></figure>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/scriptcode/zadanie-skryptowe-scripttask.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
