// loop over all variable instances in the container
Iterator varInstancesIter = variableInstances.entrySet().iterator();
while (varInstancesIter.hasNext()) {
Map.Entry entry = (Map.Entry) varInstancesIter.next();
String name = (String) entry.getKey();
VariableInstance variableInstance = (VariableInstance) entry.getValue();
// if the variable is of the unpersistable type... booom!
if (variableInstance instanceof UnpersistableInstance) {
Object value = variableInstance.getValue();
if (value!=null) {
throw new JbpmException("variable '"+name+"' in '"+variableContainer+"' contains '"+value+"': type '"+value.getClass().getName()+"' is unpersistable according to the jbpm.varmapping.xml configuration");
} else {
throw new JbpmException("variable '"+name+"' in '"+variableContainer+"' was created with a non persistable value");
}