Example usage for org.springframework.statemachine.guard Guard evaluate

List of usage examples for org.springframework.statemachine.guard Guard evaluate

Introduction

In this page you can find the example usage for org.springframework.statemachine.guard Guard evaluate.

Prototype

boolean evaluate(StateContext<S, E> context);

Source Link

Document

Evaluate a guard condition.

Usage

From source file:org.springframework.statemachine.state.ChoicePseudoState.java

private boolean evaluateInternal(Guard<S, E> guard, StateContext<S, E> context) {
    try {/*from   w ww . j  ava 2  s  .  c o  m*/
        return guard.evaluate(context);
    } catch (Throwable t) {
        log.warn("Deny guard due to throw as GUARD should not error", t);
        return false;
    }
}