Repository.XFRACAS.ProcessXfracasImports: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(12 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.


For information on the business logic of XFRACAS XML Import click here: [[XFRACAS XML Import Documentation]]


== Method Syntax ==
<onlyinclude>Immediately processes all XML files in the XFRACAS import queue.</onlyinclude>
{{APIName|'''ProcessXfracasImports'''()}}<br>
{{APIComment|Immediately processes imported files.}}


== Usage Example ==
== Syntax ==
{{APIComment|Code Block}}
'''.XFRACAS.ProcessXfracasImports()'''


'{{APIComment|Declare a new repository connection class.}}
{{APIPrefix|Private WithEvents MyRepository As [[New 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]]()


== Example ==


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