a simple JavaScript wprkflow engine