Skip to content

Commit 0eab1a8

Browse files
Added Maven badge, improved documentation of actions
1 parent 03492d3 commit 0eab1a8

1 file changed

Lines changed: 35 additions & 11 deletions

File tree

README.md

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![Maven Central](https://img.shields.io/maven-central/v/com.github.aljoshakoecher/isa88-state-machine.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.github.aljoshakoecher%22%20AND%20a:%22isa88-state-machine%22)
2+
13
# Java ISA88-StateMachine
24
A Java implementation of the state machine standardized in ISA 88. The state machine guarantees that only transitions that only 'valid' transitions can be executed. Have a look at the following figure which depicts the state machine of ISA 88:
35

@@ -64,17 +66,39 @@ stateMachine = new StateMachineBuilder().withActionInStarting(new ExampleActionI
6466
```
6567

6668
You may use one or more of the following functions of the StateMachineBuilder:
67-
* withActionInStarting(IStateAction action)
68-
* withActionInExecute(IStateAction action)
69-
* withActionInCompleting(IStateAction action)
70-
* withActionInSuspending(IStateAction action)
71-
* withActionInUnsuspending(IStateAction action)
72-
* withActionInHolding(IStateAction action)
73-
* withActionInUnholding(IStateAction action)
74-
* withActionInAborting(IStateAction action)
75-
* withActionInClearing(IStateAction action)
76-
* withActionInStopping(IStateAction action)
77-
* withActionInResetting(IStateAction action)
69+
70+
##### withActionInStarting(IStateAction action)
71+
Sets action to be the action that is going to be executed when the state machine is in 'Starting' state.
72+
73+
##### withActionInExecute(IStateAction action)
74+
Sets action to be the action that is going to be executed when the state machine is in 'Execute' state.
75+
76+
##### withActionInCompleting(IStateAction action)
77+
Sets action to be the action that is going to be executed when the state machine is in 'Completing' state.
78+
79+
##### withActionInSuspending(IStateAction action)
80+
Sets action to be the action that is going to be executed when the state machine is in 'Suspending' state.
81+
82+
##### withActionInUnsuspending(IStateAction action)
83+
Sets action to be the action that is going to be executed when the state machine is in 'Unsuspending' state.
84+
85+
##### withActionInHolding(IStateAction action)
86+
Sets action to be the action that is going to be executed when the state machine is in 'Holding' state.
87+
88+
##### withActionInUnholding(IStateAction action)
89+
Sets action to be the action that is going to be executed when the state machine is in 'Unholding' state.
90+
91+
##### withActionInAborting(IStateAction action)
92+
Sets action to be the action that is going to be executed when the state machine is in 'Aborting' state.
93+
94+
##### withActionInClearing(IStateAction action)
95+
Sets action to be the action that is going to be executed when the state machine is in 'Clearing' state.
96+
97+
##### withActionInStopping(IStateAction action)
98+
Sets action to be the action that is going to be executed when the state machine is in 'Stopping' state.
99+
100+
##### withActionInResetting(IStateAction action)
101+
Sets action to be the action that is going to be executed when the state machine is in 'Resetting' state.
78102

79103
### Getting notified on state changes
80104
Work in progress, coming soon

0 commit comments

Comments
 (0)