// return new SimpleHttpResponse(scriptRunner != null && scriptRunner.getStatus() == Status.RUNNING ? "1" : "0");
}
public HttpResponse getCurrentStep(final HttpRequest request){
Session session = request.session();
ScriptRunner scriptRunner = session.getScriptRunner();
if (scriptRunner == null) return new SimpleHttpResponse("{'type':'WAIT'}");
String derivedName = request.getParameter("derivedName");
String windowName = request.getParameter("windowName");
String windowTitle = request.getParameter("windowTitle");
String domain = request.getParameter("domain");
String wasOpened = request.getParameter("wasOpened");
//System.out.println("scriptRunner="+scriptRunner);
return new SimpleHttpResponse(scriptRunner.getStepJSON(derivedName, windowName, windowTitle, domain, wasOpened));
}