Skip to content

bpmn-to-codeYour BPMN model changes. Your code doesn't break.

Stop hardcoding element IDs, messages, and worker types. Generate a type-safe Process API that stays in sync with your BPMN models.

The problem it solves

BPMN-based process automation relies on string references scattered across your codebase. When someone renames an element in the BPMN model, nothing warns you until runtime.

kotlin
// Scattered across your codebase, no compiler help
client.newCreateInstanceCommand()
    .bpmnProcessId("newsletterSubscription")      // typo? runtime error.
    .send()

client.newPublishMessageCommand()
    .messageName("Message_FormSubmitted")          // renamed in BPMN? silent failure.
    .correlationKey(subscriptionId)
    .send()

@JobWorker(type = "newsletter.sendConfirmationMail")  // deleted task? no warning.
fun sendConfirmationMail() { /* ... */ }
kotlin
// Generated from your BPMN model. Rename an element → compiler error.
client.newCreateInstanceCommand()
    .bpmnProcessId(NewsletterSubscriptionProcessApi.PROCESS_ID)
    .send()

client.newPublishMessageCommand()
    .messageName(NewsletterSubscriptionProcessApi.Messages.MESSAGE_FORM_SUBMITTED)
    .correlationKey(subscriptionId)
    .send()

@JobWorker(type = NewsletterSubscriptionProcessApi.TaskTypes.NEWSLETTER_SEND_CONFIRMATION_MAIL)
fun sendConfirmationMail() { /* ... */ }