A simple workflow engine in JavaScript