Ver código fonte

gh-1806 Thor and Dali created via Advanced view will not have optional attributes.

Thor and Dali created via Advanced view will not have optional attributes. Also changed some thor attributes to have the same default values as the wizard.

Signed-off-by: Sridhar Meda <sridhar.meda@lexisnexis.com>
Sridhar Meda 13 anos atrás
pai
commit
3e001e3752

+ 64 - 6
deployment/deployutils/deployutils.cpp

@@ -1770,13 +1770,70 @@ bool generateHeadersFromXsd(IPropertyTree* pEnv, const char* xsdName, const char
   return obj.generateHeaders();
 }
 
-IPropertyTree* generateTreeFromXsd(const IPropertyTree* pEnv, IPropertyTree* pSchema, const char* compName, bool allSubTypes, bool wizFlag, CWizardInputs* pWInputs, bool genOptional)
+IPropertyTree* generateTreeFromXsd(const IPropertyTree* pEnv, IPropertyTree* pSchema,
+                                   const char* compName, const char* buildSetName,
+                                   const IPropertyTree* pCfg, const char* servicename,
+                                   bool allSubTypes, bool wizFlag, CWizardInputs* pWInputs,
+                                   bool forceOptional)
 {
+  bool flag = true;
+
+  if (!forceOptional)
+  {
+    StringBuffer xpath, genEnvConf, prop;
+    Owned<IProperties> algProp;
+    xpath.clear().appendf("Software/EspProcess/EspService[@name='%s']/LocalConfFile", servicename);
+    const char* pConfFile = pCfg->queryProp(xpath.str());
+    xpath.clear().appendf("Software/EspProcess/EspService[@name='%s']/LocalEnvConfFile", servicename);
+    const char* pEnvConfFile = pCfg->queryProp(xpath.str());
+
+    if (pConfFile && *pConfFile && pEnvConfFile && *pEnvConfFile)
+    {
+      Owned<IProperties> pParams = createProperties(pConfFile);
+      Owned<IProperties> pEnvParams = createProperties(pEnvConfFile);
+      const char* genenv = pParams->queryProp("wizardalgorithm");
+
+      if (!genenv || !*genenv)
+        genenv = "genenvrules.conf";
+
+      const char* cfgpath = pEnvParams->queryProp("configs");
+
+      if (!cfgpath || !*cfgpath)
+        cfgpath = CONFIG_DIR;
+
+      genEnvConf.clear().append(cfgpath);
+
+      if (genEnvConf.charAt(genEnvConf.length() - 1) != PATHSEPCHAR)
+        genEnvConf.append(PATHSEPCHAR);
+
+      genEnvConf.append(genenv);
+    }
+
+    if (genEnvConf.length() && checkFileExists(genEnvConf.str()))
+      algProp.setown(createProperties(genEnvConf.str()));
+
+    enum GenOptional {GENOPTIONAL_ALL, GENOPTIONAL_NONE, GENOPTIONAL_COMPS};
+    GenOptional genOpt = GENOPTIONAL_COMPS;
+    algProp->getProp("do_not_gen_optional", prop);
+    StringArray doNotGenOpt;
+    DelimToStringArray(prop.str(), doNotGenOpt, ",");
+
+    if (doNotGenOpt.length() == 0)
+      genOpt = GENOPTIONAL_ALL;
+    else if (doNotGenOpt.length() == 1 && !strcmp(doNotGenOpt.item(0), "all"))
+      genOpt = GENOPTIONAL_NONE;
+
+    if (genOpt == GENOPTIONAL_ALL || (genOpt == GENOPTIONAL_COMPS && doNotGenOpt.find(buildSetName) == NotFound ))
+      flag = true;
+    else if (genOpt == GENOPTIONAL_NONE || (genOpt == GENOPTIONAL_COMPS && doNotGenOpt.find(buildSetName) != NotFound ))
+      flag = false;
+  }
+
   Owned<IPropertyTree> pCompTree(createPTree(compName));
   CGenerateJSFromXSD obj(pEnv, pSchema, "", compName);
   obj.setCompTree(pCompTree, allSubTypes);
   obj.setWizardFlag(wizFlag);
-  obj.setGenerateOptional(genOptional);
+  obj.setGenerateOptional(flag);
   obj.setWizard(pWInputs);
   obj.generateHeaders();
   return pCompTree.getLink();
@@ -3452,7 +3509,8 @@ void mergeAttributes(IPropertyTree* pTo, IPropertyTree* pFrom)
   }
 }
 
