package click.kamil.examples.jmsabstract;

import org.springframework.statemachine.StateMachine;
import org.springframework.stereotype.Component;

@Component
public class DocumentAA extends AbstractAA {

    private final StateMachine<OrderStates, OrderEvents> stateMachine;

    public DocumentAA(StateMachine<OrderStates, OrderEvents> stateMachine) {
        this.stateMachine = stateMachine;
    }

    @Override
    protected void doPMessage(String message) {
        stateMachine.sendEvent(OrderEvents.SUBMIT);
    }
}
