Search

 

Edition: Futurama Website/Futurama Export/Futurama Webservice

Module: Futurama Editor

User: Developer

Prerequisites

- Familiar with Futurama Editor and the Futurama platform in general

 

Description

On a regular basis a new version of Futurama is released, which can be downloaded from the Futurama website www.futurama.eu. Futurama documents which are created in an older version of Futurama will have to be converted to the new version before they can be edited. This conversion can be done manually or automatically in batch which means that all Futurama documents are converted at once. After installation of a new Futurama version your application will still work, even if you didn’t convert the Futurama definition documents to this new version. Futurama then runtime converts these documents. However, this will decrease the performance as these extra actions have to be performed. So it is recommendable to convert all your Futurama documents.

Sequence of converting

Until Futurama version 4.2.0.0 conversion of Futurama documents is done in a specific sequence. Documents can only be converted after all it's subdocuments are converted first. If one tries to convert a Futurama document of which 1 or more subdocuments are still in an older version, an error message will be shown. In Futurama version 4.2.0.0 and later it is no longer necessary to explicitly convert Futurama Documents, albeit recommended:

  • Documents can be opened in a newer version of Futurama without the need to convert them. This makes it possible to view Futurama documents made in older versions and even edit them without the need for conversion. Of course if you save the Futurama document it will be converted to the new version (after showing a message).
  • Futurama temporarily converts subdocuments automatically when necessary. When opening a document in a newer version of the Futurama it is therefore no longer required that subdocuments are converted explicitly first. Note that this automatic conversion 'behind the screen' is not permanent.
  • If you forget to convert the documents, your website will still work! However, because of issues of performance we recommand to convert all Futurama documents when moving to a new version of Futurama.

Manual converting

A Futurama document can be converted manually to a new version. To do this first open the Futurama Editor of the new version and then open the Futurama document that needs to be converted. A message will popup that the file is created in an older version. When saving the document a message will appear asking if you want to convert the document to the new version. By confirming this, the document is automatically converted.

Batch converting

It is also possible to convert multiple Futurama documents in one action. You can do that by passing a file containing a list of files -or directories- to futurama, by using a batch script.

  • When the file contains a list of directories, futurama searches for documents in subdirectories of this directories.
  • When the file contains a list of XML files, each of these files will be converted

A failed conversion will not stop de batch process, but is simply reported as failed conversion.

Example of the contents of such a batch script:
"C:\Program Files\Futurama\ActuIT.Futurama.Editor.exe" -u -l"C:\Futurama\file-containing-list-of files-or-directories.txt" >>C:\log.txt

By placing the parameter '-u' behind the executable, Futurama is launched in update mode. In the file (C:\Futurama\files.txt), the list of documents or directories containing documents to be converted is specified (see below for a more detailed description).
Finally >> causes the results of the update to be logged to a textfile C:\log.txt.

Contents of files.txt

In the file (files.txt) a list of Futurama documents or folders where Futurama documents are located has to be defined.

Example of the contents of files.txt

Files.txt containing a directory

C:\inetpub\wwwroot\Futurama

When executing the command from the batch file using a files.txt containing a directory, the result will be that all Futurama documents that exist in subdirectories directly below the folder C:\inetpub\wwwroot\Futurama will be converted. If a document has subdocuments, these will be converted before the document itself. Documents which are in the directory itself or documents that are in subdirectories of the subdirectories and lower will not be converted. An additional path to 'reach' these documents will have to be added to files.txt.

Only Futurama documents will be converted to the new Futurama version. Other kinds of xml-documents may be found during the search, but in the logfile a message will appear that these files were not converted. If files.txt contains invalid paths this will also be logged in the logfile.

Therefore it is recommended to use a logfile. In this way it can be checked whether all Futurama documents were converted and if not, the reason why.

Files.txt containing Files

C:\inetpub\wwwroot\Futurama\document1.xml

C:\inetpub\wwwroot\Futurama\document2.xml

C:\inetpub\wwwroot\Futurama\document3.xml

When executing the command from the batch file using a files.txt as above, the result will be that all Futurama documents listed in files.txt will be converted. If a document has subdocuments, these will be converted before the document itself.

NOTE: in the file files.txt every line may contain only one path.

Feedback

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

Updated: 2016-01-19