> ## 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.

# Update environment variables

> Update environment variables for all existing FlowX.AI services

Update environment variable configurations for all existing FlowX.AI services to support version 5.0.0 compatibility.

## Audit core

<Note>
  Elasticsearch configuration migrates from `SPRING_ELASTICSEARCH_*` to `FLOWX_ELASTICSEARCH_*` namespace with enhanced index management.
</Note>

### Variables to remove & replace

| Remove This Variable                            | Replace With                                 | Old Default  | New Default  |
| ----------------------------------------------- | -------------------------------------------- | ------------ | ------------ |
| `SPRING_ELASTICSEARCH_INDEXSETTINGS_DATASTREAM` | `FLOWX_ELASTICSEARCH_INDEXSETTINGS_NAME`     | `audit-logs` | `audit-logs` |
| `SPRING_ELASTICSEARCH_INDEXSETTINGS_SHARDS`     | `FLOWX_ELASTICSEARCH_INDEXSETTINGS_SHARDS`   | `2`          | `2`          |
| `SPRING_ELASTICSEARCH_INDEXSETTINGS_REPLICAS`   | `FLOWX_ELASTICSEARCH_INDEXSETTINGS_REPLICAS` | `2`          | `0`          |

### New variables to add

| Variable                                | Default Value | Description                        |
| --------------------------------------- | ------------- | ---------------------------------- |
| `FLOWX_ELASTICSEARCH_INDEXROLLOVERDAYS` | `30`          | 🆕 Automatic index rollover policy |

## Data Search

<Note>
  Simple migration with containerization support and namespace alignment.
</Note>

### Variables to update

| Variable                         | Current Value    | New Value            | Reason                   |
| -------------------------------- | ---------------- | -------------------- | ------------------------ |
| `SPRING_ELASTICSEARCH_REST_URIS` | `localhost:9200` | `elasticsearch:9200` | Containerization support |

### Variables to replace

| Remove This                               | Add This                                 | Default Value      |
| ----------------------------------------- | ---------------------------------------- | ------------------ |
| `SPRING_ELASTICSEARCH_INDEXSETTINGS_NAME` | `FLOWX_ELASTICSEARCH_INDEXSETTINGS_NAME` | `process_instance` |

## Kafka Configuration

<Info>
  Consumer group naming standardized to kebab-case across all FlowX.AI services with new messaging features for enhanced functionality.
</Info>

<Warning>
  **Do not modify default consumer group names.** We strongly recommend against changing the default consumer group names as this operation can lead to misconfigurations. The application is designed to work and scale with the consumer groups as they are defined by default.
</Warning>

### Consumer group naming changes

