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

com.ing.baker.recipe.common.InteractionDescriptor.scala Maven / Gradle / Ivy

There is a newer version: 1.1.18
Show newest version
package com.ing.baker.recipe.common

/**
  * An interaction is some code that requires input (ingredients) and produces output (ingredients)
  */
trait InteractionDescriptor {

  val interaction: Interaction

  val name: String

  /**
    * A set of AND preconditions (events)
    */
  val requiredEvents: Set[Event]

  /**
    * A set of OR preconditions (events)
    */
  val requiredOneOfEvents: Set[Event]

  /**
    * A map of predefined parameter values, not provided from the recipe.
    */
  val predefinedIngredients: Map[String, AnyRef]

  /**
    * A map of overridden Ingredient Names for the input
    */
  val overriddenIngredientNames: Map[String, String]

  /**
    * This is used to overwrite the name used for the output ingredient
    */
  val overriddenOutputIngredientName: Option[String]


  /**
    * This is used to overwrite the name used for the output event and for the ingredients created by the event
    */
  val eventOutputTransformers: Map[Event, EventOutputTransformer]

  /**
    * Indicates the maximum number of times the interaction may be called.
    */
  val maximumInteractionCount: Option[Int]

  /**
    * An optional strategy how to deal with failures. Falls back to the default strategy specified in the recipe.
    */
  val failureStrategy: Option[InteractionFailureStrategy]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy