you could start with just putting everything in an UnpersistableVariable
then you don't need that mapping stuff and all objects will just be stored in memory as in a hashmap.
the mappings are a more dynamic and configurable way of determining how the variable values get converted and stored.
in case you want to get started with the mappings (which would be good) you could start by having a look at the jBPM 3 code.
you could also detect strings there automatically and use StringInstance variables for those instead of the unpersistable instance
Charles, if the intent is to store dom elements as strings, it is probably better to introduce a new ElementInstance class to allow elements to be stored directly. Another option is to introduce an ElementToStringConverter that handles the conversion to string transparently.