-void addEspBindingInformation(const char* xmlArg, IPropertyTree* pEnvRoot, StringBuffer& sbNewName, IConstEnvironment* pEnvironment)
+void addEspBindingInformation(const char* xmlArg, IPropertyTree* pEnvRoot, StringBuffer& sbNewName, IConstEnvironment* pEnvironment,
+                              const IPropertyTree* pCfg, const char* serviceName)
 {
   Owned<IPropertyTree> pBindings = createPTreeFromXMLString(xmlArg && *xmlArg ? xmlArg : "<EspServiceBindings/>");
   const char* type = pBindings->queryProp(XML_ATTR_TYPE);
@@ -3506,7 +3564,7 @@ void addEspBindingInformation(const char* xmlArg, IPropertyTree* pEnvRoot, Strin
     }
 
     IPropertyTree* pEspService = pEnvRoot->queryPropTree(xpath.str());  
-    IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName);
+    IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, pCfg, serviceName);
 
     StringBuffer sb(type);
 
@@ -3531,7 +3589,7 @@ void addEspBindingInformation(const char* xmlArg, IPropertyTree* pEnvRoot, Strin
   if (!flag)
   {
     IPropertyTree* pEspService = pEnvRoot->queryPropTree(xpath.str());  
-    IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName);
+    IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, pCfg, serviceName);
     StringBuffer sbNewName(XML_TAG_ESPBINDING);
     xpath.clear().appendf("%s[@name='%s']/EspBinding", processName, espName);
 
@@ -3666,4 +3724,4 @@ bool validateEnv(IConstEnvironment* pConstEnv, bool abortOnException)
   }
 
   return true;
-}
+}

+ 6 - 3
deployment/deployutils/deployutils.hpp

