Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Atoti What-If configuration is managed through properties with the atoti.what-if prefix. These properties can be set in application.yml or application.properties.

Property reference

General properties

PropertyTypeDefaultDescription
atoti.what-if.enablebooleantrueGlobal toggle for all What-If features. Set to false to disable all What-If auto-configuration.

Security properties

PropertyTypeDefaultDescription
atoti.what-if.security.typeNONE, SPRING, CUSTOMSPRINGThe type of security manager to use.
atoti.what-if.security.use-branch-permissionsbooleantrueWhether to use branch-level permissions.

Security type options

ValueDescription
SPRINGUses Spring Security context for user authentication and authorization.
NONENo security checks are performed. All operations are allowed for all users.
CUSTOMProvide your own IDatabaseSimulationsSecurityManager bean.

Distribution properties

PropertyTypeDefaultDescription
atoti.what-if.distribution.enabledbooleanfalseWhether the application runs in distributed mode.
atoti.what-if.distribution.query-node-nameString""The name of the query node. Required when distribution is enabled.
atoti.what-if.distribution.create-distributed-servicebooleantrueWhether to create the RestDistributedDatabaseService automatically.

Configuration examples

Default configuration

No configuration is required for a standalone application with Spring Security:
# All defaults are applied automatically

Disable security

atoti:
  what-if:
    security:
      type: none

Disable branch permissions

atoti:
  what-if:
    security:
      type: spring
      use-branch-permissions: false

Distributed mode

atoti:
  what-if:
    distribution:
      enabled: true
      query-node-name: "MyQueryNodeName"

Full configuration example

atoti:
  what-if:
    enable: true
    security:
      type: spring
      use-branch-permissions: true
    distribution:
      enabled: false
      query-node-name: ""
      create-distributed-service: true

Required beans

The Spring Boot Starter requires two beans from your application:

IDatabaseService

Provided by your Atoti Server application. This bean is used by the simulation engine to execute database operations. When distribution is enabled, a RestDistributedDatabaseService is automatically created to handle communication with data nodes. Set atoti.what-if.distribution.create-distributed-service to false if you want to provide your own distributed database service implementation.

IWhatIfPersistenceProperties

Provides Hibernate configuration for simulation persistence. The bean must return a Map<String, String> of Hibernate properties.
@Bean
public IWhatIfPersistenceProperties whatIfPersistenceProperties(
        @Value("classpath:hibernate.properties") Resource resource) throws IOException {
    Properties props = new Properties();
    props.load(resource.getInputStream());
    return () -> props.entrySet().stream()
        .collect(Collectors.toMap(
            e -> String.valueOf(e.getKey()),
            e -> String.valueOf(e.getValue())
        ));
}
The starter uses these properties to create a SessionFactory bean (named whatIfSessionFactory). If you need more control over SessionFactory configuration (such as adding interceptors or event listeners), you can override the whatIfSessionFactory bean directly. See How to customize auto-configured beans for details.

Full generated reference

The table below is generated from the @ConfigurationProperties Java sources at build time, so it is always in sync with the code. Use it as the authoritative reference when the curated tables above don’t cover a property.