This project provides declarative camunda delegates for Spring based application

Overview

camunda-delegator-lib

Features

  • Declarative style for delegate code
  • Generated delegates documentation and templates for camunda modeler(this feature is not production ready)
  • Compatibility with JavaDelegate

Requirements

  1. Project complied with Camunda version 7.13.
  2. Spring Boot 2.5.2
  3. Kotlin version 1.5

Installation

Add dependency in gradle

implementation(group = "ru.tinkoff.top", name = "camunda-delegator-spring-boot-starter", version = "version")

Activate library by camunda plugin BpmnParserCamundaPlugin with other plugins

    @Bean
    fun processEngineConfiguration(
        processEnginePlugins: List<ProcessEnginePlugin>
    ): SpringProcessEngineConfiguration {
        val customEngine = SpringProcessEngineBpmnParseConfiguration()
        return CamundaSpringBootUtil.initCustomFields(customEngine).also {
            it.isJobExecutorActivate = false
            it.processEnginePlugins.add(CompositeProcessEnginePlugin(processEnginePlugins))
        }
    }

or

    @Bean
    fun processEngineConfiguration(
        @Qualifier(DELEGATOR_EXPRESSION_MANAGER)
        delegatorExpressionManager: ExpressionManager,
        @Qualifier(DELEGATOR_BPMN_PARSE_FACTORY)
        delegatorBpmnParseFactory: BpmnParseFactory
    ): SpringProcessEngineConfiguration {
        val customEngine = SpringProcessEngineBpmnParseConfiguration()
        return CamundaSpringBootUtil.initCustomFields(customEngine).also {
            it.isJobExecutorActivate = false
            it.processEnginePlugins.add(
                BpmnParserCamundaPlugin(delegatorExpressionManager, delegatorBpmnParseFactory)
            )
        }
    }

Notice

Camunda JobExecutor cannot be activated before application started it fully. Your can activate job executing on event ApplicationStartedEvent(delegators init on this event).

@Component
class JobExecutorActivationListener(
    private val jobExecutor: JobExecutor
) {

    @EventListener(ApplicationStartedEvent::class)
    @Order(DELEGATE_REGISTER_LISTENER_ORDER + 1)
    fun startJobExecution() {
        jobExecutor.start()
    }
}

Example

@CamundaDelegate
class ProductGeneratorDelegate {

    @DelegateExecute
    @SingleResultVariable(name = "product")
    fun generateProduct(
        @Variable(name = "product") product: String
    ): Product {
        return Product(product)
    }
}

See wiki for more information.

Contacts

[email protected]

You might also like...
The Okila server project uses the Spring boot framework and uses the Kotlin language

Okila-Server The Okila server project uses the Spring boot framework and uses the Kotlin language Format Response //The response successfully format

Copy of privat enterprice repo of project made by team 37 in course in2000 spring 2021, University of Oslo

Njord - leeway simulation app in2000-team37-njord Copy of private enterprise repo of project made by team 37 in course in2000 spring 2021, University

Spring boot cloud tool usage trail and learning project

Spring boot cloud tool usage trail and learning project Todo Maven based multi-p

Microservices-demo - Microservices demo project using Spring, Kotlin, RabbitMQ, PostgreSQL and Gradle and deployed to Azure Kubernetes
Grocery - A simple CRUD Project using Spring Boot, Kotlin and MongoDB

Grocery - A simple CRUD Project using Spring Boot, Kotlin and MongoDB

A spring-boot project that demonstrates data caching using Redis

A spring-boot project that demonstrates data caching using Redis

An application that simulate the Swedish Transport Agency, implemented with Spring Boot, Kotlin and GraphQL

graphql-kotlin-spring-server An application that simulate the Swedish Transport Agency, implemented with Spring Boot, Kotlin and GraphQL Running the s

Push notification application using One Signal + Spring Boot + Kotlin

Spring Boot push notification system using One Signal This project was created to demonstrate a simple application built with Kotlin + Spring Boot inc

MaxonBank is a Kotlin + Spring Boot + Axon Framework application that supports opening, depositing to, and withdrawing from accounts.

MaxonBank MaxonBank is a Kotlin + Spring Boot + Axon Framework application that supports opening, depositing to, and withdrawing from accounts. The ap

Comments
  • feat!: update all dependencies in project

    feat!: update all dependencies in project

    camunda to 7.17 springboot to 2.6.4 kotlin to 1.7.10

    BREAKING CHANGE: remove compatibility for camunda <= 7.13

    A similar PR may already be submitted! Please search among the Pull requests before creating one.

    Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. Link to relevant issues if possible.

    opened by bespaltovyj 0
Releases(v7.0.1)
Owner
Tinkoff.ru
Online financial ecosystem
Tinkoff.ru
Camunda Platform 7 WebApp Auto-Login

Camunda Platform 7 WebApp Auto-Login Auto-login feature for development Why should you use it? Because otherwise, you need to type again and again "ad

Holunda 8 Sep 6, 2022
Kotter - aims to be a relatively thin, declarative, Kotlin-idiomatic API that provides useful functionality for writing delightful console applications.

Kotter (a KOTlin TERminal library) aims to be a relatively thin, declarative, Kotlin-idiomatic API that provides useful functionality for writing delightful console applications.

Varabyte 348 Dec 21, 2022
This repository contains RabbitMQ Protobuf starters with its usage samples for spring-rabbit and spring-cloud-starter-stream-rabbit modules

This repository contains RabbitMQ Protobuf starters with its usage samples for spring-rabbit and spring-cloud-starter-stream-rabbit modules

Maksim Kostromin 2 Nov 29, 2021
Spring-with-maven - Spring Boot App with Postgresql and maven

Spring Boot Api Aplikasi ini dibuat menggunakan bahasa kotlin dan untuk database

Aldi Aulia Rosyad 1 Jan 12, 2022
Reactive setup with Spring WebFlux , Kotlin, Postgres and Spring Data R2DBC

Reactive Spring with Kotlin and Pg Spring WebFlux with Netty instead of Spring Web with Tomcat Mono and Flux in all layers (controller, service, repo)

Bimal Raj Gyawali 7 Dec 9, 2022
Spring-kotlin - Learning API Rest with Kotlin, Spring and PostgreSQL

Kotlin, Spring, PostgreSQL and Liquibase Database Migrations Learning Kotlin for

Andre L S Ferreira 2 Feb 14, 2022
Android login spring - Android login against spring backend

Android Jetpack Compose login implementation with JWT tokens against our own bac

null 1 Feb 13, 2022
Kotlin Based Spring Boot ETL project

Adverity ETL REST API (AERA) A simple ETL Spring Boot application with H2. This API provides the following basics functionalities: Endpoint that retur

null 0 Oct 11, 2021
Spring Boot project scaffold written in Kotlin, which is based on the Official Guide.

Kotlin-Spring-Boot Spring Boot project scaffold written in Kotlin, which is based on the Official Guide. Development environment Windows choco install

idea2app 1 Feb 27, 2022
Sample Social Login Project of Spring Boot and Kotlin

Sample-Spring-Boot-Social-Kotlin Sample Social Login Project of Spring Boot and Kotlin dependencies dependencies { implementation("org.springframewor

Seokhyun 2 Oct 11, 2021