public override Void execute(CommandContext commandContext) { ExecutionEntity execution = commandContext.ExecutionManager.findExecutionById(executionId); // fetch the variable instance but not the value (make sure the byte array is lazily fetched) VariableInstanceEntity varInstance = (VariableInstanceEntity)execution.getVariableInstanceLocal(varName); string byteArrayValueId = varInstance.ByteArrayValueId; assertNotNull("Byte array id is expected to be not null", byteArrayValueId); CachedDbEntity cachedByteArray = commandContext.DbEntityManager.DbEntityCache.getCachedEntity(typeof(ByteArrayEntity), byteArrayValueId); assertNull("Byte array is expected to be not fetched yet / lazily fetched.", cachedByteArray); monitor.sync(); // now trigger the fetching of the byte array object value = varInstance.getValue(); assertNull("Expecting the value to be null (deleted)", value); return(null); }