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
FieldsModifier and TypeFieldDescriptionprotected ActivityImplprotected booleanprotected Stringprotected Stringthe id of the associated persistent jobDefinitionIdprotected JobHandlerConfigurationprotected Stringprotected ParameterValueProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateJobInstance(S context) booleanprotected abstract TnewJobInstance(S context) protected voidpostInitialize(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 booleanresolveExclusive(S context) protected abstract ExecutionEntityresolveExecution(S context) Returns the execution in which context the job is created.protected StringresolveJobDefinitionId(S context) protected JobHandlerprotected abstract JobHandlerConfigurationresolveJobHandlerConfiguration(S context) protected StringresolveJobHandlerType(S context) protected intresolveRetries(S context) voidsetActivity(ActivityImpl activity) voidsetExclusive(boolean exclusive) voidsetJobConfiguration(String jobConfiguration) voidsetJobDefinitionId(String jobDefinitionId) voidsetJobPriorityProvider(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
-