Skip to content

Configuration ​

Every parameter of the two Gradle tasks and Maven goals. Setup snippets are on the Gradle and Maven pages.

Gradle taskMaven goal
Process APIgenerateBpmnModelApi (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.

ParameterGradle defaultMaven defaultDescription
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 ​

ParameterGradle defaultMaven defaultDescription
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 ​

ParameterGradle defaultMaven defaultDescription
failOnWarningfalsefalseTreat warnings as failures
disabledRulesemptyemptyIds 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 propertyOnDescription
variantNamethe processLeads the name of what is generated from the file, which lets several files declare the same process id
additionalInputVariables, additionalOutputVariablesany 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 ​

ValueGeneratedRuntime
KOTLINobject with nested objectsio.miragon:bpmn-to-code-runtime
JAVAfinal class with nested static classesio.miragon:bpmn-to-code-runtime
CSHARPstatic class with the same contentMiragon.BpmnToCode.Runtime (NuGet, not yet published)
TYPESCRIPTas 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.