|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.camunda.bpm.engine.impl.AbstractDefinitionDeployer<ProcessDefinitionEntity>
org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer
public class BpmnDeployer
Deployer responsible to parse BPMN 2.0 XML files and create the proper
ProcessDefinitionEntitys. Overwrite this class if you want to gain some control over
this mechanism, e.g. setting different version numbers, or you want to use your own BpmnParser.
| Field Summary | |
|---|---|
static String[] |
BPMN_RESOURCE_SUFFIXES
|
protected BpmnParser |
bpmnParser
|
protected ExpressionManager |
expressionManager
|
protected static PropertyMapKey<String,List<JobDeclaration<?,?>>> |
JOB_DECLARATIONS_PROPERTY
|
static BpmnParseLogger |
LOG
|
| Fields inherited from class org.camunda.bpm.engine.impl.AbstractDefinitionDeployer |
|---|
DIAGRAM_SUFFIXES, idGenerator |
| Constructor Summary | |
|---|---|
BpmnDeployer()
|
|
| Method Summary | |
|---|---|
protected void |
addAuthorizations(ProcessDefinitionEntity processDefinition)
|
protected void |
addAuthorizationsFromIterator(Set<Expression> exprSet,
ProcessDefinitionEntity processDefinition,
org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer.ExprType exprType)
|
protected void |
addDefinitionToDeploymentCache(DeploymentCache deploymentCache,
ProcessDefinitionEntity definition)
Add a definition to the deployment cache |
protected void |
addEventSubscription(ProcessDefinitionEntity processDefinition,
EventSubscriptionDeclaration messageEventDefinition)
|
protected void |
addEventSubscriptions(ProcessDefinitionEntity processDefinition)
|
protected void |
addMessageEventSubscription(EventSubscriptionDeclaration messageEventDefinition,
ProcessDefinitionEntity processDefinition)
|
protected void |
addSignalEventSubscription(EventSubscriptionDeclaration signalEventDefinition,
ProcessDefinitionEntity processDefinition)
|
protected void |
addTimerDeclarations(ProcessDefinitionEntity processDefinition)
|
protected void |
adjustStartEventSubscriptions(ProcessDefinitionEntity newLatestProcessDefinition,
ProcessDefinitionEntity oldLatestProcessDefinition)
adjust all event subscriptions responsible to start process instances (timer start event, message start event). |
protected void |
createJobDefinition(ProcessDefinition processDefinition,
JobDeclaration<?,?> jobDeclaration)
|
protected void |
createResource(String name,
byte[] bytes,
DeploymentEntity deploymentEntity)
|
protected void |
definitionAddedToDeploymentCache(DeploymentEntity deployment,
ProcessDefinitionEntity definition,
Properties properties)
Called after a definition was added to the deployment cache. |
protected List<EventSubscriptionEntity> |
filterSubscriptionsOfDifferentType(EventSubscriptionDeclaration eventSubscription,
List<EventSubscriptionEntity> subscriptionsForSameMessageName)
It is possible to deploy a process containing a start and intermediate message event that wait for the same message or to have two processes, one with a message start event and the other one with a message intermediate event, that subscribe for the same message. |
protected ProcessDefinitionEntity |
findDefinitionByDeploymentAndKey(String deploymentId,
String definitionKey)
Find a definition entity by deployment id and definition key. |
protected ProcessDefinitionEntity |
findLatestDefinitionByKeyAndTenantId(String definitionKey,
String tenantId)
Find the last deployed definition entity by definition key and tenant id. |
protected String |
generateDiagramResourceForDefinition(DeploymentEntity deployment,
String resourceName,
ProcessDefinitionEntity definition,
Map<String,ResourceEntity> resources)
Generate a diagram resource for a definition and return the name of the image resource. |
BpmnParser |
getBpmnParser()
|
protected DbEntityManager |
getDbEntityManager()
|
protected EventSubscriptionManager |
getEventSubscriptionManager()
|
ExpressionManager |
getExpressionManager()
|
protected JobDefinitionManager |
getJobDefinitionManager()
|
protected JobManager |
getJobManager()
|
protected ProcessDefinitionManager |
getProcessDefinitionManager()
|
protected String[] |
getResourcesSuffixes()
DON'T KEEP DEPLOYMENT-SPECIFIC STATE |
protected boolean |
isSameMessageEventSubscriptionAlreadyPresent(EventSubscriptionDeclaration eventSubscription)
|
protected boolean |
isSubscriptionForIntermediateEvent(EventSubscriptionEntity subscriptionEntity)
|
protected boolean |
isSubscriptionForStartEvent(EventSubscriptionEntity subscriptionEntity)
|
protected boolean |
isSubscriptionOfDifferentTypeAsDeclaration(EventSubscriptionEntity subscriptionEntity,
EventSubscriptionDeclaration declaration)
|
protected void |
persistDefinition(ProcessDefinitionEntity definition)
Persist definition entity into the database. |
protected void |
persistedDefinitionLoaded(DeploymentEntity deployment,
ProcessDefinitionEntity definition,
ProcessDefinitionEntity persistedDefinition)
Called when a previous version of a definition was loaded from the persistent store. |
protected void |
removeObsoleteEventSubscriptions(ProcessDefinitionEntity processDefinition,
ProcessDefinitionEntity latestProcessDefinition)
|
protected void |
removeObsoleteTimers(ProcessDefinitionEntity processDefinition)
|
void |
setBpmnParser(BpmnParser bpmnParser)
|
void |
setExpressionManager(ExpressionManager expressionManager)
|
protected List<ProcessDefinitionEntity> |
transformDefinitions(DeploymentEntity deployment,
ResourceEntity resource,
Properties properties)
Transform the resource entity into definition entities. |
protected void |
updateJobDeclarations(List<JobDeclaration<?,?>> jobDeclarations,
ProcessDefinitionEntity processDefinition,
boolean isNewDeployment)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static BpmnParseLogger LOG
public static final String[] BPMN_RESOURCE_SUFFIXES
protected static final PropertyMapKey<String,List<JobDeclaration<?,?>>> JOB_DECLARATIONS_PROPERTY
protected ExpressionManager expressionManager
protected BpmnParser bpmnParser
| Constructor Detail |
|---|
public BpmnDeployer()
| Method Detail |
|---|
protected String[] getResourcesSuffixes()
getResourcesSuffixes in class AbstractDefinitionDeployer<ProcessDefinitionEntity>
protected List<ProcessDefinitionEntity> transformDefinitions(DeploymentEntity deployment,
ResourceEntity resource,
Properties properties)
AbstractDefinitionDeployer
transformDefinitions in class AbstractDefinitionDeployer<ProcessDefinitionEntity>deployment - the deployment the resources belongs toresource - the resource to transform
protected ProcessDefinitionEntity findDefinitionByDeploymentAndKey(String deploymentId,
String definitionKey)
AbstractDefinitionDeployer
findDefinitionByDeploymentAndKey in class AbstractDefinitionDeployer<ProcessDefinitionEntity>deploymentId - the deployment iddefinitionKey - the definition key
protected ProcessDefinitionEntity findLatestDefinitionByKeyAndTenantId(String definitionKey,
String tenantId)
AbstractDefinitionDeployer
findLatestDefinitionByKeyAndTenantId in class AbstractDefinitionDeployer<ProcessDefinitionEntity>protected void persistDefinition(ProcessDefinitionEntity definition)
AbstractDefinitionDeployer
persistDefinition in class AbstractDefinitionDeployer<ProcessDefinitionEntity>definition - the definition entity
protected void addDefinitionToDeploymentCache(DeploymentCache deploymentCache,
ProcessDefinitionEntity definition)
AbstractDefinitionDeployer
addDefinitionToDeploymentCache in class AbstractDefinitionDeployer<ProcessDefinitionEntity>deploymentCache - the deployment cachedefinition - the definition to add
protected String generateDiagramResourceForDefinition(DeploymentEntity deployment,
String resourceName,
ProcessDefinitionEntity definition,
Map<String,ResourceEntity> resources)
AbstractDefinitionDeployer
generateDiagramResourceForDefinition in class AbstractDefinitionDeployer<ProcessDefinitionEntity>deployment - the deployment entityresourceName - the name of the definition resourcedefinition - the definition entityresources - the resources of the deployment
protected void definitionAddedToDeploymentCache(DeploymentEntity deployment,
ProcessDefinitionEntity definition,
Properties properties)
AbstractDefinitionDeployer
definitionAddedToDeploymentCache in class AbstractDefinitionDeployer<ProcessDefinitionEntity>deployment - the deployment of the definitiondefinition - the definition entity
protected void persistedDefinitionLoaded(DeploymentEntity deployment,
ProcessDefinitionEntity definition,
ProcessDefinitionEntity persistedDefinition)
AbstractDefinitionDeployer
persistedDefinitionLoaded in class AbstractDefinitionDeployer<ProcessDefinitionEntity>deployment - the deployment of the definitiondefinition - the definition entitypersistedDefinition - the loaded definition entity
protected void updateJobDeclarations(List<JobDeclaration<?,?>> jobDeclarations,
ProcessDefinitionEntity processDefinition,
boolean isNewDeployment)
protected void createJobDefinition(ProcessDefinition processDefinition,
JobDeclaration<?,?> jobDeclaration)
protected void adjustStartEventSubscriptions(ProcessDefinitionEntity newLatestProcessDefinition,
ProcessDefinitionEntity oldLatestProcessDefinition)
protected void addTimerDeclarations(ProcessDefinitionEntity processDefinition)
protected void removeObsoleteTimers(ProcessDefinitionEntity processDefinition)
protected void removeObsoleteEventSubscriptions(ProcessDefinitionEntity processDefinition,
ProcessDefinitionEntity latestProcessDefinition)
protected void addEventSubscriptions(ProcessDefinitionEntity processDefinition)
protected void addEventSubscription(ProcessDefinitionEntity processDefinition,
EventSubscriptionDeclaration messageEventDefinition)
protected void addMessageEventSubscription(EventSubscriptionDeclaration messageEventDefinition,
ProcessDefinitionEntity processDefinition)
protected boolean isSameMessageEventSubscriptionAlreadyPresent(EventSubscriptionDeclaration eventSubscription)
protected List<EventSubscriptionEntity> filterSubscriptionsOfDifferentType(EventSubscriptionDeclaration eventSubscription,
List<EventSubscriptionEntity> subscriptionsForSameMessageName)
eventSubscription - subscriptionsForSameMessageName -
protected boolean isSubscriptionOfDifferentTypeAsDeclaration(EventSubscriptionEntity subscriptionEntity,
EventSubscriptionDeclaration declaration)
protected boolean isSubscriptionForStartEvent(EventSubscriptionEntity subscriptionEntity)
protected boolean isSubscriptionForIntermediateEvent(EventSubscriptionEntity subscriptionEntity)
protected void addSignalEventSubscription(EventSubscriptionDeclaration signalEventDefinition,
ProcessDefinitionEntity processDefinition)
protected void addAuthorizationsFromIterator(Set<Expression> exprSet,
ProcessDefinitionEntity processDefinition,
org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer.ExprType exprType)
protected void addAuthorizations(ProcessDefinitionEntity processDefinition)
protected void createResource(String name,
byte[] bytes,
DeploymentEntity deploymentEntity)
protected DbEntityManager getDbEntityManager()
protected JobManager getJobManager()
protected JobDefinitionManager getJobDefinitionManager()
protected EventSubscriptionManager getEventSubscriptionManager()
protected ProcessDefinitionManager getProcessDefinitionManager()
public ExpressionManager getExpressionManager()
public void setExpressionManager(ExpressionManager expressionManager)
public BpmnParser getBpmnParser()
public void setBpmnParser(BpmnParser bpmnParser)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||