protected ByteArrayEntity saveConfiguration(ByteArrayManager byteArrayManager, T jobConfiguration) { ByteArrayEntity configurationEntity = new ByteArrayEntity(); configurationEntity.setBytes(writeConfiguration(jobConfiguration)); byteArrayManager.insert(configurationEntity); return configurationEntity; }
protected ByteArrayEntity saveConfiguration(ByteArrayManager byteArrayManager, T jobConfiguration) { ByteArrayEntity configurationEntity = new ByteArrayEntity(); configurationEntity.setBytes(writeConfiguration(jobConfiguration)); byteArrayManager.insert(configurationEntity); return configurationEntity; }
public void setExceptionStacktrace(String exception) { byte[] exceptionBytes = toByteArray(exception); ByteArrayEntity byteArray = getExceptionByteArray(); if(byteArray == null) { byteArray = createJobExceptionByteArray(exceptionBytes, ResourceTypes.RUNTIME); exceptionByteArrayId = byteArray.getId(); exceptionByteArray = byteArray; } else { byteArray.setBytes(exceptionBytes); } }
public void setExceptionStacktrace(String exception) { byte[] exceptionBytes = toByteArray(exception); ByteArrayEntity byteArray = getExceptionByteArray(); if(byteArray == null) { byteArray = createJobExceptionByteArray(exceptionBytes, ResourceTypes.RUNTIME); exceptionByteArrayId = byteArray.getId(); exceptionByteArray = byteArray; } else { byteArray.setBytes(exceptionBytes); } }
protected void setErrorDetails(String exception) { EnsureUtil.ensureNotNull("exception", exception); byte[] exceptionBytes = toByteArray(exception); ByteArrayEntity byteArray = getErrorByteArray(); if(byteArray == null) { byteArray = createExceptionByteArray(EXCEPTION_NAME,exceptionBytes, ResourceTypes.RUNTIME); errorDetailsByteArrayId = byteArray.getId(); errorDetailsByteArray = byteArray; } else { byteArray.setBytes(exceptionBytes); } }
protected void setErrorDetails(String exception) { EnsureUtil.ensureNotNull("exception", exception); byte[] exceptionBytes = toByteArray(exception); ByteArrayEntity byteArray = getErrorByteArray(); if(byteArray == null) { byteArray = createExceptionByteArray(EXCEPTION_NAME,exceptionBytes, ResourceTypes.RUNTIME); errorDetailsByteArrayId = byteArray.getId(); errorDetailsByteArray = byteArray; } else { byteArray.setBytes(exceptionBytes); } }
public void setByteArrayValue(byte[] bytes, boolean isTransient) { if (bytes != null) { // note: there can be cases where byteArrayId is not null // but the corresponding byte array entity has been removed in parallel; // thus we also need to check if the actual byte array entity still exists if (this.byteArrayId != null && getByteArrayEntity() != null) { byteArrayValue.setBytes(bytes); } else { deleteByteArrayValue(); byteArrayValue = new ByteArrayEntity(nameProvider.getName(), bytes, type, rootProcessInstanceId, removalTime); // avoid insert of byte array value for a transient variable if (!isTransient) { Context. getCommandContext() .getByteArrayManager() .insertByteArray(byteArrayValue); byteArrayId = byteArrayValue.getId(); } } } else { deleteByteArrayValue(); } }
public void setByteArrayValue(byte[] bytes, boolean isTransient) { if (bytes != null) { // note: there can be cases where byteArrayId is not null // but the corresponding byte array entity has been removed in parallel; // thus we also need to check if the actual byte array entity still exists if (this.byteArrayId != null && getByteArrayEntity() != null) { byteArrayValue.setBytes(bytes); } else { deleteByteArrayValue(); byteArrayValue = new ByteArrayEntity(nameProvider.getName(), bytes, type, rootProcessInstanceId, removalTime); // avoid insert of byte array value for a transient variable if (!isTransient) { Context. getCommandContext() .getByteArrayManager() .insertByteArray(byteArrayValue); byteArrayId = byteArrayValue.getId(); } } } else { deleteByteArrayValue(); } }
protected ByteArrayEntity saveConfiguration(ByteArrayManager byteArrayManager, T jobConfiguration) { ByteArrayEntity configurationEntity = new ByteArrayEntity(); configurationEntity.setBytes(writeConfiguration(jobConfiguration)); byteArrayManager.insert(configurationEntity); return configurationEntity; }
public void setExceptionStacktrace(String exception) { byte[] exceptionBytes = toByteArray(exception); ByteArrayEntity byteArray = getExceptionByteArray(); if(byteArray == null) { byteArray = createJobExceptionByteArray(exceptionBytes, ResourceTypes.RUNTIME); exceptionByteArrayId = byteArray.getId(); exceptionByteArray = byteArray; } else { byteArray.setBytes(exceptionBytes); } }
public ByteArrayEntity saveConfiguration(CustomBatchConfiguration jobConfiguration) { final ByteArrayManager byteArrayManager = Context.getCommandContext().getByteArrayManager(); final ByteArrayEntity configurationEntity = new ByteArrayEntity(); configurationEntity.setBytes(writeConfiguration(jobConfiguration)); byteArrayManager.insert(configurationEntity); return configurationEntity; }
protected void setErrorDetails(String exception) { EnsureUtil.ensureNotNull("exception", exception); byte[] exceptionBytes = toByteArray(exception); ByteArrayEntity byteArray = getErrorByteArray(); if(byteArray == null) { byteArray = createExceptionByteArray(EXCEPTION_NAME,exceptionBytes, ResourceTypes.RUNTIME); errorDetailsByteArrayId = byteArray.getId(); errorDetailsByteArray = byteArray; } else { byteArray.setBytes(exceptionBytes); } }
public void setByteArrayValue(byte[] bytes, boolean isTransient) { if (bytes != null) { // note: there can be cases where byteArrayId is not null // but the corresponding byte array entity has been removed in parallel; // thus we also need to check if the actual byte array entity still exists if (this.byteArrayId != null && getByteArrayEntity() != null) { byteArrayValue.setBytes(bytes); } else { deleteByteArrayValue(); byteArrayValue = new ByteArrayEntity(nameProvider.getName(), bytes, type, rootProcessInstanceId, removalTime); // avoid insert of byte array value for a transient variable if (!isTransient) { Context. getCommandContext() .getByteArrayManager() .insertByteArray(byteArrayValue); byteArrayId = byteArrayValue.getId(); } } } else { deleteByteArrayValue(); } }