Search

 

Concerns: Vision/Vision Management Site/Vision Database

User: User Management Site

Prerequisites

- Installation Futurama Vision Management Site

- Installation Futurama Vision Database

Introduction

Description how to import data into Futurama Vision using Futurama Vision Batch.

 

Description

The Futurama Vision Batch console application can be used to import individual XML-files into Futurama Vision. In this chapter is described how to install Futurama Vision Batch and how to use this console application to import the XML-files.

Download

Visit the Futurama website www.futurama.eu to download the Futurama Vision Batch code:

  • Go to www.futurama.eu
  • Go to the download section of the Support menu
  • Log in with user name and password
  • Click the most recent Futurama release
  • Extract the zip-file

Installation

Release folder

Use the release code from the folder Vision_Batch

Installation initial version

If this is the first time Futurama Vision Batch is installed follow the steps in this paragraph. If Futurama Vision Batch is already installed consult the next paragraph 'Upgrading existing version'. To install Futurama Vision Batch  follow the next steps:

  • Create a new folder in which the code from the release folder can be installed
  • Copy the code from the release folder to this new folder
  • Copy the license file to this new folder
  • Rename the default.config to Batch.exe.config (see the description in chapter 'Configuration' for the way the config can be configured)

Upgrading existing version

If you already installed Futurama Vision Batch, and want to upgrade the existing version follow the steps in this paragraph. If this is the first installation of Futurama Vision Batch consult the preceding paragraph 'Installation initial version'. Follow the next steps to upgrade an existing version of Futurama Vision Batch:

  • Open the folder at the Windows webserver where you have installed the Futurama Vision Batch code
  • Copy the code from the release folder to this new folder

Configuration

Description

There are a couple of configuration settings to be done in the Batch.exe.config. These are the settings mentioned below:

  • configuration regarding the logging of errors and warnings
  • configuration of encryption and decryption keys to be used for the encryption of xml-data within Vision
  • configuration of the connection between Futurama Vision Batch and the Vision Database

See below for this configuration.

Configuration File

In the release folder we provided a default.config. In the Installation steps mentioned above this default.config is renamed to Batch.exe.config. In this configuration section the sections within this configuration file are explained.

configSections and visionSettings

Within the section 'configSections' you find a sectionGroup named visionSettings. This sectionGroup visionSettings is also a separate section in the config under the configSections section. Each section name within the sectionGroup visionSettings is also contained within the visionSettings section. Below a brief explanation of these visionSettings sections.

Configuration Log

It is possible to log errors, warnings, information messages and developers messages with Futurama. In the chapter 'Configuration Log' you can find information how to configure the configuration file to log this information.

Connection with Vision

Within this section 'connectionStrings' the connection with the Futurama Vision Database is defined. In this section the default values of the next parameters have to be replaced by the values that are chosen when configuring the Futurama Vision Database:

  • server: the name of the database server (including the instance name) where the Futurama Vision Database runs
  • dbname: the name of the Futurama Vision Database
  • user: the user of the Futurama Vision Database
  • pw: the password of the SQL Server logins that is mapped to the user in the Futurama Vision Database

Activate Futurama Vision Batch

The batch application can be activated by using the Windows command prompt, or by starting a .bat file. To active the batch, the command prompt should be written in the following way:

Batch.exe command -argument1=value1 -argument2=value2

Batch.exe is the executable to start Futurama Vision Batch. Here, command is the specific task you wish to perform, where the arguments are the necessary values required to perform the task. In case these arguments contain special characters (such as a space, or a & sign), it's best to enclose the argument using quotation marks. For example: -datasetid="A new dataset".

The following commands are present:

  • help
    Using this command shows a help screen. Using this command in a Batch.exe command window will grant you more information on using Batch. So, to start the help section use the following command: Batch.exe help.
  • importxmlfiles
    By using this command you can import a selection of xml files to the Vision database.

Importing policy XML files

By using the command importxmlfiles you can use the application to import a collection of XML files to a dataset in Vision, without having to use the management site. The following arguments apply to this command (for more information consult the help of Futurama Vision Batch: Batch.exe help):

  • -path
    This argument specifies the directory of the xml files you wish to import.
  • -datasetid
    The name of the dataset. Note! If there are already rows in this dataset, these will be removed.
  • -personid
    (optional) An XPath selector that specifies the location of the person identification in the XML structure.
  • -policyid
    (optional) An XPath selector that specifies the location of the policy identification in the XML structure. In case no values are specified, the XML filename shall be used.
  • -namespace
    (optional) The XML namespace for the specified xpaths. 
  • -validate
    (optional) Only applicable in the situation of the Dutch Nationaal Pensioenregister. Valid datatypes are:
    NPRv1: This is the first standard format of the 'Nationaal Pensioenregister'.
    NPRv2: This is the second standard format of the 'Nationaal Pensioenregister'.
    NPRv2_1: This is the third standard format of the 'Nationaal Pensioenregister'.
    NPRv3_0: This is the latest standard format of the 'National Pensioenregister'.

    Using Futurama Vision Batch for the Dutch Nationaal Pensioenregister implies that the arguments -personid, -policyid and -namespace can be omitted. In case these parameters are filled in, these will be overwritten.
  • -enckey1loc
    (optional) In order to handle encryption, a password needs to be provided in the in the appSettings section of the configuration file Batch.exe.config. Batch will then encrypt the data for you. Also when the data is pre encrypted you need to provide the password.
    Note that vision encryption needs to be configured first, see Futurama Vision – Data on how to do that. The key name must be provided in the -enckey1loc.
    For example, place the following section in the Batch.exe.config, and use -enckey1loc=key1 parameter to encrypt the policy xml-files:

	
  • -encNode
    (Optional) In case the XML is not pre-encrypted, but has to be encrypted during import, you have to specify which node in the XML has to be encrypted. The name of the node is to be submitted as a parameter. Note that you only need to specify the name of the node, and not the XPath to the node. In case the XML is already pre-encrypted, including this argument will raise an error.

Example

Example 1

To import xml-files that are located in the folder c:\files and encrypt these files using the key password_1 (defined in the appSettings section of Batch.exe.config) use the next batch command:

Batch.exe importxmlfiles -path=c:\files -datasetid="dataset members" -enckey1loc=password_1

Example 2

To import xml-files that are located in the folder c:\files without encrypting, and with a PolicyID located in the XML-files using the XPath //Policy use the next batch command:

Batch.exe importxmlfiles -path=c:\files -datasetid="dataset members" -policyid="//Policy"

More information

More information on creating application configuration files: http://msdn.microsoft.com/en-us/library/1xtk877y.aspx

More information on Batch files: http://en.wikipedia.org/wiki/Batch_file

More information on connectionstrings: http://msdn.microsoft.com/en-us/library/cc716756.aspx

Related Topics

- Importing data into Futurama Vision: general description how to import data into Futurama Vision

- Futurama Vision – Data: Information on Vision data, and the encryption of it

- Importing from a zip-file: description how to import data into Futurama Vision by reading a zip-file

- Importing by webservice: description how to import data into Futurama Vision by using a webservice

Feedback

If you have any questions about this subject or if you want to provide us feedback please send us an e-mail.

Updated: 2014-02-21