Interface Action


  • public interface Action
    The interface provides simple abstraction for a piece of work which should be performed to transit a stateful object to the target state according the event. If any action fails then the whole transition should be treated as failed. Implement this interface and put there any logic which is needed during a transition. Use it in your LifecycleConfiguration lifecycle configuration.
    • Method Detail

      • execute

        void execute​(StateContext context)
        Performs a unit of work to execute transition from source to target. Method receives the context which contains information about the current transition.
        Parameters:
        context - contains information about the current transition