Documentation: Flowy Configuration


Please support us to improve our service. We would like to use statistics anonymously.

We do not pass on your data! You can find more information in our privacy policy.

Decline

< Back to documentation

Flowy Configuration

The configuration files have many settings in common. Flowy relies on a relational database for its metadata. Hence, the very same settings for spring / datasource should be hence used both for the admin and processing service.

The following table describes the details:

PathAvailabilityDescriptionTypeDefault value
spring.datasource.urlCoreThe URL to the database that Flowy should use for its metadataMandatoryn/a
spring.datasource.usernameCoreThe username to be usedMandatoryn/a
spring.datasource.passwordCoreThe password to be usedMandatoryn/a
spring.datasource.hikari.maximum-pool-sizeCorePool size of database connections that used for internal communication by the Flowy serviceOptional10
flowy.core.instance.dirCorePath where Flowy related files and directories are storedOptional.flowy
flowy.core.instance-idCoreMust be individual for every admin as well as processing service. These values must match with the according setting / instance entry. If not set, new values will be generated and stored to instance-id file.Optionaln/a
flowy.core.security.passwordCoreThis password will be used to encrypt and decrypt the values as they are stored in the database; hence the same value must be used across every environmentMandatoryn/a
flowy.core.security.prometheus-metrics-whitelistCoreBy default only 127.0.0.1 is allowed; any additional IP address must be configured hereMandatoryn/a
flowy.core.system-scheduler-pool-sizeCoreAmount of threads used for internal jobsOptional10
server.portCoreServer default portOptional8080
spring.liquibase.enabledCoreDefines if migrations are executed on startupOptionaltrue

Admin configuration

The following configuration can be used for the admin service:

spring:
  datasource:
    url: jdbc:postgresql://<dbServer>:<dbPort>/<dbName>
    username: <dbUser>
    password: <dbPassword>
  liquibase.enabled: false
    
flowy.core:
  security:
    password: <flowySharedSecret>
    prometheus-metrics-whitelist:
      - 127.0.0.1
      - 127.0.0.2
      - 127.0.0.3

flowy.admin.module-version: 2021.09

The following table describes the details:

PathAvailabilityDescriptionTypeDefault value
flowy.admin.history.ttlAdminDefines the maximum time to keep history entriesOptional90d
flowy.admin.history.clean-delayAdminTime between checks for history cleaningOptional1d
flowy.admin.history.clean-enabledAdminEnables, respective disables history cleaning (off by default)OptionalFalse
flowy.admin.module-versionAdminUsed to compare when exporting/importing module to ensure compatibilityMandatoryn/a
server.servlet.context-pathAdminURL extension for the serviceOptional"/api"
flowy.admin.module-versionAdminNecessary version for export and import of Flowy objectsMandatoryn/a

Processing configuration

The following configuration can be used for the processing service:

spring:
  datasource:
    url: jdbc:postgresql://<dbServer>:<dbPort>/<dbName>
    username: <dbUser>
    password: <dbPassword>
server.port: 8081
flowy.core:
  security:
    password: <flowySharedSecret>
    prometheus-metrics-whitelist:
      - 127.0.0.1
      - 127.0.0.2
      - 127.0.0.3

The following table describes the details:

