All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.holunda.camunda.taskpool.plugin.PublishHistoryEventHandler.kt Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
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