Class EventConditions

java.lang.Object
io.axoniq.framework.workflow.dsl.api.EventConditions

public class EventConditions extends Object
Helper for construction of EventCondition.
Since:
5.4.0
Author:
Simon Zambrovski
  • Method Details

    • fromType

      public static ComponentBuilder<EventCondition> fromType(Class<?> clazz)
      Constructs an event condition without **message predicate** for the qualified name represented by the given type. The resulting event condition will always trigger if the qualified name is matching.
      Parameters:
      clazz - type of message (message type resolve will use this type to deduce the message type).
      Returns:
      condition component builder.
    • fromType

      public static ComponentBuilder<EventCondition> fromType(Class<?> clazz, Associations associations)
      Constructs an event condition with serialized associations for the qualified name represented by the given type.
      Parameters:
      clazz - type of message
      associations - association constraints in canonical serial form
      Returns:
      event condition builder
    • fromQualifiedName

      public static EventCondition fromQualifiedName(QualifiedName qualifiedName)
      Constructs an event condition without **message predicate** from the qualified name which matches all messages with the given qualified name.
      Parameters:
      qualifiedName - qualified name.
      Returns:
      event condition.
    • fromQualifiedName

      public static EventCondition fromQualifiedName(QualifiedName qualifiedName, Associations associations)
      Constructs an event condition from the qualified name and serialized associations.
      Parameters:
      qualifiedName - qualified name
      associations - serialized association constraints
      Returns:
      event condition
    • never

      public static EventCondition never()
      Returns event condition which can't be fulfilled ever.
      Returns:
      a never-condition.
    • never

      public static EventCondition never(QualifiedName qualifiedName)
      Creates a condition for an event with the given qualified name, which will never match. (This one is for testing).
      Parameters:
      qualifiedName - event qualified name.
      Returns:
      event condition.