Class JobEntity

    • Field Detail

      • executionId

        protected String executionId
      • processDefinitionId

        protected String processDefinitionId
      • processDefinitionKey

        protected String processDefinitionKey
      • retries

        protected int retries
      • suspensionState

        protected int suspensionState
      • jobHandlerType

        protected String jobHandlerType
      • jobHandlerConfiguration

        protected String jobHandlerConfiguration
      • exceptionByteArrayId

        protected String exceptionByteArrayId
      • exceptionMessage

        protected String exceptionMessage
      • deploymentId

        protected String deploymentId
      • jobDefinitionId

        protected String jobDefinitionId
      • priority

        protected long priority
      • tenantId

        protected String tenantId
      • createTime

        protected Date createTime
      • activityId

        protected String activityId
      • sequenceCounter

        protected long sequenceCounter
      • lastFailureLogId

        protected String lastFailureLogId
      • failedActivityId

        protected String failedActivityId
      • persistedDependentEntities

        protected Map<String,​Class> persistedDependentEntities
    • Constructor Detail

      • JobEntity

        public JobEntity()
    • Method Detail

      • preExecute

        protected void preExecute​(CommandContext commandContext)
      • postExecute

        protected void postExecute​(CommandContext commandContext)
      • insert

        public void insert()
      • delete

        public void delete()
      • delete

        public void delete​(boolean incidentResolved)
      • getPersistentState

        public Object getPersistentState()
        Description copied from interface: DbEntity
        Returns a representation of the object, as would be stored in the database. Used when deciding if updates have occurred to the object or not since it was last loaded.
        Specified by:
        getPersistentState in interface DbEntity
        Overrides:
        getPersistentState in class AcquirableJobEntity
      • getSequenceCounter

        public long getSequenceCounter()
      • setSequenceCounter

        public void setSequenceCounter​(long sequenceCounter)
      • incrementSequenceCounter

        public void incrementSequenceCounter()
      • getExecutionId

        public String getExecutionId()
        Description copied from interface: Job
        Returns the specific execution on which the job was created.
        Specified by:
        getExecutionId in interface Job
      • setExecutionId

        public void setExecutionId​(String executionId)
      • ensureExecutionInitialized

        protected void ensureExecutionInitialized()
      • getRetries

        public int getRetries()
        Description copied from interface: Job
        Returns the number of retries this job has left. Whenever the jobexecutor fails to execute the job, this value is decremented. When it hits zero, the job is supposed to be dead and not retried again (ie a manual retry is required then).
        Specified by:
        getRetries in interface Job
      • setRetries

        public void setRetries​(int retries)
      • setRetriesFromPersistence

        public void setRetriesFromPersistence​(int retries)
      • createFailedJobIncident

        protected void createFailedJobIncident()
      • removeFailedJobIncident

        protected void removeFailedJobIncident​(boolean incidentResolved)
      • createIncidentContext

        protected IncidentContext createIncidentContext()
      • getExceptionStacktrace

        public String getExceptionStacktrace()
      • setSuspensionState

        public void setSuspensionState​(int state)
      • getSuspensionState

        public int getSuspensionState()
      • isSuspended

        public boolean isSuspended()
        Description copied from interface: Job
        Indicates whether this job is suspended. If a job is suspended, the job will be not acquired by the job executor.
        Specified by:
        isSuspended in interface Job
        Returns:
        true if this Job is currently suspended.
      • getProcessDefinitionId

        public String getProcessDefinitionId()
        Description copied from interface: Job
        Returns the id of the process definition which created the job.
        Specified by:
        getProcessDefinitionId in interface Job
      • setProcessDefinitionId

        public void setProcessDefinitionId​(String processDefinitionId)
      • getProcessDefinitionKey

        public String getProcessDefinitionKey()
        Description copied from interface: Job
        Returns the key of the process definition which created the job.
        Specified by:
        getProcessDefinitionKey in interface Job
      • setProcessDefinitionKey

        public void setProcessDefinitionKey​(String processDefinitionKey)
      • setExceptionStacktrace

        public void setExceptionStacktrace​(String exception)
      • getJobHandler

        protected JobHandler getJobHandler()
      • getJobHandlerType

        public String getJobHandlerType()
      • setJobHandlerType

        public void setJobHandlerType​(String jobHandlerType)
      • getJobHandlerConfigurationRaw

        public String getJobHandlerConfigurationRaw()
      • setJobHandlerConfigurationRaw

        public void setJobHandlerConfigurationRaw​(String jobHandlerConfiguration)
      • setJobDefinitionId

        public void setJobDefinitionId​(String jobDefinitionId)
      • setJobDefinition

        public void setJobDefinition​(JobDefinition jobDefinition)
      • ensureJobDefinitionInitialized

        protected void ensureJobDefinitionInitialized()
      • setExceptionMessage

        public void setExceptionMessage​(String exceptionMessage)
      • getExceptionByteArrayId

        public String getExceptionByteArrayId()
      • getExceptionByteArray

        protected ByteArrayEntity getExceptionByteArray()
      • ensureExceptionByteArrayInitialized

        protected void ensureExceptionByteArrayInitialized()
      • clearFailedJobException

        protected void clearFailedJobException()
      • getDeploymentId

        public String getDeploymentId()
        Description copied from interface: Job
        Returns the id of the deployment in which context the job was created.
        Specified by:
        getDeploymentId in interface Job
      • setDeploymentId

        public void setDeploymentId​(String deploymentId)
      • isInInconsistentLockState

        public boolean isInInconsistentLockState()
      • resetLock

        public void resetLock()
      • getActivityId

        public String getActivityId()
      • setActivityId

        public void setActivityId​(String activityId)
      • getPriority

        public long getPriority()
        Description copied from interface: Job
        The job's priority that is a hint to job acquisition.
        Specified by:
        getPriority in interface Job
      • setPriority

        public void setPriority​(long priority)
      • getTenantId

        public String getTenantId()
        Description copied from interface: Job
        The id of the tenant this job belongs to. Can be null if the job belongs to no single tenant.
        Specified by:
        getTenantId in interface Job
      • setTenantId

        public void setTenantId​(String tenantId)
      • getCreateTime

        public Date getCreateTime()
        Description copied from interface: Job
        The date/time when this job has been created
        Specified by:
        getCreateTime in interface Job
      • setCreateTime

        public void setCreateTime​(Date createTime)
      • ensureActivityIdInitialized

        protected void ensureActivityIdInitialized()
      • unlock

        public void unlock()
        Unlock from current lock owner
      • getType

        public abstract String getType()
      • getReferencedEntityIds

        public Set<String> getReferencedEntityIds()
        Description copied from interface: HasDbReferences

        Scope: IN-MEMORY references

        Specified by:
        getReferencedEntityIds in interface HasDbReferences
        Returns:
        the ids of the entities that this entity references. Should only return ids for entities of the same type
      • getReferencedEntitiesIdAndClass

        public Map<String,​Class> getReferencedEntitiesIdAndClass()
        Description copied from interface: HasDbReferences

        Scope: IN-MEMORY references

        Specified by:
        getReferencedEntitiesIdAndClass in interface HasDbReferences
        Returns:
        a map of the ids and the entities' classes that this entity references. It's used when trying to determine if there was an Optimistic Locking occurrence on an INSERT or UPDATE of an object of this type.
      • getLastFailureLogId

        public String getLastFailureLogId()
      • setLastFailureLogId

        public void setLastFailureLogId​(String lastFailureLogId)
      • getFailedActivityId

        public String getFailedActivityId()
        Description copied from interface: Job
        Returns the id of the activity on which the last exception occurred.
        Specified by:
        getFailedActivityId in interface Job
      • setFailedActivityId

        public void setFailedActivityId​(String failedActivityId)