Previous Topic: Verify CompletionNext Topic: Results of Generating Remote Files


Code Generation Procedure

This procedure explains one method for selecting components for source code generation. The important concept is the expansion to the next level. During the selection process, you can enable the generation options (Trace support, Code, Screen, Install, or Apply to All Subordinates) in these ways:

You may find it useful to enable the desired code generation options as you go. If you change the generation options for an item and add them again, the last option chosen is the one used. There exists a maximum number of objects (maximum cardinality) that can be displayed in the list.

Note: For more information on generation options and cardinality issues, see Select Generation Options.

Any object added after this limit is reached is not generated. If you have more objects than can be displayed, you may have to generate in two sessions.

Follow these steps:

  1. Start the Construction Client.
  2. Open a model by selecting Model.
  3. Select Actions, then Open in the Construction Model Selection window.
  4. Highlight a model from the list and select Open.
  5. Select Code, then Generate and select a generation type.

    This opens the Application Generation window which will be empty initially. After making a selection, this window contains the selected objects.

  6. Select Edit, then Select New Objects.

    You can select one or more objects at a time. You automatically flow to the next object type when you select more than one.

  7. Select RI Triggers from the Generation Object Type List and then select List.

    This action displays the Generation Object Occurrence List which contains the RI Triggers.

  8. Select the RI Triggers and select Add, then select Continue.

    This returns you to the Generation Object Type List for further selections. The order of expansion from the Business system down is Business System, then Load Module, then Procedure Step, then Action Block.

  9. Select Business System and then select List.
  10. Select a business system from the list and select Expand.

    This displays the Generation Expanded Object Occurrence List from which you add and expand other objects.

    If multiple dialects (French, German, and so on) are used by windows in procedure steps packaged in any Window Load Module, an entry for each dialect is displayed.

    If you want to generate all components in a business system automatically rather than manually, mark the Apply to All Subordinates generation option.

  11. Select one or more load modules and select Add. Select a load module and select Expand.

    This adds the load modules to the list of objects for generation and expands to the next level of objects for the selected load module.

    If you want to add load modules containing non-default dialects, you may select from the list.

    If you want to generate all components in a load module automatically rather than manually, mark the Apply to All Subordinates generation option.

    You can use Select All if you want to select all objects in the display.

  12. Select one or more procedure steps and select Add. Select a procedure step and select Expand.

    This adds the procedure steps to the list of objects for generation and expands to the next level of objects for the selected procedure step.

    If you want to generate all components in a procedure step automatically rather than manually, mark the Apply to All Subordinates generation option.

  13. Select one or more action blocks and select Add.

    This adds the action blocks to the list of objects for generation. There is no expansion beyond this level.

  14. Select Continue until you return to the list of load modules. Select the next load module if you are generating more than one in this business system, and did not select the Apply to All Subordinates generation option. Repeat steps 10 through 14 to add that load module and all of its desired subordinate objects to the list.
  15. Select Continue until you return to the Application Generation window.
  16. Select the appropriate generation flags for all desired components and then select Generate, then Flagged.

    You must select an object before you can set the flags for it. Choose Edit, then Select All to select all objects in this window or select each object individually.

You can use the steps in this procedure to generate the entire application or to perform selective regeneration on changed components. When generating the entire model, it is better to use Model from the Generate menu. This option only generates applications of the type you chose when you entered the generation dialog. If you choose Generate, then Model for a Cooperative application, the Construction Client generates all Cooperative applications in the model. It does not generate online, window, or batch applications in the model.