In NexJ CRM
version 8.2, .dump files were deprecated. Scheme dump
scripts replace .dump files. Scheme dump scripts are
more flexible than .dump files and increase developer
velocity.
Note: This is a developer task and must be performed
in NexJ Studio by a
person with access to the model.
As part of the upgrade
process, it is strongly recommended that you convert any existing project
.dump files to Scheme dump scripts. A converter is
provided in the package.zip file to assist with this
process.
Note: To convert .dump files to Scheme dump
scripts you require the package.zip file, which is
provided by your NexJ representative.
To convert .dump files to Scheme dump
scripts:
-
Extract the package.zip file to a temporary
folder.
-
Copy the dump_exclusions.txt file from the
/meta/libraries folder into the
/meta/libraries/dumps folder in your project
repository. If necessary, create the
/meta/libraries/dumps destination folder.
-
Copy the etc folder into your project root
directory. Confirm that the unittestdump.scm file
was copied into the /etc/scratchpads folder in
your project repository.
-
In your project repository, move the current
UnitTest.dump file from the
/meta/dumps/ folder to the
/meta/libraries/dumps folder.
-
Inspect the dump_exclusions.scm file that
was added to the project in the
/meta/libraries/dump folder. Each line in the
file represents an item or class to reject from the Scheme dump
script. Remove items that you want to keep in the extracted Scheme
dump script or add items to you want to remove.
Note: You may perform this step again later to fine-tune the
exported Scheme dump script.
The file contains three space-separated columns.
- class
- The class that the rule applies to. Rules do not apply to
subclasses.
- The column may contain simple wildcards, such as
*<class>
or
<class>*,
to apply a rule globally,
provided the selected classes do not already have rules defined
in the file. Add wildcard rules to the bottom of the file.
- condition
- A condition that is run against the matching class instances
in the dump file to determine whether they should be
excluded.
- cascades
- For all items matching the above condition, cascades are a
list of associations to remove with the instances.
-
Modify the first code line in
unittestdump.scm. Set the value of the
dump:project-name
variable to your project
name.
-
In NexJ Studio, open the
Minimal Console.
Note: You can open the console in any stable project. If you use
the current project, you may need to recreate using the
UnitTest.dump to have a stable server for
starting the Minimal Console.
-
Execute the unittestdump.scm file in the
/etc/scratchpads/ folder.
-
Start the extract by running the
(dump:CONVERT-DUMP-TO-SCRIPT)
command in the Minimal
Console.
A new file generates in the
/meta/libraries/dumps folder. The file name
format is
seed_<dump:project-name>_data.scm, where
dump:project-name
is the project name that you
provided in step
6.
The generated file contains a serialized copy of all the extracted
items from the
UnitTest.dump file
-
Edit the SysUpgrade.meta file, and in event
getSeedData
, change (seed-data)
to
the renamed function from step 9,
which is named in the following
format(seed_<dump:project-name>_data
.
Recreate commands will now use the new Scheme dump
script.
-
Move the UnitTest.dump and
SampleData.dump files from the project
meta folder into the
/etc/dumps/ folder. If necessary, create the
/etc/dumps/ destination folder.
-
Test your changes by performing a recreate on the current
project. The Dump URL field should be left
empty.
When the recreate is successful, the dump upgrade is
complete.
-
Execute all unit tests and ensure a full passage rate.
You have converted .dump files to Scheme dump
scripts.