diff --git a/esp/services/ws_ecl/ws_ecl_service.cpp b/esp/services/ws_ecl/ws_ecl_service.cpp index a444ce2d13c..8e6d09d1d28 100644 --- a/esp/services/ws_ecl/ws_ecl_service.cpp +++ b/esp/services/ws_ecl/ws_ecl_service.cpp @@ -1568,12 +1568,17 @@ int CWsEclBinding::getGenForm(IEspContext &context, CHttpRequest* request, CHttp xform->setParameter("useTextareaForStringArray", "1"); #ifdef _CONTAINERIZED - bool isRoxie = wsecl->connMap.getValue(wuinfo.qsetname) != nullptr; -#else + VStringBuffer xpath("queues[@name='%s']", wuinfo.qsetname.get()); + IPropertyTree *queue = getComponentConfigSP()->queryPropTree(xpath.str()); + if (queue && strieq(queue->queryProp("@type"), "roxie")) + xform->setParameter("includeRoxieOptions", queue->getPropBool("@queriesOnly") ? "2" : "3"); + else + xform->setParameter("includeRoxieOptions", "0"); + #else Owned clusterInfo = getTargetClusterInfo(wuinfo.qsetname); bool isRoxie = clusterInfo && (clusterInfo->getPlatform() == RoxieCluster); -#endif xform->setParameter("includeRoxieOptions", isRoxie ? "1" : "0"); +#endif // set the prop noDefaultValue param IProperties* props = context.queryRequestParameters(); @@ -2134,8 +2139,18 @@ void CWsEclBinding::sendRoxieRequest(const char *target, StringBuffer &req, Stri } } +static void checkWorkunitCompatibleOptions(IEspContext &context, bool submitWorkunit) +{ + bool statsToWorkunit = context.queryRequestParameters()->getPropBool("@statsToWorkunit", false); + bool summaryStats = context.queryRequestParameters()->getPropBool("@summaryStats", false); + if (submitWorkunit && (statsToWorkunit || summaryStats)) + throw makeStringException(-1, "Neither 'Save stats to workunit' or 'Get summary stats' are supported for the 'Create Workunit' option"); +} + int CWsEclBinding::onSubmitQueryOutput(IEspContext &context, CHttpRequest* request, CHttpResponse* response, WsEclWuInfo &wsinfo, const char *format, bool forceCreateWorkunit) { + checkWorkunitCompatibleOptions(context, forceCreateWorkunit); + StringBuffer status; StringBuffer output; @@ -2200,6 +2215,8 @@ int CWsEclBinding::onSubmitQueryOutput(IEspContext &context, CHttpRequest* reque int CWsEclBinding::onSubmitQueryOutputView(IEspContext &context, CHttpRequest* request, CHttpResponse* response, WsEclWuInfo &wsinfo, bool forceCreateWorkunit) { + checkWorkunitCompatibleOptions(context, forceCreateWorkunit); + IConstWorkUnit *wu = wsinfo.ensureWorkUnit(); StringBuffer soapmsg; diff --git a/esp/xslt/wsecl3_form.xsl b/esp/xslt/wsecl3_form.xsl index d2b6a7ff012..1cc73aa3214 100644 --- a/esp/xslt/wsecl3_form.xsl +++ b/esp/xslt/wsecl3_form.xsl @@ -311,7 +311,7 @@ function switchInputForm() - + @@ -339,6 +339,16 @@ function switchInputForm()   + + +   + + +