rucciva
November 19, 2025, 9:20am
1
Hello, Is it posible to listen for Spring Eventing Bridge when we use Operaton Run?
i tried with adding resources/META-INF/spring.factories to point my custom config that add @ComponentScan so that my new component can be found but after compiling and dropping the jar inside /operaton/configuration/userlib/, my new component doesnt seem to be loaded?
i used this as a reference on how to do it
kthoms
November 19, 2025, 7:30pm
2
This sounds fine in theory. Can you provide a small example?
rucciva
November 20, 2025, 2:42am
3
here’s the current maven project
/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>id.co.telkom.ddp.sso.operaton</groupId>
<artifactId>operaton-grpc-event-publisher</artifactId>
<version>0.1.0</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>3.5.7</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.operaton.bpm</groupId>
<artifactId>operaton-bom</artifactId>
<version>1.0.0</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.operaton.bpm</groupId>
<artifactId>operaton-engine</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.operaton.bpm.springboot</groupId>
<artifactId>operaton-bpm-spring-boot-starter</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>org.springframework.boot.loader.PropertiesLauncher</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>
/src/main/resources/META-INF/spring.factories
org.springframework.boot.autoconfigure.EnableAutoConfiguration=id.co.telkom.ddp.sso.operaton.SpringConfig
/src/main/java/id/co/telkom/ddp/sso/operaton/SpringConfig.java
package id.co.telkom.ddp.sso.operaton;
import java.util.logging.Logger;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
@Configuration
@AutoConfigureOrder(Ordered.LOWEST_PRECEDENCE) // configured last
public class SpringConfig {
private final Logger LOGGER = Logger.getLogger(SpringConfig.class.getName());
public SpringConfig() {
LOGGER.info("SpringConfig");
}
@Configuration
@ComponentScan(basePackages = { "id.co.telkom.ddp.sso.operaton.event" })
public static class ComponentScanConfiguration {
}
}
/src/main/java/id/co/telkom/ddp/sso/operaton/event/OperatonEventGPRC.java
package id.co.telkom.ddp.sso.operaton.event;
import java.util.logging.Logger;
import org.operaton.bpm.engine.delegate.DelegateExecution;
import org.operaton.bpm.engine.delegate.DelegateTask;
import org.operaton.bpm.engine.impl.history.event.HistoryEvent;
import org.operaton.bpm.spring.boot.starter.event.ExecutionEvent;
import org.operaton.bpm.spring.boot.starter.event.TaskEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;
@Component
public class OperatonEventGPRC {
private final Logger LOGGER = Logger.getLogger(OperatonEventGPRC.class.getName());
@EventListener
public void onTaskEvent(DelegateTask taskDelegate) {
LOGGER.info("DelegateTask: " + taskDelegate);
}
@EventListener
public void onExecutionEvent(DelegateExecution executionDelegate) {
LOGGER.info("DelegateExecution: " + executionDelegate);
}
@EventListener
public void onTaskEvent(TaskEvent taskEvent) {
LOGGER.info("TaskEvent: " + taskEvent);
}
@EventListener
public void onExecutionEvent(ExecutionEvent executionEvent) {
LOGGER.info("ExecutionEvent: " + executionEvent);
}
@EventListener
public void onHistoryEvent(HistoryEvent historyEvent) {
LOGGER.info("HistoryEvent: " + historyEvent);
}
}
kthoms
November 25, 2025, 12:03pm
4
Sorry, I don’t have time ATM to look at it. If the problem persists it might be better to open an issue .
rucciva
November 25, 2025, 12:23pm
5
No worries. I used a workaround by creating a @component under org.operaton.bom.run package which i use to @import my event listener
kthoms
November 25, 2025, 12:36pm
6
Good to hear that you have a workaround!