<Accordion title="View all 33 consumer group name changes across all FlowX.AI services">
  **Admin (3 groups):**

  | Old Group ID                       | New Group ID                           |
  | ---------------------------------- | -------------------------------------- |
  | `genericProcessingGroup`           | `generic-processing-group`             |
  | `processSyncGroup`                 | `process-sync-group`                   |
  | `adminResourcesUsagesRefreshGroup` | `admin-resources-usages-refresh-group` |

  **Application Manager (15 groups):**

  | Old Group ID                        | New Group ID                              |
  | ----------------------------------- | ----------------------------------------- |
  | `appResourceExportGroup`            | `app-resource-export-group`               |
  | `appResourceImportGroup`            | `app-resource-import-group`               |
  | `appResourceUsagesGroup`            | `app-resource-usages-group`               |
  | `appResElemUsageValidationResp`     | `app-resource-elem-usage-validation-resp` |
  | `appResourceCopyGroup`              | `app-resource-copy-group`                 |
  | `appResourceSyncGroup`              | `app-resource-sync-group`                 |
  | `appResourceUpdatePropagationGroup` | `app-resource-update-propagation-group`   |
  | `appMergeItemGroup`                 | `app-merge-item-group`                    |
  | `buildCreateGroup`                  | `build-create-group`                      |
  | `buildUpdateGroup`                  | `build-update-group`                      |
  | `buildResourceExportGroup`          | `build-resource-export-group`             |
  | `buildResourceImportGroup`          | `build-resource-import-group`             |
  | `buildRuntimeDataGroup`             | `build-runtime-data-group`                |
  | `buildStartTimerEventsUpdatesGroup` | `build-start-timer-events-updates-group`  |
  | `processStartGroup`                 | `process-start-group`                     |

  **CMS Core (1 group):**

  | Old Group ID           | New Group ID         |
  | ---------------------- | -------------------- |
  | `cms-consumer-preview` | `cms-consumer-group` |

  **Document Plugin (1 group):**

  | Old Group ID                              | New Group ID                  |
  | ----------------------------------------- | ----------------------------- |
  | `kafka-svc-document-consumer-local-test2` | `kafka-svc-document-consumer` |
  |                                           |                               |

  **Integration Designer (3 groups):**

  | Old Group ID                                | New Group ID                                           |
  | ------------------------------------------- | ------------------------------------------------------ |
  | `integrDesignerResourcesUsagesRefreshGroup` | `integration-designer-resources-usages-refresh-group`  |
  | `genericProcessingGroup`                    | `start-workflows-group`                                |
  | `resElemUsageValidation`                    | `integration-designer-res-elem-usage-validation-group` |

  **Notification Plugin (1 group):**

  | Old Group ID       | New Group ID                   |
  | ------------------ | ------------------------------ |
  | `notif123-preview` | `notification-plugin-consumer` |

  **Process Engine (11 groups):**

  | Old Group ID (all were `notif123-preview`) | New Group ID               |
  | ------------------------------------------ | -------------------------- |
  | `notif123-preview`                         | `advance`                  |
  | `notif123-preview`                         | `notify-parent`            |
  | `notif123-preview`                         | `adapters`                 |
  | `notif123-preview`                         | `scheduler-run-action`     |
  | `notif123-preview`                         | `scheduler-advancing`      |
  | `notif123-preview`                         | `message-events`           |
  | `notif123-preview`                         | `process-start`            |
  | `notif123-preview`                         | `process-start-for-event`  |
  | `notif123-preview`                         | `process-expire`           |
  | `notif123-preview`                         | `process-operations`       |
  | `notif123-preview`                         | `process-batch-processing` |
</Accordion>

### Application Manager specific features

#### New environment variables

| Variable                                                         | Default Value | Description                         |
| ---------------------------------------------------------------- | ------------- | ----------------------------------- |
| `FLOWX_RESOURCESUSAGES_REFRESHPRODUCER_REFRESHEXPIRATIONSECONDS` | `300`         | 🆕 Refresh expiration timeout       |
| `SERVER_MAXHTTPREQUESTHEADERSIZE`                                | `16KB`        | 🆕 Maximum HTTP request header size |

#### New Kafka features

<CardGroup cols={2}>
  <Card title="Resource Update Propagation" icon="arrow-right-arrow-left">
    Consumer Group: `app-resource-update-propagation-group`\
    Threads: 3\
    Topic: `ai.flowx.{env}.application-version.resource.update.propagation.v1`
  </Card>

  <Card title="Build Runtime Data" icon="database">
    Consumer Group: `build-runtime-data-group`\
    Threads: 2\
    Topic: `ai.flowx.{env}.build.runtime-data.v1`
  </Card>

  <Card title="Business Rule Sync" icon="code-branch">
    Topic: `ai.flowx.{env}.application-version.sync.business-rule.in.v1`\
    Purpose: Business rule synchronization
  </Card>

  <Card title="Process Sync (Restructured)" icon="workflow">
    Topic: `ai.flowx.{env}.application-version.sync.process.in.v1`\
    Purpose: Enhanced process synchronization
  </Card>

  <Card title="Reusable Templates sync" icon="puzzle-piece">
    Topic: `ai.flowx.{env}.application-version.sync.reusable-template.in.v1`\
    Purpose: Reusable template synchronization
  </Card>
</CardGroup>

#### Kafka environment variables (optional overrides)

<CodeGroup>
  ```bash New Topics theme={"system"}
  # Resource Update Propagation
  KAFKA_TOPIC_APPLICATION_RESOURCE_RESOURCEUPDATEPROPAGATION=ai.flowx.dev.application-version.resource.update.propagation.v1

  # Build Runtime Data  
  KAFKA_TOPIC_BUILD_RUNTIMEDATA=ai.flowx.dev.build.runtime-data.v1

  # Business Rule Sync
  KAFKA_TOPIC_APPLICATION_RESOURCE_SYNC_OUT_BUSINESSRULE=ai.flowx.dev.application-version.sync.business-rule.in.v1

  # Process Sync (restructured)
  KAFKA_TOPIC_APPLICATION_RESOURCE_SYNC_OUT_PROCESS=ai.flowx.dev.application-version.sync.process.in.v1


  # Reusable Templates sync
  KAFKA_TOPIC_APPLICATION_RESOURCE_SYNC_OUT_REUSABLE_TEMPLATE=ai.flowx.dev.application-version.sync.reusable-template.in.v1
  ```

  ```bash Consumer Groups theme={"system"}
  # New Consumer Groups
  KAFKA_CONSUMER_GROUPID_APPLICATION_RESOURCE_UPDATEPROPAGATION=app-resource-update-propagation-group
  KAFKA_CONSUMER_GROUPID_BUILD_RUNTIMEDATA=build-runtime-data-group

  # Thread Configuration
  KAFKA_CONSUMER_THREADS_APPLICATION_RESOURCE_UPDATEPROPAGATION=3
  KAFKA_CONSUMER_THREADS_BUILD_RUNTIMEDATA=2
  ```
