Hello,
I have a class with a “virtual” read-only variable, i.e. there is only a getter for the variable; the getter computes the result based on other instance variables, e.g.
List<String> names;
public int getNamesCount() { return names.size(); }
I put an instance of this class as a process variable. When executing the process, I get an exception Cannot deserialize object in variable...
. Only if I have a “real” variable with a getter and setter does the process run as expected.
I user the SPIN plugin with the JSON variant.
Is it possible to serialize and successfully deserialize an instance of a class with a read-only virtual variable?
Thanks for any hints.