Final additions

Ultimately, a few minor adjustments are made at project level:

  1. Work should be carried out stateless

  2. The names of enums and the corresponding method names should be more descriptive

  3. An extra Trace code AFTER each rule execution should be generated

Adjustments

These settings are only defined once as a rule and are valid for all deci­sion ta­bles in the project.

The confi­guration file for the project resources/lfet/lfet.project.yaml gets new entries at 4.1) and 7)
lfet:

  ide.default: java

  ide.java:
    enabled: true              # 1)

    package: lfet.demo         # 2)

    src:                       # 3)
      encoding: utf-8
      path: ${project.root}/../../java/${package}
      create.missing.folders: true

    interface:                 # 4)
      enabled: true
      name: ${dt.name}_iFace
      modifier: '""'
      method.modifier: '""'
      annotations:
        - javax.annotation.processing.Generated("LF-ET")
      language: de
      stateless: true          # 4.1)
      trace.after.rule: true

    interface.rules.class:     # 5)
      name: ${dt.name}_rulesEngine
      modifier: public
      method.modifier: public
      annotations:
        - javax.annotation.processing.Generated("LF-ET")

    ini.path: '""'             # 6)

    interface.enum:            # 7)
      default.values:
        method.name: enum.name
        enum.value.name:
          - symbol
          - uppercase
          - prefix$

New entries in detail:

4.1)

stateless: true

With the true value the interface is gene­rated stateless and generic and this type then also serves as an additional parameter in all methods of the rules module.

trace.after.rule: true

With the true value an extra Trace code is added AFTER the last action in each rule.

7)

default.values

These Enum definitions serve as default settings for ALL enum generations in the project

method.name: enum.name

The method names should no longer be called isEnum or doEnum but should use the names of the enum, e.g. isPurchaseOrderValue

enum.value.name

− symbol
− uppercase
− prefix$

Enum values as such should no longer simply be numbered consecutively ($001, $002,…​) but should also be formed more meaningfully from the symbol of the respective value in capital letters preceded by a dollar sign, e.g. $LESS2000.