Gokul Alex
Gokul Alex

Reputation: 467

Can we have more than one trigger between two states in a State Machine?

I am working on implementing a state machine for a workflow management system based on the Stateless4j API. As per the concept of a Finite State Machine, is it possible to have more than one trigger between two states. Triggers are the conceptual entities that facilitate the transition between states in a Stateless4j based state machine. If it is possible to have more than one trigger between two states, how can we implement it in Stateless4j API?

Please share your thoughts!

Upvotes: 0

Views: 381

Answers (1)

stevenv
stevenv

Reputation: 431

Why not? Even the Stateless4J example has it:

phoneCallConfig.configure(State.Connected)
....
    .permit(Trigger.LeftMessage, State.OffHook)
    .permit(Trigger.HungUp, State.OffHook)
...

Upvotes: 0

Related Questions