Class JobDeclaration<S,T extends JobEntity>
java.lang.Object
org.camunda.bpm.engine.impl.jobexecutor.JobDeclaration<S,T>
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BatchJobDeclaration
,BatchMonitorJobDeclaration
,BatchSeedJobDeclaration
,EventSubscriptionJobDeclaration
,HistoryCleanupJobDeclaration
,MessageJobDeclaration
,TimerDeclarationImpl
A job declaration is associated with an activity in the process definition graph. It provides data about jobs which are to be created when executing this activity. It also acts as a factory for new Job Instances.
Jobs are of a type T and are created in the context of type S (e.g. an execution or an event subscription). An instance of the context class is handed in when a job is created.
- Author:
- Daniel Meyer
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected ActivityImpl
protected boolean
protected String
protected String
the id of the associated persistent jobDefinitionIdprotected JobHandlerConfiguration
protected String
protected ParameterValueProvider
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateJobInstance
(S context) boolean
protected abstract T
newJobInstance
(S context) protected void
postInitialize
(S context, T job) general callback to override any configuration after the defaults have been appliedreconfigure
(S context, T job) Re-initialize configuration part.resolveDueDate
(S context) protected boolean
resolveExclusive
(S context) protected abstract ExecutionEntity
resolveExecution
(S context) Returns the execution in which context the job is created.protected String
resolveJobDefinitionId
(S context) protected JobHandler
protected abstract JobHandlerConfiguration
resolveJobHandlerConfiguration
(S context) protected String
resolveJobHandlerType
(S context) protected int
resolveRetries
(S context) void
setActivity
(ActivityImpl activity) void
setExclusive
(boolean exclusive) void
setJobConfiguration
(String jobConfiguration) void
setJobDefinitionId
(String jobDefinitionId) void
setJobPriorityProvider
(ParameterValueProvider jobPriorityProvider)
-
Field Details
-
jobDefinitionId
the id of the associated persistent jobDefinitionId -
jobHandlerType
-
jobHandlerConfiguration
-
jobConfiguration
-
exclusive
protected boolean exclusive -
activity
-
jobPriorityProvider
-
-
Constructor Details
-
JobDeclaration
-
-
Method Details
-
createJobInstance
- Returns:
- the created Job instances
-
reconfigure
Re-initialize configuration part. -
postInitialize
general callback to override any configuration after the defaults have been applied -
resolveExecution
Returns the execution in which context the job is created. The execution is used to determine the job's priority based on a BPMN activity the execution is currently executing. May be null. -
newJobInstance
-
getJobDefinitionId
-
resolveJobDefinitionId
-
setJobDefinitionId
-
getJobHandlerType
-
resolveJobHandler
-
resolveJobHandlerType
-
resolveJobHandlerConfiguration
-
resolveExclusive
-
resolveRetries
-
resolveDueDate
-
isExclusive
public boolean isExclusive() -
setExclusive
public void setExclusive(boolean exclusive) -
getActivityId
-
getActivity
-
setActivity
-
getProcessDefinition
-
getJobConfiguration
-
setJobConfiguration
-
getJobPriorityProvider
-
setJobPriorityProvider
-