index modules license coding style to do |
Export toolThe export tool allows you to export data from a Uni-d generated application to text (ascii). Alternatively, the data which is exported can be processed using a script which then handles it further. This option is typically used to synchronize with another application (one-way synchronization, use the Import tool for the other direction). General configurationThe export program expects the name of the configuration .ini file as parameter. If this parameter is not given, a file called "export.ini" in the current directory is used. The export can be configured using a .ini file with the following base format : [general] scanPeriod=30
What to exportThe .ini file also defines what to export. This is done by specifying the objects which need to be selected. For each object selected, you can have selections of secondary (related) objects which are also exported. After the export, the tool can automatically update one of the fields to mark that the export was succesful. For example [object,1] This excerpt shows all the options. The first (and only) primary selector is indicated in the object,1 section. The secondary selections for these are in the object,1,X sections, with "X" a number from one upwards. For each section, you can specify the JNDI name and classname for the bean to use. The classname should be without trailing "EJB" or "EJBHome". You can also specify the finder to be used, and the type and value for each paramater. For secondary objects, fields from the primary object can be used to as parameter value using the "${FieldName}" syntax. For each object, you can also optionally spacify fields which need to be set when the import was successful. You can also choose whether the export is to a file, or whether a user defined FScript script should handle the export (in which case the file is not generated). _Key Set Details_
Using scripts in exportLike in Import you can also use scripts to export the data, possibly including the data directly into a different database. The program accepts FScript (see http://fscript.sourceforge.net/index.html) scripts to build the data to be exported. The script should have the following structure (example with some debug info) : func primary(object prim) debug("primary called for "+prim) return TRUE endfunc The FScript extensions from the util module are available. The functions should return "TRUE" or "FALSE" depending on whether the export was successful or not. If the export was not successful, then the variables which need to be set are not modified. When you return "FALSE" for the primary object, then the secondary objects are not exported. When one of the secondary objects returned "FALSE", then the fields for the primary object are not set. If the primary and all the secondary objects have been successfully imported, then the "primary_done" function is called. This can be used for cleanup, or to mark that the export has finished.
$Id: Export.wiki 1849 2006-01-12 13:48:28Z triathlon98 $ |