As shown in
Table 14, BPM Events uses a syntax that is similar to Java. Note that when invoking a Java object, BPM Events uses the full class name, prefixed by the adapter name, "java". The Java adapter is used for qualifying any Java call, and is an abstraction of the Java Virtual Machine (No actual adapter requires writing).
In the following example, a Java object of type Vector is created inside the function "gen()". The scope of the value identifier "vec" is the function only, but this function could return the new Vector object, which could be used inside rules that invoke this function.
Instantiation is possible in any bloc statement, that is, in functions, rule actions, or initialize{} and finalize{} sections. In the example below, new is a constructor operator that creates or instantiates the Java object called Vector().