Generating artifacts from the model

To accelerate development of Java actions, a facility is provided to generate some of the required artifacts from the application model in IBM® Rational Software Architect (RSA). The artifacts that can be generated are Event Classes (which are required by Actions), and partially-completed Action Classes. These are generated in a similar manner to the preexisting Config, FSM and MQ scripts.

To generate the Java artifacts, the following steps are taken;

  1. Add the desired package name for the Event classes by editing the entry in the "File Properties" for the application, and select the checkboxes to generate the Events, Action stubs, or both.
  2. Right-click on the model in RSA
  3. Select FTM>Generate Java Code
  4. The generated files can be found in a folder called "Java Extracts" within the project with model name and extraction time. Any actions which have the "Action Language" property set to "Java" will be generated with the folder path and file name supplied.
  5. The folders created can be copied into a Java project for further development as per the previous section.
Note: To avail of built-in null-checking, any context data in an Event that is used to hold an ID should be specified as "FTMDataTypes::ID" by altering the "TYPE" parameter.