Repository.XFRACAS.ProcessXfracasImports: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(22 intermediate revisions by 4 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.
== Method Syntax ==
{{APIName|'''ProcessXfracasImports'''()}}<br>
{{APIComment|Immediately processes imported files.}}


== Usage Example ==
{{APIComment|Declare a new repository connection class.}}<br>
{{APIPrefix|Private WithEvents MyRepository As [[New Repository]]}}<br>
{{APIComment|Connect to the Synthesis repository.}}<br>
{{APIPrefix|Dim}} Success {{APIPrefix|As Boolean}} = {{APIPrefix|False}}<br>
Success = MyRepository.[[Repository.ConnectToRepository|ConnectToRepository]]("RepositoryFileNamePath")<br>
{{APIComment|Get the list of XFRACAS Entities in the current project in the connected repository.}}<br>
{{APIPrefix|Dim}} ListOfXFRACASEntities() {{APIPrefix|As [[NameIdPair Class|NameIdPair]]}}<br>
ListOfXFRACASEntities = MyRepository.[[Repository.GetAllXFRACASEntities|GetAllXFRACASEntities]]()<br>
{{APIComment|Import the XML file into the entity desired.  In this example, the first entity is used.}}<br>
{{APIPrefix|Dim}} ImportXMLSystemID {{APIPrefix|As Integer}}<br>
ImportXMLSystemID = MyRepository.[[Repository.ImportXFRACASXMLFile|ImportXFRACASXMLFile]](ListOfXFRACASEntities(0).ID, XFRACASImportType.Incident, "XMLFileName", "XMLFileDescription")<br>
{{APIComment|Process the imported file.}}<br>
MyRepository.[[Repository.ProcessXfracasImports|ProcessXfracasImports]]()<br>


<onlyinclude>Immediately processes all XML files in the XFRACAS import queue.</onlyinclude>


=== Reformatted Usage Example ===
== Syntax ==
{{APIComment|Declare a new repository connection class.}}
'''.XFRACAS.ProcessXfracasImports()'''
        Private WithEvents MyRepository As [[New Repository]]


{{APIComment|Connect to the Synthesis repository.}}
        Dim Success As Boolean = False
        Success = MyRepository.ConnectToRepository("RepositoryFileNamePath")


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


{{APIComment|Import the XML file into the entity desired.  In this example, the first entity is used.}}
'''VB.NET'''
        Dim ImportXMLSystemID As Integer
        ImportXMLSystemID = MyRepository.ImportXFRACASXMLFile(ListOfXFRACASEntities(0).ID, XFRACASImportType.Incident, "XMLFileName", "XMLFileDescription")
{{APIComment|'Connect to a Synthesis enterprise repository.}}
 
  {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository
{{APIComment|Process the imported file.}}
  MyRepository.ConnectToSQLRepository({{APIString|"MyServer"}}, {{APIString|"MyDatabase"}})
        MyRepository.ProcessXFracasImports()
{{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()