Repository.XFRACAS.ProcessXfracasImports: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(9 intermediate revisions by 2 users 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()'''
 
== Usage Example ==
{{APIComment|Code Block}}
 
  '{{APIComment|Declare a new repository connection class.}}
{{APIPrefix|Private WithEvents MyRepository As New [[Repository Class|Repository]]}}
'{{APIComment|Connect to the Synthesis repository.}}
{{APIPrefix|Dim}} Success {{APIPrefix|As Boolean}} = {{APIPrefix|False}}
Success = MyRepository.[[Repository.ConnectToRepository|ConnectToRepository]]("RepositoryFileNamePath")
'{{APIComment|Get the list of XFRACAS Entities in the current project in the connected repository.}}
{{APIPrefix|Dim}} ListOfXFRACASEntities() {{APIPrefix|As [[NameIdPair Class|NameIdPair]]}}
ListOfXFRACASEntities = MyRepository.[[Repository.GetAllXFRACASEntities|GetAllXFRACASEntities]]()
'{{APIComment|Import the XML file into the entity desired.  In this example, the first entity is used.}}
{{APIPrefix|Dim}} ImportXMLSystemID {{APIPrefix|As Integer}}
ImportXMLSystemID = MyRepository.[[Repository.ImportXFRACASXMLFile|ImportXFRACASXMLFile]](ListOfXFRACASEntities(0).ID,  [[XFRACASImportType]].Incident, "XMLFileName", "XMLFileDescription")
'{{APIComment|Process the imported file.}}
MyRepository.[[Repository.ProcessXfracasImports|ProcessXfracasImports]]()
 
 
=== Reformatted Usage Example ===
{{APIComment|Declare a new repository connection class.}}
        Private WithEvents MyRepository As New [[Repository Class|Repository]]
 
{{APIComment|Connect to the Synthesis repository.}}
        Dim Success As Boolean = False
        Success = MyRepository.[[Repository.ConnectToRepository|ConnectToRepository]]("RepositoryFileNamePath")


{{APIComment|Get the list of XFRACAS Entities in the current project in the connected repository.}}
        Dim ListOfXFRACASEntities() As [[NameIdPair Class|NameIdPair]]
        ListOfXFRACASEntities = MyRepository.[[Repository.GetAllXFRACASEntities|GetAllXFRACASEntities]]()


{{APIComment|Import the XML file into the entity desired.  In this example, the first entity is used.}}
== Example ==
        Dim ImportXMLSystemID As Integer
        ImportXMLSystemID = MyRepository.[[Repository.ImportXFRACASXMLFile|ImportXFRACASXMLFile]](ListOfXFRACASEntities(0).ID, [[XFRACASImportType]].Incident, "XMLFileName", "XMLFileDescription")


{{APIComment|Process the imported file.}}
'''VB.NET'''
        MyRepository.[[Repository.ProcessXfracasImports|ProcessXfracasImports]]()
{{APIComment|'Connect to a Synthesis enterprise repository.}}
  {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository
  MyRepository.ConnectToSQLRepository({{APIString|"MyServer"}}, {{APIString|"MyDatabase"}})
{{APIComment|'Import an XML file into XFRACAS entity ID# 10.}}
  {{APIPrefix|Dim}} ImportXMLSystemID {{APIPrefix|As Integer}}
  ImportXMLSystemID = MyRepository.XFRACAS.ImportXfracasXmlFile(10, XFRACASImportType.Incident, {{APIString|"C:\XMLData.xml"}}, {{APIString|"XMLFileDescription"}})
 
{{APIComment|'Process the imported file.}}
  MyRepository.XFRACAS.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()