</CodeGroup>

<Info>
  **Automatic Configuration**: Most deployments can rely on the built-in naming patterns without explicit environment variable overrides.
</Info>

## Integration Designer

### Storage configuration

Added support for S3 storage for files in Integration Designer.

| Variable                                       | Default Value       | Description              |
| ---------------------------------------------- | ------------------- | ------------------------ |
| `APPLICATION_FILESTORAGE_TYPE`                 | `s3`                | 🆕 Storage type          |
| `APPLICATION_FILESTORAGE_PARTITIONSTRATEGY`    | `NONE`              | 🆕 Partition strategy    |
| `APPLICATION_FILESTORAGE_DELETIONSTRATEGY`     | `delete`            | 🆕 Deletion strategy     |
| `APPLICATION_FILESTORAGE_S3_ENABLED`           | `true`              | 🆕 S3 enabled            |
| `APPLICATION_FILESTORAGE_S3_SERVERURL`         | `http://minio:9000` | 🆕 S3 server URL         |
| `APPLICATION_FILESTORAGE_S3_ENCRYPTIONENABLED` | `false`             | 🆕 S3 encryption enabled |
| `APPLICATION_FILESTORAGE_S3_ACCESSKEY`         | `minio`             | 🆕 S3 access key         |
| `APPLICATION_FILESTORAGE_S3_SECRETKEY`         | `minio123`          | 🆕 S3 secret key         |
| `APPLICATION_FILESTORAGE_S3_BUCKETPREFIX`      | `workflows-bucket`  | 🆕 S3 bucket prefix      |

### Redis

Added caching when running a workflow.

| Variable                        | Default Value                            | Description           |
| ------------------------------- | ---------------------------------------- | --------------------- |
| `SPRING_CACHE_TYPE`             | `redis`                                  | 🆕 Cache type         |
| `SPRING_CACHE_REDIS_KEYPREFIX`  | `flowx:core:cache:integration-designer:` | 🆕 Cache key prefix   |
| `SPRING_CACHE_REDIS_TIMETOLIVE` | `5000000`                                | 🆕 Cache time to live |
| `SPRING_REDIS_HOST`             | `redis-master`                           | 🆕 Redis host         |
| `SPRING_REDIS_PORT`             | `6379`                                   | 🆕 Redis port         |
| `SPRING_REDIS_PASSWORD`         | `defaultpassword`                        | 🆕 Redis password     |
| `SPRING_REDIS_TTL`              | `5000000`                                | 🆕 Redis time to live |
| `SPRING_DATA_REDIS_HOST`        | `spring.redis.host`                      | 🆕 Redis host         |

## Java runtime configuration

<Note>
  FlowX.AI containers and services must rely exclusively on Java-standard environment variables for runtime tuning.
</Note>

| Deprecated variables             | Standard Replacement | Notes                                                              |
| -------------------------------- | -------------------- | ------------------------------------------------------------------ |
| `JAVA_OPTS`, `JAVA_TOOL_OPTIONS` | `JDK_JAVA_OPTIONS`   | Ensures compatibility with Java 21 and simplifies container config |

<Info>
  Environment-specific memory configurations must now be defined using `JDK_JAVA_OPTIONS`. Avoid relying on `JAVA_OPTS`, `JAVA_TOOL_OPTIONS` or legacy Docker-level overrides — these are no longer processed explicitly.
</Info>

## Config profiles

<Info>
  Config profiles are deprecated since 4.7.6 version.
</Info>

Remove legacy `CONFIG_PROFILE` usage. Delete any `CONFIG_PROFILE` environment variable definitions from deployments. This variable is no longer referenced by FlowX.AI services.
