Beispiel #1
0
 protected internal virtual void ensureErrorByteArrayInitialized()
 {
     if (errorDetailsByteArray == null && !string.ReferenceEquals(errorDetailsByteArrayId, null))
     {
         errorDetailsByteArray = Context.CommandContext.DbEntityManager.selectById(typeof(ByteArrayEntity), errorDetailsByteArrayId);
     }
 }
Beispiel #2
0
        public virtual void init(CommandContext commandContext, bool shouldResetLock)
        {
            // clean additional data related to this job
            JobHandler jobHandler = JobHandler;

            if (jobHandler != null)
            {
                jobHandler.onDelete(JobHandlerConfiguration, this);
            }

            //cancel the retries -> will resolve job incident if present
            Retries = commandContext.ProcessEngineConfiguration.DefaultNumberOfRetries;

            //delete the job's exception byte array and exception message
            string exceptionByteArrayIdToDelete = null;

            if (!string.ReferenceEquals(exceptionByteArrayId, null))
            {
                exceptionByteArrayIdToDelete = exceptionByteArrayId;
                this.exceptionByteArrayId    = null;
                this.exceptionMessage        = null;
            }

            //clean the lock information
            if (shouldResetLock)
            {
                LockOwner          = null;
                LockExpirationTime = null;
            }

            if (!string.ReferenceEquals(exceptionByteArrayIdToDelete, null))
            {
                ByteArrayEntity byteArray = commandContext.DbEntityManager.selectById(typeof(ByteArrayEntity), exceptionByteArrayIdToDelete);
                commandContext.DbEntityManager.delete(byteArray);
            }
        }
Beispiel #3
0
 public virtual void setByteArrayValue(ByteArrayEntity byteArrayValue)
 {
     byteArrayField.setByteArrayValue(byteArrayValue);
 }
Beispiel #4
0
 public virtual void insertByteArray(ByteArrayEntity arr)
 {
     arr.CreateTime = ClockUtil.CurrentTime;
     DbEntityManager.insert(arr);
 }