> 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/proces-biznesowy/proces-jako-logika-biznesowa.md).

# Process as business logic

Instead of the previously used model, in which control flow and business rules are hard-coded in the code (e.g. in the form of conditional statements, loops, or service calls), using a BPMN process makes it possible to move this responsibility to the level of a process defined as a graphical diagram.

Such a process is the central "coordinator" of case processing in the system, steering which steps need to be performed, in what order, and what decisions should be made based on input data and intermediate results. This makes it possible to model how a given case is handled in a clear and easy-to-maintain way.

This approach brings a number of benefits:

* **Clarity and comprehensibility** - the process logic is recorded in a more accessible graphical notation, making it easier to understand its flow and to collaborate on its shape and development.
* **Greater flexibility** - changes to business logic can be introduced faster, without the need to change the code and redeploy the application.
* **Better monitoring and auditability** - every process run in Camunda is recorded in history. Events and incidents can be analyzed, which greatly facilitates debugging and analysis of system operation.

The definition of business processes includes elements that make it possible to map business logic in the form of a process, such as

* **User Task (User Task)** - *User Tasks* are used to involve people in the course of the process. They can be assigned to specific individuals, roles, or user groups. They enable activities such as approvals, data completion, manual decisions, or information verification.
* **Service Task (Service Task)** - *Service Task* enables an automatic action to be performed by the system, without human involvement. This can be a call to an external API, script, REST service, SOAP service, or another technical component.
* **Gateway (Decision gateways)** - gateways are used to control the flow of the process depending on whether logical conditions are met. They make it possible to model business rules that determine which path will be chosen based on process data.
* **Script Task (Script Task)** - enables simple operations on process data (e.g. transformations, calculations) using a scripting language (e.g. JavaScript, Groovy). Recommended only for simple operations – business logic should, as far as possible, be moved to external components.


---

# 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/proces-biznesowy/proces-jako-logika-biznesowa.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.
