Configuration
Every parameter of the two Gradle tasks and Maven goals. Setup snippets are on the Gradle and Maven pages.
| Gradle task | Maven goal | |
|---|---|---|
| Process API | generateBpmnModelApi (GenerateBpmnModelsTask) | generate-bpmn-api |
| Validation (experimental) | validateBpmnModels (ValidateBpmnModelsTask) | validate-bpmn |
The Gradle task classes live in io.miragon.bpmn.adapter. A parameter without a default has to be set, or the build fails naming it. The Maven goals are bound to no lifecycle phase; each parameter is also a user property of the same name (-DprocessEngine=ZEEBE).
Common parameters
Both tasks and goals take these.
| Parameter | Gradle default | Maven default | Description |
|---|---|---|---|
baseDir | — | — | Directory filePattern is resolved against |
filePattern | — | — | Glob selecting the BPMN files, relative to baseDir |
processEngine | — | — | ZEEBE, CAMUNDA_7 or OPERATON; see Engines |
Paths. A relative baseDir or outputFolderPath resolves against the project directory, in Gradle and in Maven.
File pattern. * matches within one directory, **/ any number of directories, including none: src/main/resources/**/*.bpmn also finds files directly in src/main/resources. Files behind a symlinked directory are not read. There is no exclude; see filtering files for Gradle and Maven.
Process API
| Parameter | Gradle default | Maven default | Description |
|---|---|---|---|
outputFolderPath | — | — | Source root the code is written to; the package directories are created below it |
packagePath | — | — | Package (C#: namespace; TypeScript: subdirectory, as for the other languages) of the generated code. One package per task or execution: two runs sharing a package overwrite each other's shared definitions and remove each other's Process APIs as stale |
outputLanguage | — | — | KOTLIN, JAVA, CSHARP (experimental) or TYPESCRIPT (experimental) |
Validation
| Parameter | Gradle default | Maven default | Description |
|---|---|---|---|
failOnWarning | false | false | Treat warnings as failures |
disabledRules | empty | empty | Ids of rules to skip |
The generating task runs the built-in rules as well and fails on an error. It has neither parameter.
Settings in the BPMN model
| Extension property | On | Description |
|---|---|---|
variantName | the process | Leads the name of what is generated from the file, which lets several files declare the same process id |
additionalInputVariables, additionalOutputVariables | any flow node (Camunda 7, Operaton) | Declares variables an element cannot express otherwise |
They live in the model, so they apply the same way in Gradle, Maven and the web app.
Output Languages
| Value | Generated | Runtime |
|---|---|---|
KOTLIN | object with nested objects | io.miragon:bpmn-to-code-runtime |
JAVA | final class with nested static classes | io.miragon:bpmn-to-code-runtime |
CSHARP | static class with the same content | Miragon.BpmnToCode.Runtime (NuGet, not yet published) |
TYPESCRIPT | as const object with one exported class per element, same content | @miragon/bpmn-to-code-runtime (npm, not yet published) |
The Gradle plugin adds the runtime when the java plugin is applied; with Maven you declare it yourself.
Experimental
TypeScript output is experimental and may change in a minor release. See TypeScript specifics.