Enum EventEvaluation

All Implemented Interfaces:
Serializable, Comparable<EventEvaluation>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:37.228Z") @Stability(Experimental) public enum EventEvaluation extends Enum<EventEvaluation>
(experimental) Information about the order in which events are evaluated and how actions are executed.


 import software.amazon.awscdk.services.iotevents.*;
 import software.amazon.awscdk.services.iotevents.actions.*;
 import software.amazon.awscdk.services.lambda.*;
 IFunction func;
 Input input = Input.Builder.create(this, "MyInput")
         .inputName("my_input") // optional
         .attributeJsonPaths(List.of("payload.deviceId", "payload.temperature"))
 State warmState = State.Builder.create()
                 .actions(List.of(new LambdaInvokeAction(func)))
         .onInput(List.of(Event.builder() // optional
                 .actions(List.of(new LambdaInvokeAction(func))).build()))
         .onExit(List.of(Event.builder() // optional
                 .actions(List.of(new LambdaInvokeAction(func))).build()))
 State coldState = State.Builder.create()
 // transit to coldState when temperature is less than 15
 warmState.transitionTo(coldState, TransitionOptions.builder()
         .eventName("to_coldState") // optional property, default by combining the names of the States
         .when(Expression.lt(Expression.inputAttribute(input, "payload.temperature"), Expression.fromString("15")))
         .executing(List.of(new LambdaInvokeAction(func)))
 // transit to warmState when temperature is greater than or equal to 15
 coldState.transitionTo(warmState, TransitionOptions.builder()
         .when(Expression.gte(Expression.inputAttribute(input, "payload.temperature"), Expression.fromString("15")))
 DetectorModel.Builder.create(this, "MyDetectorModel")
         .detectorModelName("test-detector-model") // optional
         .description("test-detector-model-description") // optional property, default is none
         .evaluationMethod(EventEvaluation.SERIAL) // optional property, default is iotevents.EventEvaluation.BATCH
         .detectorKey("payload.deviceId") // optional property, default is none and single detector instance will be created and all inputs will be routed to it
  • Enum Constant Details

    • BATCH

      @Stability(Experimental) public static final EventEvaluation BATCH
      (experimental) When setting to BATCH, variables within a state are updated and events within a state are performed only after all event conditions are evaluated.
    • SERIAL

      @Stability(Experimental) public static final EventEvaluation SERIAL
      (experimental) When setting to SERIAL, variables are updated and event conditions are evaluated in the order that the events are defined.
  • Method Details

    • values

      public static EventEvaluation[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static EventEvaluation valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null