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

io.holunda.camunda.bpm.extension.jgiven.DefaultInstanceSupplier.kt Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
package io.holunda.camunda.bpm.extension.jgiven

import org.camunda.bpm.engine.runtime.ProcessInstance
import java.util.function.Supplier

/**
 * Default implementation holding one process instance. This class is intended to be subclassed.
 */
open class DefaultInstanceSupplier(
  protected var processInstance: ProcessInstance?
) : Supplier {

  /**
   * Retrieves the process instance.
   */
  override fun get(): ProcessInstance {
    require(processInstance != null) { "Process has not been started. Consider starting it before accessing the process instance." }
    return processInstance!!
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy