Lightweight workflow engine