> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrating from previous versions to v4.1

If you are upgrading from a v3.4.x version, first check the following **migration guide** (to capture all the changes introduced in v4.0):

<Card title="Migrating from v3.4.x to v4.0" href="../../v4.0.0-april-2024/migrating-from-v3.4.x/" icon="link" />

If you are upgrading from v4.0 version, check the following migration guide:

## Migrating from v4.0 to v4.1

### Revised cache key organization

To ensure a smooth transition to the 4.1 release, it's essential to utilize the following clear cache endpoint and body:

##### Endpoint

`POST {{baseUrlAdmin}}/api/internal/cache/clear`

##### Body:

```json theme={"system"}
{
    "cacheNames": [
        "flowx:core:cache"
    ]
}
```

<Card title="Clear cache endpoint" href="../../../../4.0/docs/api/clear-cache4.0" icon="link" />

### Misconfigurations

To enable and to compute warnings for already existing processes from previous versions, use the following endpoint to retrieve and compute all warnings:

<Info>
  Please note that it may take some time for all misconfigurations in older processes to become available on the platform after calling this endpoint.
</Info>

#### FlowX.AI Admin

```json theme={"system"}
{{baseUrlAdmin}}/api/process-versions/compute
```

For more details:

<Card title="Enable misconfigurations" href="../../../../4.0/docs/api/add-misconfigurations" icon="link" />

### Spring Boot upgrade

The following configuration changes are required after upgrading your Spring Boot application to version 3.2.x. Below is a detailed explanation of each section in the context of this upgrade:

<Info>
  Note that this setup is backwards compatible, it does not affect the configuration from v3.4.x. The configuration files will still work until v4.5 release.
</Info>

<Warning>
  The old environment variables (v3.4.x) will be removed in the v.4.5 FlowX.AI release.
</Warning>

Configuration properties updates:

#### Redis configuration

Where Redis is used (FlowX CMS, FlowX Admin, Documents plugin, events, Notifications plugin, FlowX Engine, Task Management plugin):

##### Old configuration

* `SPRING_DATA_HOST`
* `SPRING_DATA_PORT`
* `SPRING_DATA_PASSWORD`

##### New configuration

* `SPRING_DATA_REDIS_HOST`
* `SPRING_DATA_REDIS_PORT`
* `SPRING_DATA_REDIS_PASSWORD`

#### Management configuration

For all services managing metrics, especially exporting metrics to Prometheus:

##### Old configuration

* `MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED`

##### New configuration

* `MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED`: This variable enables or disables Prometheus metrics export dynamically based on the environment.

More details, [here](../../../../4.0/setup-guides/flowx-engine-setup-guide/engine-setup#configuring-application-management)

#### Authentication

For all services except the advancing-controller.

##### New configuration

<Info>
  Currently not required to be set as they take values from old configs.
</Info>

* `SPRING_SECURITY_OAUTH2_RESOURCE_SERVER_OPAQUE_TOKEN_INTROSPECTION_URI`
* `SPRING_SECURITY_OAUTH2_RESOURCE_SERVER_OPAQUE_TOKEN_CLIENT_ID`
* `SPRING_SECURITY_OAUTH2_RESOURCE_SERVER_OPAQUE_TOKEN_CLIENT_SECRET`

##### Existing configuration

* `SECURITY_OAUTH2_BASE_SERVER_URL`
* `SECURITY_OAUTH2_REALM`
* `SECURITY_OAUTH2_CLIENT_CLIENT_ID`
* `SECURITY_OUATH2_CLIENT_CLIENT_SECRET`

#### Elasticsearch configuration

This outlines the Elasticsearch configuration for the following microservices: FlowX Admin, FlowX Engine, Data Search, and Audit Core.

##### Existing configuration

* `SPRING_ELASTICSEARCH_REST_URIS`: This environment variable is used by the microservices listed above. This variable needs to be set to the appropriate value for each environment.

Example:

```yaml theme={"system"}
# only the value changes for the next config:
spring:
  elasticsearch:
    rest:
      uris: localhost:9200 #no more protocol/schema anymore
```

<Info>
  If you do not upgrade to the new configuration, make sure that in the actual configuration you will remove the protocol/schema, it is no longer needed: for example, instead of `http://localhost:9200` you will have `localhost:9200` as value.
</Info>

##### New configuration

* `SPRING_ELASTICSEARCH_REST_PROTOCOL`: Default value is `https`; should be overridden if connection to Elasticsearch needs to be done over `http`.

Example:

```yaml theme={"system"}
# New configuration with default value:
spring:
  elasticsearch:
	  rest:
        protocol: https / http # default value is https - should be overriden if connection to elastic needs to be done on http.

```

#### License core configuration

For the License core microservice you need to configure two different data sources: one for the engine database and one for the license database.

##### Old Engine database source

* `ENGINE_DATASOURCE_URL`
* `ENGINE_DATASOURCE_JDBC_URL`
* `ENGINE_DATASOURCE_USERNAME`
* `ENGINE_DATASOURCE_PASSWORD`

##### New Engine database source

* `SPRING_DATASOURCE_ENGINE_URL: ${spring.datasource.jdbc-url}`: Pointing to old config for backwards compatibility.
* `SPRING_DATASOURCE_ENGINE_JDBC_URL: ${spring.datasource.jdbc-url}`: Pointing to old config for backwards compatibility
* `SPRING_DATASOURCE_ENGINE_USERNAME: ${spring.datasource.username}`: Pointing to old config for backwards compatibility
* `SPRING_DATASOURCE_ENGINE_PASSWORD: ${spring.datasource.password}`: Pointing to old config for backwards compatibility

##### Old License database source

* `SPRING_DATASOURCE_URL`
* `SPRING_DATASOURCE_JDBC_URL`
* `SPRING_DATASOURCE_USERNAME`
* `SPRING_DATASOURCE_PASSWORD`

##### New License database source

* `SPRING_DATASOURCE_LICENSE_URL: ${spring.datasource.jdbc-url}`: Pointing to old config for backwards compatibility.
* `SPRING_DATASOURCE_LICENSE_JDBC_URL: ${spring.datasource.jdbc-url}`: Pointing to old config for backwards compatibility.
* `SPRING_DATASOURCE_LICENSE_USERNAME: ${engine.datasource.username:postgres}`: Pointing to old config for backwards compatibility.
* `SPRING_DATASOURCE_LICENSE_PASSWORD: ${engine.datasource.password:wrongpwd}`: Pointing to old config for backwards compatibility.

#### Customer management plugin

##### New configuration

* `ELASTICSEARCH_PROTOCOL`: Possible values are `https` / `http`; default value is `https` - should be overridden if connection to Elasticsearch needs to be done over `http`.

### Open Telemetry

The FlowX.AI platform uses a mix of both auto instrumentation with Java agent and manual instrumentation using the Open Telemetry API.

<Info>
  Enabling Open Telemetry is optional.
</Info>

For more information about how to leverage Open Telemetry with FlowX, check the following section:

<Card title="Open Telemetry scenarios" href="../../../../4.1.x/docs/platform-deep-dive/integrations/open-telemetry" icon="page" />

**Additional configuration needed**: For more information about Open Telemetry deployment/configuration, check the following section:

<Card title="Open Telemetry configuration" href="../../../../4.1.x/setup-guides/open-telemetry-config" icon="page" />

For more information about microservices Open Telemetry default properties, check the following section:

<Card title="Open Telemetry default properties" href="../../../../4.1.x/setup-guides/ot-default-properties" icon="page" />
