Repository.XFRACAS.ProcessXfracasImports: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Template:APIClass|Repository Class|Repository}}
{{DISPLAYTITLE:Repository.XFRACAS.ProcessXfracasImports Method}}{{Template:API}}{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}}
Immediately processes imported files.


For information on the business logic of XFRACAS XML Import click here: [[XFRACAS XML Import Documentation]]
 
<onlyinclude>Immediately processes all XML files in the XFRACAS import queue.</onlyinclude>


== Syntax ==
== Syntax ==
*ProcessXfracasImports()
'''.XFRACAS.ProcessXfracasImports()'''
 
 
== Example ==


== Usage Example ==
  '''VB.NET'''
  '{{APIComment|Declare a new repository connection class.}}
   
  {{APIPrefix|Private WithEvents MyRepository As New [[Repository Class|Repository]]}}
  {{APIComment|'Connect to a Synthesis enterprise repository.}}
  '{{APIComment|Connect to the Synthesis repository.}}
  {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository
{{APIPrefix|Dim}} Success {{APIPrefix|As Boolean}} = {{APIPrefix|False}}
  MyRepository.ConnectToSQLRepository({{APIString|"MyServer"}}, {{APIString|"MyDatabase"}})
Success = MyRepository.[[Repository.ConnectToRepository|ConnectToRepository]]("RepositoryFileNamePath")
   
'{{APIComment|Get the list of XFRACAS Entities in the current project in the connected repository.}}
  {{APIComment|'Import an XML file into XFRACAS entity ID# 10.}}
{{APIPrefix|Dim}} ListOfXFRACASEntities() {{APIPrefix|As [[NameIdPair Class|NameIdPair]]}}
  {{APIPrefix|Dim}} ImportXMLSystemID {{APIPrefix|As Integer}}
  ListOfXFRACASEntities = MyRepository.XFRACAS.[[Repository.GetAllXFRACASEntities|GetAllXFRACASEntities]]()
  ImportXMLSystemID = MyRepository.XFRACAS.ImportXfracasXmlFile(10, XFRACASImportType.Incident, {{APIString|"C:\XMLData.xml"}}, {{APIString|"XMLFileDescription"}})
  '{{APIComment|Import the XML file into the entity desired.  In this example, the first entity is used.}}
 
{{APIPrefix|Dim}} ImportXMLSystemID {{APIPrefix|As Integer}}
  {{APIComment|'Process the imported file.}}
ImportXMLSystemID = MyRepository.XFRACAS.[[Repository.ImportXFRACASXMLFile|ImportXFRACASXMLFile]](ListOfXFRACASEntities(0).ID,   [[XFRACASImportType]].Incident, "XMLFileName", "XMLFileDescription")
  MyRepository.XFRACAS.ProcessXfracasImports()
  '{{APIComment|Process the imported file.}}
MyRepository.XFRACAS.[[Repository.ProcessXfracasImports|ProcessXfracasImports]]()

Latest revision as of 16:44, 10 March 2016

APIWiki.png


Member of: SynthesisAPI.Repository


Immediately processes all XML files in the XFRACAS import queue.

Syntax

.XFRACAS.ProcessXfracasImports()


Example

VB.NET

 'Connect to a Synthesis enterprise repository. 
  Dim MyRepository As New Repository
  MyRepository.ConnectToSQLRepository("MyServer", "MyDatabase")

 'Import an XML file into XFRACAS entity ID# 10. 
  Dim ImportXMLSystemID As Integer
  ImportXMLSystemID = MyRepository.XFRACAS.ImportXfracasXmlFile(10, XFRACASImportType.Incident, "C:\XMLData.xml", "XMLFileDescription")
 
 'Process the imported file. 
  MyRepository.XFRACAS.ProcessXfracasImports()