Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Ibon Tolosana committed Feb 22, 2015
1 parent 88f9105 commit 8b49a45
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions readme.md
Expand Up @@ -128,9 +128,9 @@ Transition:

A natural transition flow of executed actions for a transition from StateA to StateB will be:

<code>
```
StateA.onExit() -> Transition.onTransition() -> StateB.onEnter()
</code>
```

Those hooks are defined in the **FSM JSON** definition as in the example:

Expand Down Expand Up @@ -242,7 +242,7 @@ The difference is straight:
A natural transition flow of executed actions for a transition from StateA to StateB with preGuard and postGuard actions
will be:

<code>
```
if preGuard throws exception
// nothing will happen
nil;
Expand All @@ -256,11 +256,11 @@ else
StateA.onExit -> Transition.onTransition -> StateB.onEnter
endif
endif
</code>
```

The way to instrument the engine that a guard veto has been launched, will be by throwing an exception from the
pre/post-transition functions. A Guard is expected to throw a GuardException object by calling
<code>transition.createThrowable</code> method.
`transition.createThrowable`method.
Those functions are optional, and must be set in the "transition" block of the
FSM definition as follows:

Expand Down Expand Up @@ -913,4 +913,4 @@ session.printStackTrace();

// prints: session empty.

```
```

0 comments on commit 8b49a45

Please sign in to comment.