@@ -54,8 +54,10 @@ extern DEPLOYUTILS_API bool generateHeaderForTopology(const IPropertyTree* pEnv,
 extern DEPLOYUTILS_API bool generateHeadersForEnvSettings(const IPropertyTree* pEnv, StringBuffer& sbDefn, bool writeOut = false);
 extern DEPLOYUTILS_API bool generateHeadersForEnvXmlView(const IPropertyTree* pEnv, StringBuffer& sbDefn, bool writeOut = false);
 extern DEPLOYUTILS_API bool getComputersListWithUsage(const IPropertyTree* pEnv, StringBuffer& sbComputers, StringBuffer& sbFilter);
-extern DEPLOYUTILS_API IPropertyTree* generateTreeFromXsd(const IPropertyTree* pEnv, IPropertyTree* pSchema, const char* compName, bool allSubTypes = true, 
-                                                          bool cloudFlag = false, CWizardInputs* pWInputs = NULL, bool genOptional = true);
+extern DEPLOYUTILS_API IPropertyTree* generateTreeFromXsd(const IPropertyTree* pEnv, IPropertyTree* pSchema, const char* compName,
+                                                          const char* buildSetName, const IPropertyTree* pCfg, const char* servicename,
+                                                          bool allSubTypes = true, bool cloudFlag = false, CWizardInputs* pWInputs = NULL,
+                                                          bool forceOptional=false);
 extern DEPLOYUTILS_API bool checkComponentReferences(const IPropertyTree* pEnv, IPropertyTree* pCompNode, const char* compName, StringBuffer& sMsg, const char* szNewName=NULL);
 extern DEPLOYUTILS_API bool generateHeaderForComponent(const IPropertyTree* pEnv, IPropertyTree* pSchema, const char* compName);
 extern DEPLOYUTILS_API const char* getUniqueName(const IPropertyTree* pEnv, StringBuffer& sName, const char* xpath, const char* category);
@@ -81,7 +83,8 @@ extern DEPLOYUTILS_API void runScript(StringBuffer& output, StringBuffer& errMsg
 extern DEPLOYUTILS_API bool validateIPS(const char* ipAddressList);
 extern DEPLOYUTILS_API void getSummary(const IPropertyTree* pEnvRoot, StringBuffer& respXmlStr , bool prepareLink);
 extern DEPLOYUTILS_API void mergeAttributes(IPropertyTree* pTo, IPropertyTree* pFrom);
-extern DEPLOYUTILS_API void addEspBindingInformation(const char* xmlArg, IPropertyTree* pEnvRoot, StringBuffer& sbNewName, IConstEnvironment* pConstEnv);
+extern DEPLOYUTILS_API void addEspBindingInformation(const char* xmlArg, IPropertyTree* pEnvRoot, StringBuffer& sbNewName, IConstEnvironment* pConstEnvconst,
+                                                     const IPropertyTree* pCfg, const char* serviceName);
 extern DEPLOYUTILS_API bool updateDirsWithConfSettings(IPropertyTree* pEnvRoot, IProperties* pParams, bool ovrLog = true, bool ovrRun = true);
 extern DEPLOYUTILS_API bool validateEnv(IConstEnvironment* pConstEnv, bool abortOnException = true);
 #endif

+ 5 - 31
deployment/deployutils/wizardInputs.cpp

@@ -152,7 +152,6 @@ void CWizardInputs::setWizardRules()
    m_roxieAgentRedType.clear().append("Circular");
    m_roxieAgentRedChannels = 2;
    m_roxieAgentRedOffset = 1;
-   m_genOptForAllComps = GENOPTIONAL_ALL;
 
    if(m_algProp)
    {
@@ -204,16 +203,6 @@ void CWizardInputs::setWizardRules()
           DelimToStringArray(prop.str(), m_doNotGenComp, ",");
        else if(!strcmp (iter->getPropKey(),"comps_on_all_nodes"))
           DelimToStringArray(prop.str(), m_compOnAllNodes, ",");
-       else if(!strcmp (iter->getPropKey(),"do_not_gen_optional"))
-       {
-          DelimToStringArray(prop.str(), m_doNotGenOptOnComps, ",");
-          if (m_doNotGenOptOnComps.length() == 0)
-            m_genOptForAllComps = GENOPTIONAL_ALL;
-          else if (m_doNotGenOptOnComps.length() == 1 && !strcmp(m_doNotGenOptOnComps.item(0), "all"))
-            m_genOptForAllComps = GENOPTIONAL_NONE;
-          else
-            m_genOptForAllComps = GENOPTIONAL_COMPS;
-       }
        else if(!strcmp(iter->getPropKey(), "topology_for_comps"))
         DelimToStringArray(prop.str(), m_clusterForTopology, ",");
        else if (!strcmp(iter->getPropKey(), "roxie_agent_redundancy"))
@@ -598,7 +587,7 @@ void CWizardInputs::getDefaultsForWizard(IPropertyTree* pNewEnvTree)
   Owned<IPropertyTree> pBuildTree = createPTreeFromIPT(pNewEnvTree->queryPropTree("./"XML_TAG_PROGRAMS));
   xpath.clear().appendf("./%s/%s/", XML_TAG_BUILD, XML_TAG_BUILDSET);
   Owned<IPropertyTreeIterator> buildSetInsts = pBuildTree->getElements(xpath.str());
-  bool genOptional = true;
+
   ForEach(*buildSetInsts)
   {
     IPropertyTree* pBuildSet = &buildSetInsts->query();
@@ -610,12 +599,7 @@ void CWizardInputs::getDefaultsForWizard(IPropertyTree* pNewEnvTree)
     {
       Owned<IPropertyTree> pSchema = loadSchema(pBuildTree->queryPropTree("./"XML_TAG_BUILD"[1]"), pBuildSet, buildSetPath, NULL);
 
-      if (m_genOptForAllComps == GENOPTIONAL_ALL || (m_genOptForAllComps == GENOPTIONAL_COMPS && m_doNotGenOptOnComps.find(buildSetName) == NotFound ))
-        genOptional = true;
-      else if (m_genOptForAllComps == GENOPTIONAL_NONE || (m_genOptForAllComps == GENOPTIONAL_COMPS && m_doNotGenOptOnComps.find(buildSetName) != NotFound ))
-        genOptional = false;
-
-      Owned<IPropertyTree> pCompTree = generateTreeFromXsd(pNewEnvTree, pSchema, processName, true, true, this, genOptional);
+      Owned<IPropertyTree> pCompTree = generateTreeFromXsd(pNewEnvTree, pSchema, processName, buildSetName, m_cfg, m_service.str(), true, true, this);
       xpath.clear().appendf("./%s/%s/[%s=\"%s\"]", XML_TAG_SOFTWARE, processName, XML_ATTR_BUILDSET, buildSetName);
       IPropertyTree* pSWCompTree = pNewEnvTree->queryPropTree(xpath.str());
 
@@ -859,7 +843,6 @@ void CWizardInputs::getEspBindingInformation(IPropertyTree* pNewEnvTree)
      compName.clear().append(pEspProcess->queryProp(XML_ATTR_NAME));
      xpath.clear().appendf("./%s/%s/%s[@processName=\"%s\"]", XML_TAG_PROGRAMS, XML_TAG_BUILD, XML_TAG_BUILDSET, XML_TAG_ESPSERVICE);
      Owned<IPropertyTreeIterator> espServiceIter = pNewEnvTree->getElements(xpath.str());
-     bool genOptional = true;
        
      ForEach (*espServiceIter)
      {
@@ -880,16 +863,12 @@ void CWizardInputs::getEspBindingInformation(IPropertyTree* pNewEnvTree)
 
            const char* buildSetName = pEspService->queryProp(XML_ATTR_NAME);
            const char* processName = pEspService->queryProp(XML_ATTR_PROCESS_NAME);
-           if (m_genOptForAllComps == GENOPTIONAL_ALL || (m_genOptForAllComps == GENOPTIONAL_COMPS && m_doNotGenOptOnComps.find(buildSetName) == NotFound ))
-             genOptional = true;
-           else if (m_genOptForAllComps == GENOPTIONAL_NONE || (m_genOptForAllComps == GENOPTIONAL_COMPS && m_doNotGenOptOnComps.find(buildSetName) != NotFound ))
-             genOptional = false;
 
            StringBuffer buildSetPath;
            Owned<IPropertyTree> pSchema = loadSchema(pNewEnvTree->queryPropTree("./Programs/Build[1]"), pEspService, buildSetPath, NULL);
 
            xmlArg.clear().appendf("<EspServiceBindings type=\"EspBinding\" compName=\"%s\" > <Item name=\"%s\" params=\"pcType=EspProcess::pcName=%s::subType=EspBinding::subTypeKey=%s \"/></EspServiceBindings>", compName.str(), espServiceName.str(), compName.str(), espServiceName.str());
-           addEspBindingInformation(xmlArg, pNewEnvTree, sbNewName, NULL);
+           addEspBindingInformation(xmlArg, pNewEnvTree, sbNewName, NULL, m_cfg, m_service.str());
            
            xpath.clear().appendf("./%s/%s/%s/[%s=\"\"]", XML_TAG_SOFTWARE, XML_TAG_ESPPROCESS, XML_TAG_ESPBINDING, XML_ATTR_SERVICE);
            IPropertyTree* pEspBindingInfo = pNewEnvTree->queryPropTree(xpath.str());
@@ -902,7 +881,7 @@ void CWizardInputs::getEspBindingInformation(IPropertyTree* pNewEnvTree)
            xpath.clear().appendf("%s/%s[%s=\"%s\"]/Properties", XML_TAG_SOFTWARE, XML_TAG_ESPSERVICE, XML_ATTR_NAME, (espServiceName.toLowerCase()).str());
            IPropertyTree* pSvcProps = pNewEnvTree->queryPropTree(xpath.str());
 
-           Owned<IPropertyTree> pCompTree = generateTreeFromXsd(pNewEnvTree, pSchema, processName, true, false, 0, genOptional);
+           Owned<IPropertyTree> pCompTree = generateTreeFromXsd(pNewEnvTree, pSchema, processName, buildSetName, m_cfg, m_service.str(), true, false, 0);
 
            Owned<IPropertyTreeIterator> i = pSvcProps->getElements("Authenticate");
            ForEach(*i)
@@ -1113,12 +1092,7 @@ void CWizardInputs::addComponentToSoftware(IPropertyTree* pNewEnvTree, IProperty
   if (processName && *processName && buildSetName && * buildSetName && xsdFileName && *xsdFileName)
   {
     Owned<IPropertyTree> pSchema = loadSchema(m_buildSetTree->queryPropTree("./"XML_TAG_PROGRAMS"/"XML_TAG_BUILD"[1]"), pBuildSet, buildSetPath, NULL);
-    IPropertyTree* pCompTree;
-
-    if (m_genOptForAllComps == GENOPTIONAL_ALL || (m_genOptForAllComps == GENOPTIONAL_COMPS && m_doNotGenOptOnComps.find(buildSetName) == NotFound ))
-      pCompTree = generateTreeFromXsd(pNewEnvTree, pSchema, processName, false);
-    else if (m_genOptForAllComps == GENOPTIONAL_NONE || (m_genOptForAllComps == GENOPTIONAL_COMPS && m_doNotGenOptOnComps.find(buildSetName) != NotFound ))
-      pCompTree = generateTreeFromXsd(pNewEnvTree, pSchema, processName, false, false, 0, false);
+    IPropertyTree* pCompTree = generateTreeFromXsd(pNewEnvTree, pSchema, processName, buildSetName, m_cfg, m_service.str(), false);
 
     sbNewName.clear();
     if (strstr(buildSetName ,"my") == NULL && (strcmp(buildSetName, "topology") != 0))

+ 0 - 8
deployment/deployutils/wizardInputs.hpp

@@ -42,13 +42,6 @@ interface IPropertyTree;
 using std::string;
 using std::map;
 
-typedef enum GenOptional_
-{
-    GENOPTIONAL_ALL,
-    GENOPTIONAL_NONE,
-    GENOPTIONAL_COMPS
-} GenOptional;
-
 class CInstDetails : public CInterface, implements IInterface
 {
   public: 
@@ -132,7 +125,6 @@ private:
    StringArray m_doNotGenOptOnComps;
    StringArray m_clusterForTopology;
    MapStringToStringArray m_compForTopology; 
-   GenOptional m_genOptForAllComps;
    MapStringToStringArray m_invalidServerCombo;
    unsigned m_supportNodes;
    unsigned m_roxieNodes;

+ 11 - 11
esp/services/WsDeploy/WsDeployService.cpp

@@ -1080,7 +1080,7 @@ bool CWsDeployFileInfo::saveSetting(IEspContext &context, IEspSaveSettingRequest
                 StringBuffer buildSetPath;
                 Owned<IPropertyTree> pSchema = loadSchema(pEnvRoot->queryPropTree("./Programs/Build[1]"), pBuildSet, buildSetPath, m_Environment);
 
-                Owned<IPropertyTree> pNewCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName);
+                Owned<IPropertyTree> pNewCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName());
                 StringBuffer sbtmp(pszSubType);
                 StringBuffer sb;
                 const char* psz = strrchr(pszSubType, '/');
@@ -1537,7 +1537,7 @@ bool CWsDeployFileInfo::saveSetting(IEspContext &context, IEspSaveSettingRequest
               const char* processName = pBuildSet->queryProp(XML_ATTR_PROCESS_NAME);
               StringBuffer buildSetPath;
               Owned<IPropertyTree> pSchema = loadSchema(pEnvRoot->queryPropTree("./Programs/Build[1]"), pBuildSet, buildSetPath, m_Environment);
-              Owned<IPropertyTree> pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName);
+              Owned<IPropertyTree> pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName());
 
               Owned<IPropertyTreeIterator> i = pSvcProps->getElements("Authenticate");
               ForEach(*i)
@@ -2949,7 +2949,7 @@ bool CWsDeployFileInfo::displaySettings(IEspContext &context, IEspDisplaySetting
 
       //add any missing parameters
       Owned<IPropertyTree> pSrcTree = createPTreeFromXMLString(xml);
-      Owned<IPropertyTree> pNewCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, true);
+      Owned<IPropertyTree> pNewCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName(), true, false, 0, true);
 
       if (pNewCompTree)
       {
@@ -3210,7 +3210,7 @@ bool CWsDeployFileInfo::displaySettings(IEspContext &context, IEspDisplaySetting
       else if (!strcmp(pszCompType, "RoxieCluster"))
       {
         Owned<IPropertyTree> pSrcTree = createPTreeFromXMLString(xml);
-        pNewCompTree.setown(generateTreeFromXsd(pEnvRoot, pSchema, processName));
+        pNewCompTree.setown(generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName()));
 
         if (!strcmp(pszCompType, "RoxieCluster"))
         {
@@ -3977,7 +3977,7 @@ bool CWsDeployFileInfo::handleComponent(IEspContext &context, IEspHandleComponen
       StringBuffer buildSetPath;
       Owned<IPropertyTree> pSchema = loadSchema(pEnvRoot->queryPropTree("./Programs/Build[1]"), pBuildSet, buildSetPath, m_Environment);
       xpath.clear().appendf("./Software/%s[@name='%s']", processName, buildSetName);
-      IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, false);
+      IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName(), false);
       IPropertyTree* pInstTree = pCompTree->queryPropTree(XML_TAG_INSTANCE);
 
       if (pInstTree)
@@ -4108,7 +4108,7 @@ bool CWsDeployFileInfo::handleInstance(IEspContext &context, IEspHandleInstanceR
           pNode->addProp(attrName.str(), szAttrib);
         }
 
-        Owned<IPropertyTree> pNewCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, true);
+        Owned<IPropertyTree> pNewCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSet, m_pService->getCfg(), m_pService->getName(), true);
 
         if (pNewCompTree)
         {
@@ -4273,7 +4273,7 @@ bool CWsDeployFileInfo::handleEspServiceBindings(IEspContext &context, IEspHandl
       }
 
       IPropertyTree* pEspService = pEnvRoot->queryPropTree(xpath.str());    
-      IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName);
+      IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName());
       StringBuffer sb(type);
 
       if (!strncmp(sb.str(), "_", 1))
@@ -4300,7 +4300,7 @@ bool CWsDeployFileInfo::handleEspServiceBindings(IEspContext &context, IEspHandl
     if (!flag)
     {
       IPropertyTree* pEspService = pEnvRoot->queryPropTree(xpath.str());    
-      IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName);
+      IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName());
       StringBuffer sbNewName(XML_TAG_ESPBINDING);
       xpath.clear().appendf("%s[@name='%s']/EspBinding", processName, espName);
 
@@ -4712,7 +4712,7 @@ bool CWsDeployFileInfo::handleRows(IEspContext &context, IEspHandleRowsRequest &
 
   StringBuffer buildSetPath;
   Owned<IPropertyTree> pSchema = loadSchema(pEnvRoot->queryPropTree("./Programs/Build[1]"), pBuildSet, buildSetPath, m_Environment);
-  IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName);
+  IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName());
 
   if (!strcmp(operation, "Add"))
   {
@@ -4779,7 +4779,7 @@ bool CWsDeployFileInfo::handleRows(IEspContext &context, IEspHandleRowsRequest &
         }
 
         IPropertyTree* pComponent = pEnvRoot->queryPropTree(xpath.str());   
-        IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName);
+        IPropertyTree* pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, buildSetName, m_pService->getCfg(), m_pService->getName());
         StringBuffer sb(rowType);
 
         if (!strncmp(sb.str(), "_", 1))
@@ -6776,7 +6776,7 @@ bool CWsDeployFileInfo::checkForRequiredComponents(IPropertyTree* pEnvRoot, cons
         StringBuffer buildSetPath, sbNewName;
         Owned<IPropertyTree> pSchema = loadSchema(pEnvRoot->queryPropTree("./Programs/Build[1]"), pBuildSet, buildSetPath, m_Environment);
         xpath.clear().appendf("./Software/%s[@name='%s']", processName, compOnAllNodes.item(i));
-        pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, false);
+        pCompTree = generateTreeFromXsd(pEnvRoot, pSchema, processName, pBuildSet->queryProp(XML_ATTR_NAME), m_pService->getCfg(), m_pService->getName(), false);
         IPropertyTree* pInstTree = pCompTree->queryPropTree(XML_TAG_INSTANCE);
 
         if (pInstTree)

+ 2 - 2
initfiles/componentfiles/configxml/thor.xsd.in

@@ -454,7 +454,7 @@
           </xs:appinfo>
         </xs:annotation>
       </xs:attribute>
-      <xs:attribute name="autoCopyBackup" type="xs:boolean" default="true">
+      <xs:attribute name="autoCopyBackup" type="xs:boolean" default="false">
         <xs:annotation>
           <xs:appinfo>
             <tooltip>If files at primary location are missing, copy into place from backup location</tooltip>
@@ -533,7 +533,7 @@
           </xs:appinfo>
         </xs:annotation>
       </xs:attribute>
-      <xs:attribute name="monitorDaliFileServer" type="xs:boolean" default="false">
+      <xs:attribute name="monitorDaliFileServer" type="xs:boolean" default="true">
         <xs:annotation>
           <xs:appinfo>
             <tooltip>Warn if dafilesrv process is not running on computers</tooltip>