return new ByteArray(bytes);
}
public Object revert(Object o) {
ByteArray byteArray = (ByteArray) o;
try {
ByteArrayInputStream bais = new ByteArrayInputStream(byteArray.getBytes());
ObjectInputStream ois = new ObjectInputStream(bais);
return ois.readObject();
} catch (Exception e) {
throw new JbpmException("couldn't deserialize object", e);
}