Load Data Schema

LoadData Sample File
<LoadData xmlns="http://www.onenetwork.com/Platform">
 
<!-- Uncomment and specify URL, instance admin username and password to load data to a remote location
<Location url="http://localhost" username="InstanceAdminUser" password="password"/>
-->
 
<!-- On first load, you'll need all three of these entries -->
<ValueChain>data/ValueChain.xml</ValueChain>
<StandardProcessType>Standard Process Template.spt</StandardProcessType>
<UiMetaModel>data/UiMetaModel.xml</UiMetaModel>
 
<!-- On subsequent loads, if the previous entities (ValueChain, SPT and UIMM) aren't changing, you can omit them and just provide your value chain id instead
<ValueChainId>9904</ValueChainId>
-->
 
<LoadModuleData/>
 
<!-- You can intermix ModelFile (xml) and InboundInterfaceFile (csv) entries below to load your model data -->
 
<InboundInterfaceFile inboundInterface="ZBKS.EnterpriseLoad">data/EnterpriseFile.csv</InboundInterfaceFile>
 
<ModelFile>data/Enterprises.xml</ModelFile>
<ModelFile>data/Organizations.xml</ModelFile>
<ModelFile>data/LoadDataXmlEnterprises.xml</ModelFile>
 
<InboundInterfaceFile inboundInterface="ZBKS.RoleLoad">data/Roles.csv</InboundInterfaceFile>
<InboundInterfaceFile inboundInterface="ZBKS.UserLoad">data/Users.csv</InboundInterfaceFile>
<InboundInterfaceFile inboundInterface="ZBKS.UsroLoad">data/UserAssociations.csv</InboundInterfaceFile>
<Script>com.onenetwork.platform.env.servicelocator.Services.get(com.onenetwork.platform.data.sql.SqlService.class).executeQuery("update enterprise set description = 'Test Update Through Script' where ent_name = 'PTAModuleSampleEnterprise' and vc_id = " + context.getValueChainId());</Script>
 
<InboundInterfaceFile customModelName="Standard ZBKS.Book" inboundInterface="ZBKS.BookLoad" inboundInterfaceVersion="1.0">data/BookLoad.csv</InboundInterfaceFile>
 
<ModelFile>data/IxmEngineConfig.xml</ModelFile>
</LoadData>
  1. The first file loaded is the ValueChain. ValueChain is the top-level entity under which all other Models reside. ValueChain is included in the natural key of all other models to facilitate multi-tenancy within a single database.

  2. StandardProcessTemplate: Please refer to the "Working with the Standard Process Template (SPT)" section. Default value is "Standard Process Template.spt". Don't change the default value unless and until you are renaming your "Standard Process Template.spt" to something else in your dataset.

    In a case where you want to use an SPT which contains one value chain id but you want to load it directly under another value chain, you can provide it as:

    1

    <StandardProcessType vcId="8001">Standard Process Template.spt</StandardProcessType>

    This will apply the given VC id to that SPT when loading.

    In case you have multiple datasets in your instance and you want to reuse the SPT across datasets then instead of providing <StandardProcessTemplate> element, you can provide

    1

    <ProcessOwnerValueChainId>9123</ProcessOwnerValueChainId>

    where 9123 is the parent's dataset ValueChainId.

  3. UiMetaModel: The UI Metamodel is an XML-based configuration file used to construct the menus on the screen. Please refer to the "UI Metamodel" section.

    In case you have multiple datasets in your instance and you want to reuse the UIMM across datasets then instead of providing <UiMetaModel> element, you can provide

    1

    <UiMetaModelOwnerValueChainId>9123</UiMetaModelOwnerValueChainId>

    where 9123 is the parent's dataset ValueChainId.

  4. LoadModuleData: You can load module-specific data using this element. Please refer to the "Module-Specific Data" section.After LoadModuleData, you can define ModelFile (XML), InboundInterfaceFile (CSV) and groovy-based Scripts in any order and any number of times to load data in that particular sequence.

  5. InboundInterfaceFile supports the following attributes to load the CSV data:

InboundInterfaceFile supports the following attributes to load the CSV data:

  1. customModelName - Optional attribute to provide custom Model definition name for a model. If provided, this will be used otherwise will be derived from the Inbound Interface.

  2. compress - Optional. If true, file will be compressed and then processed. Should only be specified for MassiveDataLoader.

  3. actionName - Optional. Action name to process the inbound file. If provided, this will be used otherwise will be derived from the Inbound Interface.

  4. inboundInterface - Inbound interface (defined in MPT, SPT or EPT) to be used to process the file.

  5. inboundInterfaceVersion - Optional. Inbound interface version to be used to process the file.

  6. enterpriseContext - Optional. By default application use the ValueChain Admin context to process the file. If you want to use Enterprise Admin context, like to process the EPT specific interfaces then provide the valid enterprise name for this attribute.

  7. skipTextMacros - There is a feature where modules can register preprocessing text macros to do replacements on your files prior to loading (e.g. replacing current date). For very large files which don't leverage this feature, you might want to set skipTextMacros="true" to get a slight performance boost by skipping this step.