Installing the Erewhon ATCG Variant

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

  1. From the JADE-Erewhon link at https://github.com/jadesoftwarenz, load the Erewhon example schemas into JADE and familiarize yourself with the applications.

  2. 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.

  3. 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.

    1. 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.

    2. On the Advanced Load Options dialog:

      1. Change the Subschema of value from RootSchema to ErewhonInvestmentsViewSchema.

      2. 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.)

      3. Click the OK button.

  4. 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.

  5. 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.

  6. Modify the Application class atcgGetControlOptions and atcgRecordAppInit methods (in AtcgTestCodeSchema) with the new class name, by replacing instances of XxxProfile with EDProfile.

  7. 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");
    ....
  8. 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;
  9. 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;
  10. Check that the AtcgControlApp application in AtcgTestCodeSchema runs; that is, the dialog like the example in the following image is displayed.

  11. 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;
  12. Start the AtcgRecordApp application manually and then:

    1. Check that the ErewhonShop application in the ErewhonInvestmentsViewSchema can be started.

    2. Close the application.

    AtcgRecordApp must be run as a standard (fat) client.

  13. Load the provided BasicDemo.cls example profile class into AtcgTestCodeSchema.

  14. Start the AtcgControlApp application.

    1. Double‑click on Basic Demo.

    2. 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.

  15. Click the Start Recording button, to start the AtcgRecordApp application automatically. When the Please Wait form closes:

    1. Perform a couple of actions within the application.

    2. Once completed, click the Generate and Load button to terminate the AtcgRecordApp application and generate and load a new profile class.

    3. 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".