Hey Folks, To celebrate my 1000th post (and birthday) I thought I'd release TsaTsaTzu's first "advanced" template example: a finite state machine. [code]
https://github.com/jjaquinta/EchoProofOfConcepts/tree/master/jo.echo.util/doc/fsmTemplate[/code] In this example we use a FSM to emulate the maze from the classic Colossal Cave game. The state represents what room in the maze the user is in. The input symbols are the different cardinal directions the user can go in, and are mapped by intents in our interaction model. The state table lists, for each room, and for each possible direction what new room the user goes to, or if they cannot go that way. There are few business problems that involve threading a maze. However there are plenty of others where complex input needs to be collected. Entering a UPS tracking code a few digits at a time, filling in an audio form, or picking an element from a categorized list. A FSM can be used for all of these. The example is given as a Lambda Function, in both node.js and Python. It is distributed under the Apache Open Source license, 2.0. Please let me know if you find bugs, have ideas for improvements, or would like to see other advanced templates.