Before you install the generic version of ATCG, install the Erewhon variant so that you can refer to the provided examples.
To install the Erewhon variant
From the JADE-Erewhon link at https://github.com/jadesoftwarenz, load the Erewhon example schemas into JADE and familiarize yourself with the applications.
Enable method tracking, by updating your JADE initialization file so that the value of the MethodTrackingEnabled parameter in the [JadeSecurity] section is set to true.
Load the AtcgGeneratorSchema (that is, the AtcgGeneratorSchema_Generic.scm and AtcgGeneratorSchema_Generic.ddb or AtcgGeneratorSchema_Generic.ddx files) as a subschema of ErewhonInvestmentsViewSchema, as follows.
Load the schema and forms definition files in the usual way, by specifying the schema and forms file names on the File Selection sheet of the Load Options dialog, and then clicking the Advanced button.
On the Advanced Load Options dialog:
Change the Subschema of value from RootSchema to ErewhonInvestmentsViewSchema.
In the text box portion of the Target Schema combo box, specify AtcgGeneratorSchema. (This schema is not displayed in the drop‑down list of the combo box.)
Click the OK button.
Load the AtcgTestCodeSchema (that is, the AtcgTestCodeSchema_Generic.scm and AtcgTestCodeSchema_Generic.ddb or AtcgGeneratorSchema_Generic.ddx files), by performing the actions specified in the previous step of this instruction, but specifying AtcgGeneratorSchema in step b.i and AtcgTestCodeSchema in step b.ii.
In AtcgTestCodeSchema, change the name of the XxxProfile class, a subclass of AtcgProfile, to EDProfile (that is, it is the class for the Erewhon Demonstration profile).
This EDProfile class will be the superclass for all of your profile test classes.
Modify the Application class atcgGetControlOptions and atcgRecordAppInit methods (in AtcgTestCodeSchema) with the new class name, by replacing instances of XxxProfile with EDProfile.
In the AtcgTestCodeSchemaApp class atcgGetControlOptions method, change the method so that the ErewhonInvestmentsViewSchema is tracked; for example:
.... // list of schemas to be tracked during recording targetSchemas.add("AtcgTestCodeSchema"); targetSchemas.add("ErewhonInvestmentsViewSchema"); ....
Modify the global GErewhonInvestmentsViewSchema class getAndValidateUser method in the ErewhonInvestmentsViewSchema so that all of the ATCG applications can run; for example:
if app.name <> AdminApp and app.name <> "AtcgControlApp" and app.name <> "AtcgReplayApp" and app.name <> "AtcgRecordApp" and .... return false; endif; .... if app.isWebShopApp or app.name = "AtcgControlApp" or app.name = "AtcgReplayApp" or app.name = "AtcgRecordApp" or .... then return true; endif;
Modify the GErewhonInvestmentsViewSchema class isUserValid method in the ErewhonInvestmentsViewSchema so that all of the ATCG applications can run; for example:
if app.isWebShopApp or app.name = "AtcgControlApp" or app.name = "AtcgReplayApp" or app.name = "AtcgRecordApp" or .... then isValid := true; endif;
Check that the AtcgControlApp application in AtcgTestCodeSchema runs; that is, the dialog like the example in the following image is displayed.
To get the AtcgRecordApp working, modify the startup method in the EDProfile class (a subclass of AtcgProfile in AtcgTestCodeSchema) to create the main form and log-on screen for the ErewhonShop application.
vars c : Client; mf : FormShopSaleItems; begin app.atcgLogMessageTC("==========="); app.atcgLogMessageTC("Starting profile"); app.atcgLogMessageTC("==========="); // create and show main form and log-on screen create mf; // This is just a quick example by hard-coding to the first client. c := Client.firstInstance; app.setClient(c); mf.show; app.atcgLogMessageTC(method.qualifiedName&" finished"); end;
Start the AtcgRecordApp application manually and then:
Check that the ErewhonShop application in the ErewhonInvestmentsViewSchema can be started.
Close the application.
AtcgRecordApp must be run as a standard (fat) client.
Load the provided BasicDemo.cls example profile class into AtcgTestCodeSchema.
Start the AtcgControlApp application.
Double‑click on Basic Demo.
Click on the Replay List button, which should replay a basic sequence of events in the ErewhonShop application.
If the setup is correct and the data matches the recorded profile, this recorded sequence should replay correctly.
Click the Start Recording button, to start the AtcgRecordApp application automatically. When the Please Wait form closes:
Perform a couple of actions within the application.
Once completed, click the Generate and Load button to terminate the AtcgRecordApp application and generate and load a new profile class.
Click the Replay Last button. The main form of your ErewhonShop application should be displayed and the actions that you performed then replayed.
Basic installation is now complete.
Further modifications may be required to automatically handle items such as modal forms. For details, see Chapter 4, "Design Guidelines and Directions".