Reviewing generated Java code
A developer asks: How do Process Commander rules create Java code?
Does Java generation (first use assembly) use a standard layout or template, consistent with industry-standard approaches?.
If such a template is employed in the process, can we impose our own form of template between the rules and the generated Java?
Our goal is that the resulting Java code comply with our organization's l standards.
As you increase your use of and familiarity with rule forms, you will have less and less need or desire to examine the generated Java in most cases.
But in the normal course of development, you either use the rule forms to create rules -- or you use your own Java to create rules.. When you use the rule forms, there is rarely a need for you to regard the generated Java. Most importantly, you never need to maintain by hand the code that is generated through rule forms.
If you write your own Java code into rules — for example, edit input rules (Rule-Edit-Input rule type) or function rules (Rule-Utility-Function rule type) — you can write it in your own preferred formats, and you can read and recognize it in those formats.
The Java code that Process Commander generates from rules is produced by internal Java classes in the Process Commander engine. There is no template file you can access and adapt, for two reasons:
- The generated Java is very situation-specific to its environment, precluding use of a general-purpose standard template.
- The parsing and use of a template file would produce considerably more garbage for Java garbage collection.
Within Java activity steps, edit input rules, and function rules, you can use your own Java standards and styles.