Permissions
In the preceding paragraph the connection between Futurama Batch and the Futurama Vision Database is treated. In this connection the user is defined which connects with the Futurama Vision Database. In order to execute the special Futurama Server jobs, permissions for this user have to be defined. See below these permission dependable on the type of special Futurama Server job.
InitializeAccounts
For the InitializeAccounts task the database user should have the rights to read and write to the database tables, for instance by setting the users role to ‘db_datareader’ AND ‘db_datawriter’ in Microsoft SQL Server.
ZipDataItemFiles
For the ZipDataItemFiles task the database user only the rights to read the database tables are required, for instance by setting the users role to ‘db_datareader’ in Microsoft SQL Server.
Initialize accounts
Accounts can be initialized by using the Management Site. See the paragraph 'Create Accounts' how to create accounts using the Futurama Accounts part of the Management Site. For this process an alternative way is supported by executing a Futurama Server job. Mentioned below a sample job that can be used to define the Futurama Server job.
Sample job
Below you find a sample job that can be used to initialize accounts:
<!--?xml version="1.0" encoding="utf-8"?-->
<Job xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.ActuIT.nl/FuturamaJob.xsd" version="1.0" name="Initialize Accounts">
<NumberOfProcesses>1</NumberOfProcesses>
<RepeatUntilFinished>false</RepeatUntilFinished>
<Task name="InitializeAccounts">
<VisionTask>InitializeAccounts</VisionTask>
<File></File>
<ActionID>
<string>0</string>
</ActionID>
<OutputID>0</OutputID>
<CheckID>0</CheckID>
<CheckInterval>0</CheckInterval>
<Parameter>
<!-- mandatory parameter that indicates the AccountProductGroup for which to initialize accounts -->
<TaskParameter>
<Name>AccountProductGroup</Name>
<Value>1</Value>
</TaskParameter>
<!-- mandatory parameter that indicates the location to write the outputfile with passwords to -->
<TaskParameter>
<Name>OutputFile</Name>
<Value>drive:\filename.xml</Value>
</TaskParameter>
</Parameter>
</Task>
</Job>
Parameters
The next two parameters are relevant:
- AccountProductGroup: the value of the AccountProductGroup is the ID of the AccountProductGroup. To find this ID open the Futurama Vision Management Site, menu Management/Manage domain tables. Open the submenu AccountProductGroups. In this menu an overview of all the AccountProductGroups is given. Select the AccountProductGroup for which accounts has to be initialized by using a Futurama Server job. Find the ProductGroup for the AccountProductGroup (see the parameter 'ProductGroup'). Next step is to open the ProductGroup submenu and find the ProductGroup of the AccountProductGroup. This ProductGroup has an ID. This ID has to be the value of the parameter AccountProductGroup
- OutputFile: the path to the location where the XML-file with the passwords has to be saved
To run this job you can save it as a jobfile and run that from Futurama Server. Or you can send it to FuturamaServer via a WebService call (see paragraph 'Steps to use Futurama Server', step 4). Please note that you need to add the connect string to the Vision Database to the config file for FuturamaBatch.
Zip dataitem files (Futurama 17.11+)
When a number of files are stored in Futurama Vision DataStore they can be extracted and compressed in a Zip-file by using the ZipDataItemFiles task. It does not matter whether the Datastore items are encrypted or not, but they must contain a filename and a base64 string containing the binary data. For security purposes the Zip file can be encrypted using various methods. For more information about creating datasets and storing data, please visit the DataStore configuration documentation
Requirements
In order to perform this task, the following requirements must be met:
- The file data must be stored in a Vision DataStore dataset adhering to certain specifications (see below)
- If the dataitems are encrypted, then the encryption configuration must also be present in the Futurama Batch configuration file. For more info view encryption
- The Futurama Batch configuration file must contain the connectionstring that can be used to connect to the Vision Database. For more info view Connection string SQL Server database
- Futurama Server must be run using credentials that are allowed access to the database
- Futurama Server must be run using credentials that are allowed to write files to a possible destination location
- The user logged into Vision to execute the task must be a Forms-user, and be assigned to a productgroup that has access to the Dataset
DataStore setup
When the data for the files is generated, they should be stored in Vision DataStore in a specific manner. The Schema and SampleXML are listed below for the datasets datatype, and the dataset is allowed to be encrypted.
Datatype sample XML
This dataitem contains the file data, encoded as a base64 string, and should also contain the filename to be used for the file. This filename will be used when creating the Zipfile
<file xmlns="http://www.futurama.eu/datatypes" filename="{insert filename here}">{insert base64 encoded filedata here}</file>
XML Schema
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.futurama.eu/datatypes" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="File">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="filename" use="required">
</xs:attribute></xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:schema>
Sample job
Below you find a sample job that can be used to zip dataitems:
<!--?xml version="1.0" encoding="utf-8"?-->
<Job xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.ActuIT.nl/FuturamaJob.xsd" version="1.0" name="ZipDataItemFile">
<NumberOfProcesses>1</NumberOfProcesses>
<RepeatUntilFinished>false</RepeatUntilFinished>
<Task name="ZipDataItemFiles">
<VisionTask>ZipDataItemFiles</VisionTask>
<File></File>
<ActionID>
<string>0</string>
</ActionID>
<OutputID>0</OutputID>
<CheckID>0</CheckID>
<CheckInterval>0</CheckInterval>
<Parameter>
<!-- mandatory parameter that indicates the Name of the Dataset that contains the dataitems -->
<TaskParameter>
<Name>DataSetName</Name>
<Value>{insert dataset Name here}</Value>
</TaskParameter>
<!-- mandatory parameter that indicates the zipfile location -->
<TaskParameter>
<Name>OutputFile</Name>
<Value>{insert path to zipfile here}</Value>
</TaskParameter>
<!-- optional parameter that sets the encryption method -->
<TaskParameter>
<Name>Encryption</Name>
<Value>AES256</Value>
</TaskParameter>
<!-- optional parameter that chooses the password for the encrypted zipfile -->
<TaskParameter>
<Name>Password</Name>
<Value>abracadabra</Value>
</TaskParameter>
</Parameter>
</Task>
</Job>
Parameters
The following parameters are relevant:
- DataSetName: This is the name for the dataset containing the files to extract and compress.
- OutputFile: This should be the path to the output Zip-file. Any existing file will be overwritten.
- Encryption (optional): This should contain method of encryption to use. For possible values please look below.
- Password (optional): When encryption is used, this should contain the password to use for the Zip-file. Please make sure no characters are used that might conflict with the XML language (for more information, please visit Valid characters in XML)
Zipfile encryption
In order to encrypt the zipfile, it is possible to choose one of various encryption methods:
- None: This means that the zipfile will NOT be encrypted
- ZIP2.0: This is the least secure way of encryption. This method is supported within the Microsoft Windows operating system.
- AES128: This is a moderate method of encryption. For this method an archiving software tool must be used such as Winzip, Winrar or 7-zip.
- AES256: This is the most secure way of encryption. For this method an archiving software tool must be used such as Winzip, Winrar or 7-zip.
To run this job you can save it as a jobfile and run that from Futurama Server. Or you can send it to FuturamaServer via a WebService call (see paragraph 'Steps to use Futurama Server', step 4).
- Installation Futurama Server: Description how to install and configure Futurama Server
- Futurama Server - Management Site: Description how to run export processes using Futurama Server
Feedback
If you have any questions about this subject or if you want to provide us feedback please send us an e-mail.