Class IfElse

  • All Implemented Interfaces:
    AdaptrisComponent, ComponentLifecycle, ComponentLifecycleExtension, MessageEventGenerator, Service, StateManagedComponent

    @ComponentProfile(summary="Runs the configured service/list \'IF\' the configured condition is met, otherwise will run the \'else\' service/list.",
                      tag="service, conditional",
                      since="3.7.3")
    public class IfElse
    extends ServiceImp

    This Service allows you to test boolean (true or false) Condition's, which if evaluate to "true" will run a configured set of services, otherwise run a different set of services.

    Note, that although you must specify a service or list of services should the configured conditions pass, you do not have to configure services to run should the conditions fail.

    Typically your Condition will test for equality, in-line expressions or whether values exist or not. The values to test will generally come from the payload or message metadata.
    Also note that some conditions can be nested, such that you can test that a value is equal to another AND / OR a value is equal/not to another value.