/spring-state-machine-demo

Spring State Machine demo project

Primary LanguageJava

Spring State Machine

CircleCI

A Spring State Machine demo project using the credit card authorisation process to demonstrate the different state changes.

The card payment process transitions through the following states:

  • NEW
  • PRE_AUTH
  • PRE_AUTH_ERROR
  • AUTH
  • AUTH_ERROR

The events triggering the state changes are as follows:

  • PRE_AUTHORIZE
  • PRE_AUTH_APPROVED
  • PRE_AUTH_DECLINED
  • AUTHORIZE
  • AUTH_APPROVED
  • AUTH_DECLINED

Based on the Spring Framework Guru example on Udemy.

Requirements

  • Java 11
  • Spring Boot 2.2.6.RELEASE
  • Maven 3.6.2