PathAvailabilityDescriptionTypeDefault value
flowy.processing.credentials.inactive-ttlProcessingDefines the timeout when connections should be closed (currently only supported by MQTT)Optional1d
flowy.processing.credentials.sync-delayProcessingSpecifies the interval between checks of credentialsOptional5s
flowy.processing.plugin.sync-delayProcessingTime between checks for plugin updatesOptional25s
flowy.processing.plugin.dirProcessingSpecifies the directory where plugins are cachedOptional"plugins"
flowy.processing.process-execution.fetch-events-delayProcessingSpecifies the interval between events checksOptional100ms
flowy.processing.process-execution.clean-up-logs-delayProcessingSpecifies the interval between cleaning executions of step logs and eventsOptional7m
flowy.processing.process-execution.clean-up-errors-delayProcessingSpecifies the interval between cleaning executions of errorsOptional7m
flowy.processing.process-execution.heartbeatProcessingSpecifies the interval between heartbeat updatesOptional45s
flowy.processing.process-execution.execute-process-step-child-event-delayProcessingSpecifies the wait duration between checks of children eventsOptional100ms
flowy.processing.trigger-cron.sync-delayProcessingSpecifies the wait duration between cron synchronisationsOptional25s
flowy.processing.groovy-script.clean-up-delayProcessingSpecifies the interval between cleaning executions of storage valuesOptional1h
flowy.processing.groovy-script.inactive-ttlProcessingInterval how long the groovy script should stay in the cache if unusedOptional30d
flowy.processing.trigger-rest.wait-event-timeProcessingSpecifies the wait duration between checks event statusOptional100ms
flowy.processing.trigger-rest.sync-delayProcessingSpecifies the wait duration between rest trigger syncronisationsOptional25s
flowy.processing.trigger-messaging.sync-delayProcessingSpecifies the wait duration between messaging trigger synchronisationsOptional25s
flowy.processing.storage.clean-up-delayProcessingSpecifies the interval between cleaning executions of storage valuesOptional5m
flowy.processing.library.sync-delayProcessingTime between checks for library updatesOptional30s
flowy.processing.library.dirProcessingSpecifies the directory where libraries are cachedOptional30s
flowy.processing.rest-templates.clean-up-delayProcessingInterval between cleans of rest template cacheOptional1h
flowy.processing.rest-templates.inactive-ttlProcessingInterval how long the rest template should stay in the cache if unusedOptional1d
flowy.processing.process-execution.fix-execution-state-delayProcessingInterval to check for jobs not finished in timeOptional1m
server.servlet.context-pathProcessingURL extension for the serviceOptional"" (=empty string)

Please refer to the internal jobs page to learn more about history cleaning.

Log configuration

Logging settings must be provided to Flowy by logback.xml. The default Logback configuration included into the jar can be overridden:

java -Dlogging.config=/path/to/logback.xml -jar flowy.jar

Below you'll find several useful examples.

Log rotation

An logback.xml configuration using local log files and rotation:

<configuration>
    <springProperty scope="context" name="application" source="spring.application.name"/>
    <springProperty scope="context" name="instance-id" source="flowy.core.instance-id"/>

    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%green(%date) %highlight(%-5level) %yellow([%-4relative]) %magenta([%thread]) %cyan(%logger{10}) %yellow([%file:%line]) %blue(: %msg%n)</pattern>
            <charset>UTF-8</charset>
        </encoder>
    </appender>

    <!-- RollingFileAppender configuration -->
    <appender name="ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>log/flowy.log</file>
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss} %-5level [%thread] %logger{10} [%file:%line] - %msg%n</pattern>
        </encoder>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <!-- daily rollover and max 16MB -->
            <fileNamePattern>log/flowy.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
            <maxFileSize>16MB</maxFileSize>
            <maxHistory>10</maxHistory>
        </rollingPolicy>
    </appender>

    <root level="WARN">
        <appender-ref ref="ROLLING"/>
        <appender-ref ref="STDOUT"/>
    </root>
</configuration>

Graylog configuration

Enclosed an logback.xml example demonstrating the usage of Graylog:

<configuration>
  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>%green(%date) %highlight(%-5level) %yellow([%-4relative]) %magenta([%thread]) %cyan(%logger{10}) %yellow([%file:%line]) %blue(: %msg%n)</pattern>
      <charset>UTF-8</charset>
    </encoder>
  </appender>
  <appender name="GELF" class="de.siegmar.logbackgelf.GelfUdpAppender">
    <graylogHost>192.168.1.2</graylogHost>
    <graylogPort>10240</graylogPort>
  </appender>
  <root level="INFO">
    <appender-ref ref="GELF"/>
    <appender-ref ref="STDOUT"/>
  </root>
</configuration>