Java objects as Process Instance Variables
To use a Java component as a process instance variable, the Java class of the
component must be Serializable (it must implement interface
java.io.Serializable).
Important:
When the Engine stores a Java component as a process instance variable, it
serializes the whole graph of objects referenced by that variable. The bigger the
object graph, the more overhead it generates at runtime.
Versioning Java objects
If your process uses Java components as process instance variables you must be
aware of Java class compatibility.
When deploying a new revision of a BPM project, you must ensure that any changes
you made to those Java classes do not break compatibility with the previous version
of the class.
Important:
If a new revision of a project contains a Java class with an
incompatible change, the Process Execution Engine cannot de-serialize process
instances holding objects based on older versions of the class.
If you are making incompatible changes to a Java class used as process instance
variable you must ensure the following:
- The Java library containing the class is cataloged as
versionable. See Versionable Java Libraries for details.
- At project deployment time you force a new version of your BPM
project (instead of a revision). When forcing a new project version, the
Engine keeps running the old process instances with the old version of the Java
class, and new process instances start using the new version of the Java class.
Refer to Versioning
of Serializable Objects of the Java Serialization Specification for details
about what changes make a Java class incompatible.