public abstract class JobDeclaration<S,T extends JobEntity> extends Object implements Serializable
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.
Modifier and Type | Field and Description |
---|---|
protected ActivityImpl |
activity |
protected boolean |
exclusive |
protected String |
jobConfiguration |
protected String |
jobDefinitionId
the id of the associated persistent jobDefinitionId
|
protected JobHandlerConfiguration |
jobHandlerConfiguration |
protected String |
jobHandlerType |
protected ParameterValueProvider |
jobPriorityProvider |
Constructor and Description |
---|
JobDeclaration(String jobHandlerType) |
Modifier and Type | Method and Description |
---|---|
T |
createJobInstance(S context) |
ActivityImpl |
getActivity() |
String |
getActivityId() |
String |
getJobConfiguration() |
String |
getJobDefinitionId() |
String |
getJobHandlerType() |
ParameterValueProvider |
getJobPriorityProvider() |
ProcessDefinitionImpl |
getProcessDefinition() |
boolean |
isExclusive() |
protected abstract T |
newJobInstance(S context) |
protected void |
postInitialize(S context,
T job)
general callback to override any configuration after the defaults have been applied
|
T |
reconfigure(S context,
T job)
Re-initialize configuration part.
|
Date |
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 |
resolveJobHandler() |
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) |
protected String jobDefinitionId
protected String jobHandlerType
protected JobHandlerConfiguration jobHandlerConfiguration
protected String jobConfiguration
protected boolean exclusive
protected ActivityImpl activity
protected ParameterValueProvider jobPriorityProvider
public JobDeclaration(String jobHandlerType)
protected void postInitialize(S context, T job)
protected abstract ExecutionEntity resolveExecution(S context)
public String getJobDefinitionId()
public void setJobDefinitionId(String jobDefinitionId)
public String getJobHandlerType()
protected JobHandler resolveJobHandler()
protected abstract JobHandlerConfiguration resolveJobHandlerConfiguration(S context)
protected boolean resolveExclusive(S context)
protected int resolveRetries(S context)
public boolean isExclusive()
public void setExclusive(boolean exclusive)
public String getActivityId()
public ActivityImpl getActivity()
public void setActivity(ActivityImpl activity)
public ProcessDefinitionImpl getProcessDefinition()
public String getJobConfiguration()
public void setJobConfiguration(String jobConfiguration)
public ParameterValueProvider getJobPriorityProvider()
public void setJobPriorityProvider(ParameterValueProvider jobPriorityProvider)
Copyright © 2017. All rights reserved.