A Camunda Process Engine Plugin to execute Clojure Functions from Activities

Overview

camunda-clojure-plugin

A Camunda Process Engine Plugin to execute Clojure Functions as Delegates

Why do we need this?

While Camunda is tightly integrated with Java, using it with Clojure could be more elegant. If we want to call Clojure code as a Delegate, we need to create and compile a Java class from Clojure, so that it can be found by Camunda via the classloader. This does not go well with the REPL development flow. This project is an approach to call pure Clojure functions from Camunda process instances, without having to extend BPMN or Camunda itself.

How does it work?

This Process Engine plugin registers a org.camunda.bpm.engine.impl.javax.el.FunctionMapper which can be referred to as a DelegateExpression from the BPMN file. It provides the UEL function clj:delegate, which accepts a string parameter, which can point to any Clojure function accepting a single parameter. This parameter passed will be an instance from Camundas DelegateExecution class. As an example, the delegate expression ${clj:delegate('example.camunda/test-delegate')} will call the function test-delegate in the namespace example.camunda, which might look like this:

(defn test-delegate [execution]
  (do
    (println (str "The instance is " (.getProcessInstanceId execution)))
    (.setVariable execution "var-name" 2)))

This has the following benefits:

  • No customizing of BPMN. The default Camunda modeler and Cockpit just work
  • No customizing of Camunda. No fork is needed, we can just make use of any Camunda version we like
  • No Java Interop Code. We can define our delegates as plain clojure functions
  • Full REPL integration. We can adjust the Clojure delegate functions in the REPL on the fly and test them instantly with Camunda

How can it be used?

When bootstrapping the Camunda engine in your Clojure program, you have to add the plugin class to the engine like this:

(-> engine-config
    (.getProcessEnginePlugins)
    (.add (com.lambdaschmiede.camunda.clojure.ClojureProcessEnginePlugin.)))

The library is not yet available via Clojars / Maven Public repo, but we are working on that.

How stable is this?

Currently this implementation is only used by lambdaschmiede itself, although are presenting it to customers using Camunda. It works in our projects, and we will keep maintaining it to guarantee a stable library for our own use.

You might also like...

Kyrestia, named after Kyrestia the Firstborne, is a process engine supporting mainstream process definition standards.

Kyrestia Kyrestia, named after Kyrestia the Firstborne, is a process engine supporting mainstream process definition standards. It is not only lightwe

Feb 22, 2022

Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way.

Cadence This repo contains the source code of the Cadence server and other tooling including CLI, schema tools, bench and canary. You can implement yo

Jan 4, 2023

Event bus for Android and Java that simplifies communication between Activities, Fragments, Threads, Services, etc. Less code, better quality.

Event bus for Android and Java that simplifies communication between Activities, Fragments, Threads, Services, etc. Less code, better quality.

EventBus EventBus is a publish/subscribe event bus for Android and Java. EventBus... simplifies the communication between components decouples event s

Jan 3, 2023

Use this to open hidden activities on MIUI.

miui_hidden_libs Use this to open hidden activities on MIUI. Translate for your language: https://drive.google.com/file/d/1---II4WVVvPIn3cPodTC52VPVG3

Nov 10, 2022

A core java-based desktop application that can secretly track users' activities, record screenshots and keys typed by the user

A core java-based desktop application that can secretly track users' activities, record screenshots and keys typed by the user

@Abhishek Tandon @Manoj Kumar Dewangan @Ritesh Barik Introduction This project is a core java-based desktop application that can secretly track users'

Apr 2, 2022

Drools is a rule engine, DMN engine and complex event processing (CEP) engine for Java.

An open source rule engine, DMN engine and complex event processing (CEP) engine for Java™ and the JVM Platform. Drools is a business rule management

Dec 31, 2022

Jssembly is a library that allows you to execute native assembly from Java.

jssembly Jssembly is a library that allows you to execute native assembly from Java via a JNI bridge. The goal is to provide wrappers and parsers for

Jun 3, 2022

Nginx module for embedding Clojure or Java or Groovy programs, typically those Ring based handlers.

Nginx-Clojure Nginx-Clojure is a Nginx module for embedding Clojure or Java or Groovy programs, typically those Ring based handlers. Core Features The

Dec 22, 2022

http-kit is a minimalist, event-driven, high-performance Clojure HTTP server/client library with WebSocket and asynchronous support

HTTP Kit A simple, high-performance event-driven HTTP client+server for Clojure CHANGELOG | API | current Break Version: [http-kit "2.5.3"] ; Publish

Dec 31, 2022

Clojure bindings for the Chromium Embedded Framework

