if (StringUtils.hasContent(dispatchScript)) {
SoapUIScriptEngine scriptEngine = scriptEnginePool.getScriptEngine();
try {
MockService mockService = getMockOperation().getMockService();
MockRunner mockRunner = mockService.getMockRunner();
MockRunContext context = mockRunner == null ? new WsdlMockRunContext(mockService, null) : mockRunner
.getMockContext();
scriptEngine.setVariable("context", context);
scriptEngine.setVariable("requestContext", request == null ? null : request.getRequestContext());
scriptEngine.setVariable("mockRequest", request);