package click.kamil.examples.statemachine.extended.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Profile;
import org.springframework.statemachine.StateMachine;
import org.springframework.stereotype.Service;

@Service
@Profile("nonexistent")
public class ProfiledQuirkService implements QuirkService {

    @Autowired
    @Qualifier("paymentStateMachine")
    private StateMachine<String, String> stateMachine;

    @Override
    public void doQuirk() {
        stateMachine.sendEvent("PROFILED_EVENT");
    }
}
