Generating Java code for the stage by using the wizard

You can use the wizard to generate Java™ code based on the column definitions of the links defined on the stage.

Procedure

  1. Double-click the ILOG® JRules connector.
  2. Click Configure.
  3. On the Wizard action and log file settings page, select the Generate Java code value in the Wizard action field.
  4. On the Java code settings page, in the Source code directory path field, specify the fully-qualified directory path on the engine host to which to write the generated .java files.
  5. In the Output format field, specify the format of the Java type for which to generate the code.
  6. In the Member variable prefix field, specify the prefix to use for the generated private member variable names.
  7. Select the Replace existing files check box to specify whether to overwrite the .java files that have the same name and location.
  8. Select the Exclude individual methods check box to specify whether to allow manual exclusion of individual methods from the list of reported methods so that code is not generated for those methods.
  9. In the Source code mapping for the Java types page, inspect the Java methods for which the code will be generated. If, in the previous step the Exclude individual methods option was selected, select the methods for which you do not want the code to be generated. Click Next.
  10. In the Generate Java code preview page, review the actions that the wizard will perform, then click Finish.

Results

The files are written to the subdirectories of the specified source code directory determined by the package specifications in the Java type names. If the package is not specified for some of the types, the .java source code file for that type is generated in the specified source code directory. For example if the source code directory is specified as /projects/javaxom and the Java type name is com.example.import.Test, then Test.java file is created in the /projects/javaxom/com/example/import directory. If the directory exists, the wizard reuses it. If a problem is encountered during the creation of the directory or while writing the .java file to the directory, an error message is displayed.