Setup Flowable to use AI features
Introduction
In order to use the AI features, you have to setup Flowable with some environment properties to properly connect to an AI service and use those features inside Flowable Design and Work.
To use the AI capability, you need to change your Flowable Version to v3.17.0+.
When using the model generation or the preview for the AI service you need to enable it for Flowable Design. For all features except the model generation the properties are required for Flowable Work.
In case you do not enable the AI, or you don't have an AI license for your system, you won't see the AI features like model generation in the user interface.
Use ChatGPT as the AI service
With the Flowable Artifacts
When you use the Flowable artifacts, you can use the following properties to enable OpenAI:
For Flowable Design:
application.design.ai.type=openai
spring.ai.openai.api-key=<your OpenAI API Key>
spring.ai.openai.chat.options.temperature=0.3
spring.ai.openai.chat.options.model=gpt-4o
For Flowable Work:
application.ai.type=openai
spring.ai.openai.api-key=<your OpenAI API Key>
spring.ai.openai.chat.options.temperature=0.3
spring.ai.openai.chat.options.model=gpt-4o
Building an Own Project
When you create your own project you can create it through the Flowable Initializr:
Or you can add the following:
Custom maven configuration
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-openai-spring-boot-starter</artifactId>
</dependency>
In addition, you also need to add the Spring AI bom to your dependency management:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-bom</artifactId>
<version>1.0.0-M2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
and the Spring Milestones repository to your repositories:
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
In addition, the following properties are required:
spring.ai.openai.api-key=<your OpenAI API Key>
spring.ai.openai.chat.options.temperature=0.3
spring.ai.openai.chat.options.model=gpt-4o
Use Anthropic Claude as the AI service
With the Flowable Artifacts
When you use the Flowable artifacts, you can use the following properties to enable Anthropic3:
For Flowable Design:
application.design.ai.type=anthropic3
spring.ai.anthropic.api-key=<your Claude API Key>
For Flowable Work:
application.ai.type=anthropic3
spring.ai.anthropic.api-key=<your Claude API Key>
Building an Own Project
When you create your own project you can create it through the Flowable Initializr:
Or you can add the following:
Custom maven configuration
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-anthropic-spring-boot-starter</artifactId>
</dependency>
In addition, you also need to add the Spring AI bom to your dependency management:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-bom</artifactId>
<version>1.0.0-M2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
and the Spring Milestones repository to your repositories:
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
In addition, the following properties are required:
spring.ai.anthropic.api-key=<your Claude API Key>