clj-cef Clojure bindings for the Chromium Embedded Framework Dependency: Rationale From https://bitbucket.org/chromiumembedded/cef/src/master/ Some us

Nov 2, 2022

BukkitRCEElevator - Allows you to execute Linux commands on panels like Multicraft.

BukkitRCEElevator A plugin that lets you execute linux commands thru Minecraft console. This only works on panels that do not use docker like Multicra

Dec 27, 2021

Calcite Clojure wrapper / integration

calcite-clj - Use Apache Calcite from Clojure Small library to facilitate the implementation of calcite adapters in clojure. It implements org.apache.

Nov 5, 2022

httpx is a CLI to execute requests from JetBrains Http File.

httpx: CLI for run http file httpx is a CLI to execute requests from JetBrains Http File. How to use? Create index.http file with following code, then

Dec 29, 2022

The GhidraLookup plugin aims to help user lookup documentations of Win API functions.

The GhidraLookup plugin aims to help user lookup documentations of Win API functions.

GhidraLookup Plugin The GhidraLookup plugin aims to help user lookup documentations of Win API functions. Usage Right click on a Function in the Decom

Dec 23, 2022

This is a very lightweight plugin for Velocity proxy. Have functions including tabList, pingList and global chat.

This is a very lightweight plugin for Velocity proxy. Have functions including tabList, pingList and global chat.

Essential-PlayerInfo This repo had been transported to our team, and will not be updated here. https://github.com/Team-Jackdaw/Essential-PlayerInfo In

Mar 4, 2022

Sample application demonstrating an order fulfillment system decomposed into multiple independant components (e.g. microservices). Showing concrete implementation alternatives using e.g. Java, Spring Boot, Apache Kafka, Camunda, Zeebe, ...

Sample application demonstrating an order fulfillment system decomposed into multiple independant components (e.g. microservices). Showing concrete implementation alternatives using e.g. Java, Spring Boot, Apache Kafka, Camunda, Zeebe, ...

Sample application demonstrating an order fulfillment system decomposed into multiple independant components (e.g. microservices). Showing concrete implementation alternatives using e.g. Java, Spring Boot, Apache Kafka, Camunda, Zeebe, ...

Dec 14, 2022

This open source project allows you to easily integrate Camunda's External Task Clients into Micronaut projects: simply add a dependency in your Micronaut project

micronaut-camunda-external-client This open source project allows you to easily integrate Camunda 's External Task Clients into Micronaut projects. Mi

Dec 18, 2022
Owner
lambdaschmiede GmbH
lambdaschmiede GmbH
Calcite Clojure wrapper / integration

calcite-clj - Use Apache Calcite from Clojure Small library to facilitate the implementation of calcite adapters in clojure. It implements org.apache.

Eugen Stan 24 Nov 5, 2022
Java UCI Protocol implementation (Universal Chess Engine)

A simple UCI (Universal Chess Interface) Client written in Java. Tested with Stockfish 13. Documentation Starting / Closing the client By using the st

Andrei Ciobanu 22 Jan 2, 2023
The engine for the classification of texts into negative, neutral or positive sentiment (sentiment analysis)

Umigon-core The classification engine for sentiment analysis. The basic operations are: decompose the text into n-grams create a version of the n-gram

Clement Levallois 3 Jun 23, 2022
GHIDRA plugin to parse, disassemble and decompile NodeJS Bytenode (JSC) binaries

ghidra_nodejs Description GHIDRA plugin to parse, disassemble and decompile NodeJS Bytenode (JSC) binaries. Supported NodeJS versions: v8.16.0 (x64) (

Positive Technologies 231 Jan 8, 2023
Burpsuite plugin for Interact.sh

Interactsh Collaborator This is a Burpsuite plugin for Interact.sh This plugin implements the client side logic from interactsh-client. It will allow

Wyatt Dahlenburg 151 Nov 30, 2022
A plugin for the ja-netfilter, it can block dns resolution.

A plugin for the ja-netfilter, it can block dns resolution.

null 17 May 12, 2022
A small Private Messaging Minecraft Plugin

Project PM is a Private Messaging system Mini-Plugin Description ?? This is a test plugin, meaning I didn't really intend it for the public use, the "

ren 1 Sep 15, 2022
FreedomChat is a very simple plugin that makes player chat unreportable.

FreedomChat is a very simple plugin that makes player chat unreportable. FreedomChat completely disables chat reporting for 1.19+ without other negative consequences and maximum compatibility.

null 127 Jan 7, 2023
Clojure's data structures modified for use outside of Clojure

This library has been extracted from the master branch of Clojure (http://clojure.org) version 1.5.1 (as of October 2013) http://github.com/richhick

Karl Krukow 221 Oct 6, 2022