Generic work-order worker for javascript