Trying to extract a Maintenance Unit into one XML file using a BR
As the subject line says I am trying to extract a Maintenance unit using a business rule. We are on 8.1.0. Below is the code I am using. I have tried to use MetadataExtract.ExtractXML and XmlExtractContoller.ExtractXML, but I don't get what I am looking for. It ends up dumping everything into the XML file. The name of the Maintenance Unit in this case is Integrations.
Can anyone see what I am doing wrong, or is there another Method I should be using?
' Extract options
Dim xmlOptions As New XmlExtractOptions
' extract all items
xmlOptions.ExtractAllItems = False
' extract specified items
Dim extractDict As New Dictionary(Of XmlExtractItemPk, Boolean)
' Groups are required to be added if extracting Cube Views
extractDict.Add(New XmlExtractItemPk(XmlExtractItemType.DashboardMaintUnit,"Integrations"), True)
'extractDict.Add(New XmlExtractItemPk(XmlExtractItemType.BusinessRule,"XS_ExportAppTypes"), True)
Dim xm As XmlExtractItemPk = New XmlExtractItemPk(XmlExtractItemType.DashboardMaintUnit,"Integrations")
'Execute the Metadata Extract
Using dbConnFW As DBConnInfo = BRAPi.Database.CreateFrameworkDbConnInfo(si)
Using dbConnApp As DBConnInfo = BRAPi.Database.CreateApplicationDbConnInfo(si)
' extract application type XML to target location
'File.WriteAllText(filePath,MetadataExtract.ExtractXML(dbConnFW,dbConnApp,xmlOptions,extractDict))
File.WriteAllText(filePath,XmlExtractController.ExtractXML(dbConnFW,dbConnApp,Nothing,xmlOptions,extractDict,XmlLoadExtractType.ApplicationWorkspaces))
Thanks,
Scott
