Skip to content

⚙️ Configuration ​

All plugin parameters, available for both the Gradle and Maven plugins.

Parameters ​

ParameterTypeRequiredDefaultDescription
baseDirStringyes—Base directory for resolving relative paths
filePatternStringyes—Glob pattern to locate BPMN files (e.g. src/main/resources/**/*.bpmn)
outputFolderPathStringyes—Directory where generated code is written
packagePathStringyes—Package name for generated classes (e.g. com.example.process). Use one package per generation run — two runs in the same package overwrite each other's shared definition files and remove each other's Process APIs as stale
outputLanguageOutputLanguageyes—KOTLIN, JAVA, or CSHARP (experimental)
processEngineProcessEngineyes—ZEEBE, CAMUNDA_7, or OPERATON

Settings in the BPMN model ​

One setting lives in the model instead of the build, as an extension property on the process, so it works the same in every plugin and in the web UI.

PropertyDescription
variantNameLeads the name of the API generated from this file: corporate turns OrderProcessApi into CorporateOrderProcessApi. This is what lets several files declare the same processId (see Several files, one process id). Without it, a processId declared in several files fails generation

Process Engines ​

EngineValueDescription
Camunda 8 / ZeebeZEEBEUses zeebe: namespace extensions
Camunda 7CAMUNDA_7Uses camunda: namespace extensions
OperatonOPERATONUses operaton: namespace (Operaton's own XML namespace)

Operaton

Operaton is an open-source fork of Camunda 7. It uses the same patterns for I/O mappings and call activities, but with its own XML namespace (http://operaton.org/schema/1.0/bpmn). If your Operaton models still use camunda: namespace attributes, use CAMUNDA_7 instead.

Output Languages ​

LanguageValueGenerated Output
KotlinKOTLINobject with nested objects; depends on bpmn-to-code-runtime
JavaJAVAclass with nested static classes; depends on bpmn-to-code-runtime
C#CSHARPstatic class with the same registries and FlowNodes; runtime types inlined, no dependency

Experimental

C# support is experimental. It may change in any release and may be reworked or removed if it doesn't work out. Feedback welcome.

C# has no package dependency

The C# output carries the same API surface as Kotlin and Java, including the typed FlowNodes navigation. The runtime types its nodes need (IFlowNode, SequenceFlow<T>, ElementId, VariableName, …) are emitted into every generated file as a nested Runtime class, so a .cs file drops into any project and builds. See C# specifics.

INFO

The Web app is the primary surface for C#. The Gradle and Maven plugins accept CSHARP as well — useful in a polyglot monorepo where the JVM build also generates the constants for a sibling .NET worker — but a pure .NET project has no JVM build to hook into.

Examples ​

kotlin
tasks.named("generateBpmnModelApi", GenerateBpmnModelsTask::class) {
    baseDir = projectDir.toString()
    filePattern = "src/main/resources/**/*.bpmn"
    outputFolderPath = "$projectDir/src/main/kotlin"
    packagePath = "com.example.process"
    outputLanguage = OutputLanguage.KOTLIN
    processEngine = ProcessEngine.ZEEBE
}
xml
<configuration>
    <baseDir>${project.basedir}</baseDir>
    <filePattern>src/main/resources/*.bpmn</filePattern>
    <outputFolderPath>${project.basedir}/src/main/java</outputFolderPath>
    <packagePath>com.example.process</packagePath>
    <outputLanguage>KOTLIN</outputLanguage>
    <processEngine>ZEEBE</processEngine>
</configuration>