script dispatching for rest mock action