subObject.setName("sub");
mainObject.setSubObject(subObject);
Cache<Serializable, Object> cache = cm.getCache("jbpm-configured-cache");
try {
boolean notTxOwner = txm.begin();
Serializable s = generateId(mainObject);
mainObject.setId(Long.valueOf(s.toString()));
cache.put(s, mainObject);
txm.rollback(notTxOwner);
} catch ( Exception e ) {