io.holunda.camunda.taskpool.plugin.PublishHistoryEventHandler.kt Maven / Gradle / Ivy
package io.holunda.camunda.taskpool.plugin
import org.camunda.bpm.engine.impl.history.event.HistoryEvent
import org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler
import org.springframework.context.ApplicationEventPublisher
/**
* Publishes history events via Spring application eventing.
*/
class PublishHistoryEventHandler(private val publisher: ApplicationEventPublisher) : HistoryEventHandler {
override fun handleEvents(historyEvents: MutableList) {
historyEvents.forEach { handleEvent(it) }
}
override fun handleEvent(historyEvent: HistoryEvent) {
publisher.publishEvent(historyEvent)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy