workflow processing for javascript