---
id: 2452
title: StateMachines in JavaScript... on the path to programmable workflows
slug: statemachines-in-javascript-on-the-path-to-programmable-workflows
date: '2012-05-06T04:08:06Z'
modified: '2012-05-06T04:09:06Z'
status: publish
type: post
author: pmoelgaard
categories:
  - JavaScript
tags:
  - Open Source
excerpt: null
canonicalPath: /posts/statemachines-in-javascript-on-the-path-to-programmable-workflows
featuredImage: null
commentCount: 0
wordCount: 160
readingTimeMinutes: 1
hasMedia: true
hasVideos: false
url: >-
  https://forwardthinking.pemo.me/posts/statemachines-in-javascript-on-the-path-to-programmable-workflows
---
In the need for a Sequential Workflow for JavaScript applications, I was lucky to find a great StateMachine implementation of a Finite StateMachine...

Unfortunately, I wasn't really looking for a Finite StateMachine, but more of a Sequential Workflow that I can use to drive an application consisting of a distinct set of actions in a predictable order... Anyways...

Jakes Gordon has gone the effort of implementing a swift and cleverly designed finite statemachine and made it available on GitHub... its entirely standalone and has no dependencies on other frameworks or libraries.

If you are familiar with using finite statemachines, it will come easy to use the library, otherwise Jakes has formulated a well articulated and easily-understandable ReadMe...  
https://github.com/jakesgordon/javascript-state-machine/#readme

Jakes has documented the library well, and is providing a great example on how to use it in a graphical way...  
[![Image](/media/wp/2012/05/screen-shot-2012-05-06-at-11-05-51-am.png)](http://codeincomplete.com/posts/2011/8/19/javascript_state_machine_v2/example/)  
[http://codeincomplete.com/posts/2011/8/19/javascript\_state\_machine\_v2/example/](http://codeincomplete.com/posts/2011/8/19/javascript_state_machine_v2/example/)

Anyways, check out the library if you are in need of a finite statemachine for your JavaScript applications...  
https://github.com/jakesgordon/javascript-state-machine/
