Skip to content

gokhanbirincii/customstatemachine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http://localhost:8080/api/start

adresine request attığımızda response olarak:

{ stateMachineId: "3a0b9dc8-50a5-43e5-9f0a-18e46371801a" }

dönecektir, daha sonra bu UUID ile state machine'i persist edip tekrar re-build edebilirsiniz.

Bu kısımlar implement edilmemiştir. Şu dökümanı inceleyebilirsiniz.

http://localhost:8080/api/execute?event=GECILMEK ISTENEN STATE EVENTI

Yine örnek üzerinden ilerleyecek olursak.

  1. http://localhost:8080/api/start
  2. http://localhost:8080/api/execute?event=GET_SHIPMENT_INFO

şeklinde sırasıyla apiye call yaparsak, aşağıdaki responsu alıyor olacağız.

{ currentState: "SHIPMENT_INFO", currentStateValue: "ShipmentInfo" }

currentStateValue propertysinde de görüldüğü üzere state'in içerisine değer yazıp/okuyabiliriz.

State bilgisi memoryde durduğu için:

StateMachine<StateMachineState, StateMachineEvent> stateMachine;

beani bizim için state geçişini işletir.

state machine'i rediste tuttuğumuz zaman birden fazla makinede çalıştırılabilir durumda olmuş olacak bunun içinde yukarıda bahsettiğim linki takip edebilirsiniz.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages