public class BpmnParse extends Parse
BpmnParser
.
Instances of this class should not be reused and are also not threadsafe.name, parser, rootElement, schemaResource, streamSource, warnings
Constructor and Description |
---|
BpmnParse(BpmnParser parser)
Constructor to be called by the
BpmnParser . |
Modifier and Type | Method and Description |
---|---|
protected boolean |
activityAlreadyContainsJobDeclarationEventType(List<EventSubscriptionJobDeclaration> jobDeclarationsForActivity,
EventSubscriptionJobDeclaration jobDeclaration)
Assumes that an activity has at most one declaration of a certain eventType.
|
protected void |
addErrorEventDefinition(ErrorEventDefinition errorEventDefinition,
ScopeImpl catchingScope) |
protected void |
addEscalationEventDefinition(ScopeImpl catchingScope,
EscalationEventDefinition escalationEventDefinition,
Element element) |
protected void |
addEventSubscriptionDeclaration(EventSubscriptionDeclaration subscription,
ScopeImpl scope,
Element element) |
protected void |
addEventSubscriptionJobDeclaration(EventSubscriptionJobDeclaration jobDeclaration,
ActivityImpl activity,
Element element) |
protected void |
addJobDeclarationToProcessDefinition(JobDeclaration<?,?> jobDeclaration,
ProcessDefinition processDefinition) |
protected void |
addMessageJobDeclaration(MessageJobDeclaration messageJobDeclaration,
ActivityImpl activity,
boolean exclusive)
Adds the new message job declaration to existing declarations.
|
protected void |
addMessageJobDeclarationToActivity(MessageJobDeclaration messageJobDeclaration,
ActivityImpl activity) |
protected void |
addTimeCycleWarning(Element timeCycleElement,
String type) |
protected void |
addTimerDeclaration(ScopeImpl scope,
TimerDeclarationImpl timerDeclaration) |
protected void |
addVariableDeclaration(ScopeImpl scope,
VariableDeclaration variableDeclaration) |
protected boolean |
attributeValueEquals(Element element,
String attribute,
String comparisonValue) |
protected boolean |
checkActivityInputOutputSupported(Element activityElement,
ActivityImpl activity,
IoMapping inputOutput) |
protected boolean |
checkActivityOutputParameterSupported(Element activityElement,
ActivityImpl activity) |
protected void |
collectElementIds() |
ActivityImpl |
createActivityOnScope(Element activityElement,
ScopeImpl scopeElement)
Parses the generic information of an activity element (id, name,
documentation, etc.), and creates a new
ActivityImpl on the given
scope element. |
protected Escalation |
createEscalation(String id,
Element element) |
protected EscalationEventDefinition |
createEscalationEventDefinitionForEscalationHandler(Element escalationEventDefinitionElement,
ActivityImpl escalationHandler,
boolean cancelActivity) |
protected ParameterValueProvider |
createParameterValueProvider(Object value,
ExpressionManager expressionManager) |
BpmnParse |
deployment(DeploymentEntity deployment) |
protected void |
ensureNoExpressionInMessageStartEvent(Element element,
EventSubscriptionDeclaration messageStartEventSubscriptionDeclaration) |
protected void |
ensureNoIoMappingDefined(Element element) |
BpmnParse |
execute() |
protected boolean |
exists(MessageJobDeclaration msgJobdecl,
String procDefKey,
String activityId)
Checks whether the message declaration already exists.
|
protected HashMap<String,Element> |
filterCompensationHandlers(List<Element> activityElements) |
protected HashMap<String,Element> |
filterIntermediateCatchEvents(List<Element> activityElements) |
protected Escalation |
findEscalationForEscalationEventDefinition(Element escalationEventDefinition)
Find the referenced escalation of the given escalation event definition.
|
protected String |
getAssignmentId(String expression,
String prefix) |
static String |
getIdForMiBody(String id) |
protected XMLImporter |
getImporter(String importType,
Element theImport) |
Map<String,List<JobDeclaration<?,?>>> |
getJobDeclarations() |
List<JobDeclaration<?,?>> |
getJobDeclarationsByKey(String processDefinitionKey) |
protected ActivityImpl |
getMultiInstanceScope(ActivityImpl activity) |
ProcessDefinitionEntity |
getProcessDefinition(String processDefinitionKey) |
List<ProcessDefinitionEntity> |
getProcessDefinitions() |
protected String |
getStringValueFromAttributeOrElement(String attributeName,
String elementName,
Element element) |
protected boolean |
hasConnector(Element element) |
protected boolean |
hasMultipleEventDefinitionsWithSameName(EventSubscriptionDeclaration subscription,
Collection<EventSubscriptionDeclaration> eventDefinitions,
String eventType) |
protected boolean |
hasMultipleMessageEventDefinitionsWithSameName(EventSubscriptionDeclaration subscription,
Collection<EventSubscriptionDeclaration> eventDefinitions) |
protected boolean |
hasMultipleSignalEventDefinitionsWithSameName(EventSubscriptionDeclaration subscription,
Collection<EventSubscriptionDeclaration> eventDefinitions) |
protected boolean |
isAsyncAfter(Element element) |
protected boolean |
isAsyncBefore(Element element) |
protected boolean |
isCompensationHandler(Element activityElement) |
protected boolean |
isExclusive(Element element) |
protected boolean |
isServiceTaskLike(Element element) |
protected boolean |
isValidEventNameForScope(String eventName,
Element listenerElement)
Check if the given event name is valid.
|
BpmnParse |
name(String name) |
void |
parseActivities(List<Element> activityElements,
Element parentElement,
ScopeImpl scopeElement)
Parses the activities of a certain level in the process (process,
subprocess or another scope).
|
protected ActivityImpl |
parseActivity(Element activityElement,
Element parentElement,
ScopeImpl scopeElement) |
protected void |
parseActivityInputOutput(Element activityElement,
ActivityImpl activity) |
protected void |
parseAssociationOfCompensationBoundaryEvent(Element associationElement,
ActivityImpl sourceActivity,
ActivityImpl targetActivity) |
protected void |
parseAssociations(Element scopeElement,
ScopeImpl parentScope,
Map<String,Element> compensationHandlers) |
protected void |
parseAsynchronousContinuation(Element element,
ActivityImpl activity)
Parse async continuation of the given element and create async jobs for the activity.
|
protected void |
parseAsynchronousContinuationForActivity(Element activityElement,
ActivityImpl activity)
Parse async continuation of an activity and create async jobs for the activity.
|
protected void |
parseBinding(Element callActivityElement,
ActivityImpl activity,
BaseCallableElement callableElement,
String bindingAttributeName) |
Boolean |
parseBooleanAttribute(String booleanText) |
Boolean |
parseBooleanAttribute(String booleanText,
boolean defaultValue) |
protected ActivityBehavior |
parseBoundaryCancelEventDefinition(Element cancelEventDefinition,
ActivityImpl activity) |
protected void |
parseBoundaryCompensateEventDefinition(Element compensateEventDefinition,
ActivityImpl activity) |
BoundaryConditionalEventActivityBehavior |
parseBoundaryConditionalEventDefinition(Element element,
boolean interrupting,
ActivityImpl conditionalActivity)
Parses the given element as conditional boundary event.
|
void |
parseBoundaryErrorEventDefinition(Element errorEventDefinition,
ActivityImpl boundaryEventActivity) |
protected void |
parseBoundaryEscalationEventDefinition(Element escalationEventDefinitionElement,
boolean cancelActivity,
ActivityImpl boundaryEventActivity) |
void |
parseBoundaryEvents(Element parentElement,
ScopeImpl flowScope)
Parses the boundary events of a certain 'level' (process, subprocess or
other scope).
|
void |
parseBoundaryMessageEventDefinition(Element element,
boolean interrupting,
ActivityImpl messageActivity) |
void |
parseBoundarySignalEventDefinition(Element element,
boolean interrupting,
ActivityImpl signalActivity) |
void |
parseBoundaryTimerEventDefinition(Element timerEventDefinition,
boolean interrupting,
ActivityImpl boundaryActivity)
Parses a boundary timer event.
|
void |
parseBPMNDiagram(Element bpmndiagramElement) |
void |
parseBPMNEdge(Element bpmnEdgeElement) |
void |
parseBPMNPlane(Element bpmnPlaneElement) |
void |
parseBPMNShape(Element bpmnShapeElement) |
ActivityImpl |
parseBusinessRuleTask(Element businessRuleTaskElement,
ScopeImpl scope)
Parses a businessRuleTask declaration.
|
protected CallableElementParameter |
parseCallableElementProvider(Element parameterElement) |
ActivityImpl |
parseCallActivity(Element callActivityElement,
ScopeImpl scope,
boolean isMultiInstance)
Parses a call activity (currently only supporting calling subprocesses).
|
void |
parseCollaboration()
Parses the collaboration definition defined within the 'definitions' root
element and get all participants to lookup their process references during
DI parsing.
|
protected List<String> |
parseCommaSeparatedList(String s)
Parses the given String as a list of comma separated entries, where an
entry can possibly be an expression that has comma's.
|
protected void |
parseCompensationEventSubprocess(ActivityImpl startEventActivity,
Element startEventElement,
ActivityImpl scopeActivity,
Element compensateEventDefinition) |
protected ActivityImpl |
parseCompensationHandlerForCompensationBoundaryEvent(ScopeImpl parentScope,
ActivityImpl sourceActivity,
String targetRef,
Map<String,Element> compensationHandlers) |
protected void |
parseCompensationHandlers(ScopeImpl parentScope,
Map<String,Element> compensationHandlers) |
protected ConditionalEventDefinition |
parseConditionalEventDefinition(Element element,
ActivityImpl conditionalActivity)
Parses the given element and returns an ConditionalEventDefinition object.
|
ConditionalEventDefinition |
parseConditionalStartEventForEventSubprocess(Element element,
ActivityImpl conditionalActivity,
boolean interrupting)
Parses the given element as conditional start event of an event subprocess.
|
protected Condition |
parseConditionExpression(Element conditionExprElement) |
protected DecisionResultMapper |
parseDecisionResultMapper(Element businessRuleTaskElement) |
protected void |
parseDefinitionsAttributes() |
void |
parseDiagramInterchangeElements() |
protected void |
parseDIBounds(Element bpmnShapeElement,
HasDIBounds target) |
protected ActivityImpl |
parseDmnBusinessRuleTask(Element businessRuleTaskElement,
ScopeImpl scope)
Parse a Business Rule Task which references a decision.
|
String |
parseDocumentation(Element element) |
static String |
parseDocumentation(List<String> docStrings) |
Double |
parseDoubleAttribute(Element element,
String attributeName,
String doubleText,
boolean required) |
protected void |
parseEmailServiceTask(ActivityImpl activity,
Element serviceTaskElement,
List<FieldDeclaration> fieldDeclarations) |
void |
parseEndEvents(Element parentElement,
ScopeImpl scope)
Parses the end events of a certain level in the process (process,
subprocess or another scope).
|
void |
parseErrors() |
protected void |
parseErrorStartEventDefinition(Element errorEventDefinition,
ActivityImpl startEventActivity) |
protected void |
parseEscalations() |
ActivityImpl |
parseEventBasedGateway(Element eventBasedGwElement,
Element parentElement,
ScopeImpl scope) |
protected void |
parseEventDefinitionForSubprocess(EventSubscriptionDeclaration subscriptionDeclaration,
ActivityImpl activity,
Element element) |
ActivityImpl |
parseExclusiveGateway(Element exclusiveGwElement,
ScopeImpl scope)
Parses an exclusive gateway declaration.
|
ExecutionListener |
parseExecutionListener(Element executionListenerElement)
Parses an
ExecutionListener implementation for the given
executionListener element. |
void |
parseExecutionListenersOnScope(Element scopeElement,
ScopeImpl scope)
Parses all execution-listeners on a scope.
|
void |
parseExecutionListenersOnTransition(Element activitiElement,
TransitionImpl activity) |
protected Expression |
parseExpression(Element parent,
String name) |
protected FieldDeclaration |
parseExpressionFieldDeclaration(Element fieldDeclarationElement,
Element serviceTaskElement,
String fieldName) |
protected void |
parseExternalServiceTask(ActivityImpl activity,
Element serviceTaskElement) |
protected FieldDeclaration |
parseFieldDeclaration(Element serviceTaskElement,
Element fieldDeclarationElement) |
List<FieldDeclaration> |
parseFieldDeclarations(Element element) |
protected void |
parseHistoryTimeToLive(Element processElement,
ProcessDefinitionEntity processDefinition) |
protected void |
parseHumanPerformer(Element taskElement,
TaskDefinition taskDefinition) |
protected void |
parseHumanPerformerResourceAssignment(Element performerElement,
TaskDefinition taskDefinition) |
protected void |
parseImports()
Parses the rootElement importing structures
|
ActivityImpl |
parseInclusiveGateway(Element inclusiveGwElement,
ScopeImpl scope)
Parses an inclusive gateway declaration.
|
protected void |
parseInputParameter(Element callActivityElement,
ActivityImpl activity,
CallableElement callableElement) |
Integer |
parseIntegerAttribute(Element element,
String attributeName,
String integerText,
boolean required) |
ActivityImpl |
parseIntermediateCatchEvent(Element intermediateEventElement,
ScopeImpl scopeElement,
ActivityImpl eventBasedGateway) |
protected void |
parseIntermediateCatchEvents(Element scopeElement,
ScopeImpl parentScope,
Map<String,Element> intermediateCatchEventElements) |
ConditionalEventDefinition |
parseIntermediateConditionalEventDefinition(Element element,
ActivityImpl conditionalActivity)
Parses the given element as intermediate conditional event.
|
protected void |
parseIntermediateLinkEventCatchBehavior(Element intermediateEventElement,
ActivityImpl activity,
Element linkEventDefinitionElement) |
protected void |
parseIntermediateMessageEventDefinition(Element messageEventDefinition,
ActivityImpl nestedActivity) |
protected void |
parseIntermediateSignalEventDefinition(Element element,
ActivityImpl signalActivity) |
ActivityImpl |
parseIntermediateThrowEvent(Element intermediateEventElement,
ScopeImpl scopeElement) |
protected void |
parseIntermediateTimerEventDefinition(Element timerEventDefinition,
ActivityImpl timerActivity) |
protected void |
parseLanes(Element laneSetElement,
LaneSet laneSet) |
protected void |
parseLaneSets(Element parentElement,
ProcessDefinitionEntity processDefinition) |
ActivityImpl |
parseManualTask(Element manualTaskElement,
ScopeImpl scope)
Parses a manual task.
|
protected EventSubscriptionDeclaration |
parseMessageEventDefinition(Element messageEventDefinition) |
void |
parseMessages()
Parses the messages of the given definitions file.
|
ScopeImpl |
parseMultiInstanceLoopCharacteristics(Element activityElement,
ScopeImpl scope)
Parses loopCharacteristics (standardLoop/Multi-instance) of an activity, if
any is defined.
|
protected void |
parseOutputParameter(Element callActivityElement,
ActivityImpl activity,
CallableElement callableElement) |
ActivityImpl |
parseParallelGateway(Element parallelGwElement,
ScopeImpl scope)
Parses a parallel gateway declaration.
|
protected void |
parsePotentialOwner(Element taskElement,
TaskDefinition taskDefinition) |
protected void |
parsePotentialOwnerResourceAssignment(Element performerElement,
TaskDefinition taskDefinition) |
protected void |
parsePotentialStarterResourceAssignment(Element performerElement,
ProcessDefinitionEntity processDefinition) |
protected ParameterValueProvider |
parsePriority(Element element,
String priorityAttribute) |
ProcessDefinitionEntity |
parseProcess(Element processElement)
Parses one process (ie anything inside a <process> element).
|
protected void |
parseProcessDefinitionCustomExtensions(Element scopeElement,
ProcessDefinition definition) |
void |
parseProcessDefinitions()
Parses all the process definitions defined within the 'definitions' root
element.
|
protected void |
parseProcessDefinitionStartEvent(ActivityImpl startEventActivity,
Element startEventElement,
Element parentElement,
ScopeImpl scope) |
void |
parseProperties(Element element,
ActivityImpl activity)
Parses the properties of an element (if any) that can contain properties
(processes, activities, etc.)
Returns true if property subelemens are found.
|
void |
parseProperty(Element propertyElement,
ActivityImpl activity)
Parses one property definition.
|
void |
parsePropertyCustomExtensions(ActivityImpl activity,
Element propertyElement,
String propertyName,
String propertyType)
Parses the custom extensions for properties.
|
ActivityImpl |
parseReceiveTask(Element receiveTaskElement,
ScopeImpl scope)
Parses a receive task.
|
protected String |
parseResultVariable(Element element) |
protected void |
parseRootElement()
Parses the 'definitions' root element
|
void |
parseScope(Element scopeElement,
ScopeImpl parentScope)
Parses a scope: a process, subprocess, etc.
|
protected void |
parseScopeStartEvent(ActivityImpl startEventActivity,
Element startEventElement,
Element parentElement,
ActivityImpl scopeActivity) |
ActivityImpl |
parseScriptTask(Element scriptTaskElement,
ScopeImpl scope)
Parses a scriptTask declaration.
|
protected ScriptTaskActivityBehavior |
parseScriptTaskElement(Element scriptTaskElement)
Returns a
ScriptTaskActivityBehavior for the script task element
corresponding to the script source or resource specified. |
ActivityImpl |
parseSendTask(Element sendTaskElement,
ScopeImpl scope)
Parses a sendTask declaration.
|
void |
parseSequenceFlow(Element processElement,
ScopeImpl scope,
Map<String,Element> compensationHandlers)
Parses all sequence flow of a scope.
|
void |
parseSequenceFlowConditionExpression(Element seqFlowElement,
TransitionImpl seqFlow)
Parses a condition expression on a sequence flow.
|
ActivityImpl |
parseServiceTask(Element serviceTaskElement,
ScopeImpl scope)
Parses a serviceTask declaration.
|
ActivityImpl |
parseServiceTaskLike(String elementName,
Element serviceTaskElement,
ScopeImpl scope) |
protected void |
parseShellServiceTask(ActivityImpl activity,
Element serviceTaskElement,
List<FieldDeclaration> fieldDeclarations) |
protected void |
parseSignalCatchEventDefinition(Element element,
ActivityImpl signalActivity,
boolean isStartEvent) |
protected EventSubscriptionDeclaration |
parseSignalEventDefinition(Element signalEventDefinitionElement) |
protected void |
parseSignals()
Parses the signals of the given definitions file.
|
protected void |
parseStartAuthorization(Element scopeElement,
ProcessDefinition definition) |
void |
parseStartEvents(Element parentElement,
ScopeImpl scope)
Parses the start events of a certain level in the process (process,
subprocess or another scope).
|
protected void |
parseStartFormHandlers(List<Element> startEventElements,
ProcessDefinitionEntity processDefinition) |
protected FieldDeclaration |
parseStringFieldDeclaration(Element fieldDeclarationElement,
Element serviceTaskElement,
String fieldName) |
ActivityImpl |
parseSubProcess(Element subProcessElement,
ScopeImpl scope)
Parses a subprocess (formally known as an embedded subprocess): a
subprocess defined within another process definition.
|
ActivityImpl |
parseTask(Element taskElement,
ScopeImpl scope)
Parses a task with no specific type (behaves as passthrough).
|
TaskDefinition |
parseTaskDefinition(Element taskElement,
String taskDefinitionKey,
ProcessDefinitionEntity processDefinition) |
protected TaskListener |
parseTaskListener(Element taskListenerElement) |
protected void |
parseTaskListeners(Element userTaskElement,
TaskDefinition taskDefinition) |
protected void |
parseTenantId(Element callingActivityElement,
ActivityImpl activity,
BaseCallableElement callableElement,
String attrName) |
protected CompensateEventDefinition |
parseThrowCompensateEventDefinition(Element compensateEventDefinitionElement,
ScopeImpl scopeElement) |
protected TimerDeclarationImpl |
parseTimer(Element timerEventDefinition,
ActivityImpl timerActivity,
String jobHandlerType) |
protected void |
parseTimerStartEventDefinition(Element timerEventDefinition,
ActivityImpl timerActivity,
ProcessDefinitionEntity processDefinition) |
protected void |
parseTimerStartEventDefinitionForEventSubprocess(Element timerEventDefinition,
ActivityImpl timerActivity,
boolean interrupting) |
protected ActivityImpl |
parseTransaction(Element transactionElement,
ScopeImpl scope) |
ActivityImpl |
parseUserTask(Element userTaskElement,
ScopeImpl scope)
Parses a userTask declaration.
|
protected void |
parseUserTaskCustomExtensions(Element taskElement,
TaskDefinition taskDefinition) |
protected void |
parseVersion(Element callingActivityElement,
ActivityImpl activity,
BaseCallableElement callableElement,
String bindingAttributeName,
String versionAttributeName) |
protected void |
removeMessageJobDeclarationWithJobConfiguration(ActivityImpl activity,
String jobConfiguration)
Removes a job declaration which belongs to the given activity and has the given job configuration.
|
protected String |
resolveName(String name) |
protected void |
selectInitial(List<ActivityImpl> startEventActivities,
ProcessDefinitionEntity processDefinition,
Element parentElement) |
protected void |
setActivityAsyncDelegates(ActivityImpl activity)
Sets the delegates for the activity, which will be called
if the attribute asyncAfter or asyncBefore was changed.
|
protected void |
setErrorCodeVariableOnErrorEventDefinition(Element errorEventDefinition,
ErrorEventDefinition definition)
Sets the value for "camunda:errorCodeVariable" on the passed definition if
it's present.
|
protected void |
setErrorMessageVariableOnErrorEventDefinition(Element errorEventDefinition,
ErrorEventDefinition definition)
Sets the value for "camunda:errorMessageVariable" on the passed definition if
it's present.
|
BpmnParse |
sourceInputStream(InputStream inputStream) |
BpmnParse |
sourceResource(String resource) |
BpmnParse |
sourceResource(String resource,
ClassLoader classLoader) |
BpmnParse |
sourceString(String string) |
BpmnParse |
sourceUrl(String url) |
BpmnParse |
sourceUrl(URL url) |
void |
validateActivities(List<ActivityImpl> activities) |
protected void |
validateActivity(ActivityImpl activity) |
protected void |
validateCatchCompensateEventDefinition(Element compensateEventDefinitionElement) |
void |
validateExclusiveGateway(ActivityImpl activity) |
protected void |
validateFieldDeclarationsForEmail(Element serviceTaskElement,
List<FieldDeclaration> fieldDeclarations) |
protected void |
validateFieldDeclarationsForShell(Element serviceTaskElement,
List<FieldDeclaration> fieldDeclarations) |
protected void |
validateOutgoingFlows(ActivityImpl activity) |
addError, addError, addError, addWarning, addWarning, getProblems, getRootElement, hasErrors, hasWarnings, logWarnings, setSchemaResource, setStreamSource, throwExceptionForErrors
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
public static final String MULTI_INSTANCE_BODY_ID_SUFFIX
protected static final BpmnParseLogger LOG
public static final String PROPERTYNAME_DOCUMENTATION
public static final String PROPERTYNAME_INITIATOR_VARIABLE_NAME
public static final String PROPERTYNAME_HAS_CONDITIONAL_EVENTS
public static final String PROPERTYNAME_CONDITION
public static final String PROPERTYNAME_CONDITION_TEXT
public static final String PROPERTYNAME_VARIABLE_DECLARATIONS
public static final String PROPERTYNAME_TIMER_DECLARATION
public static final String PROPERTYNAME_MESSAGE_JOB_DECLARATION
public static final String PROPERTYNAME_ISEXPANDED
public static final String PROPERTYNAME_START_TIMER
public static final String PROPERTYNAME_COMPENSATION_HANDLER_ID
public static final String PROPERTYNAME_IS_FOR_COMPENSATION
public static final String PROPERTYNAME_EVENT_SUBSCRIPTION_JOB_DECLARATION
public static final String PROPERTYNAME_THROWS_COMPENSATION
public static final String PROPERTYNAME_CONSUMES_COMPENSATION
public static final String PROPERTYNAME_JOB_PRIORITY
public static final String PROPERTYNAME_TASK_PRIORITY
public static final String PROPERTYNAME_CLASS
public static final String PROPERTYNAME_EXPRESSION
public static final String PROPERTYNAME_DELEGATE_EXPRESSION
public static final String PROPERTYNAME_VARIABLE_MAPPING_CLASS
public static final String PROPERTYNAME_VARIABLE_MAPPING_DELEGATE_EXPRESSION
public static final String PROPERTYNAME_RESOURCE
public static final String PROPERTYNAME_LANGUAGE
public static final String TYPE
public static final String TRUE
public static final String INTERRUPTING
public static final String CONDITIONAL_EVENT_DEFINITION
public static final String ESCALATION_EVENT_DEFINITION
public static final String COMPENSATE_EVENT_DEFINITION
public static final String TIMER_EVENT_DEFINITION
public static final String SIGNAL_EVENT_DEFINITION
public static final String MESSAGE_EVENT_DEFINITION
public static final String ERROR_EVENT_DEFINITION
public static final String CANCEL_EVENT_DEFINITION
public static final String LINK_EVENT_DEFINITION
public static final String CONDITION_EXPRESSION
public static final String CONDITION
@Deprecated public static final String PROPERTYNAME_TYPE
BpmnProperties.TYPE
@Deprecated public static final String PROPERTYNAME_ERROR_EVENT_DEFINITIONS
BpmnProperties.ERROR_EVENT_DEFINITIONS
protected static final String POTENTIAL_STARTER
protected static final String CANDIDATE_STARTER_USERS_EXTENSION
protected static final String CANDIDATE_STARTER_GROUPS_EXTENSION
protected static final String ATTRIBUTEVALUE_T_FORMAL_EXPRESSION
public static final String PROPERTYNAME_IS_MULTI_INSTANCE
public static final Namespace CAMUNDA_BPMN_EXTENSIONS_NS
public static final Namespace XSI_NS
public static final Namespace BPMN_DI_NS
public static final Namespace OMG_DI_NS
public static final Namespace BPMN_DC_NS
public static final String ALL
protected DeploymentEntity deployment
protected List<ProcessDefinitionEntity> processDefinitions
protected Map<String,Escalation> escalations
protected Map<String,List<JobDeclaration<?,?>>> jobDeclarations
protected Map<String,TransitionImpl> sequenceFlows
protected List<String> elementIds
protected Map<String,String> participantProcesses
protected Map<String,MessageDefinition> messages
protected Map<String,SignalDefinition> signals
protected ExpressionManager expressionManager
protected List<BpmnParseListener> parseListeners
protected Map<String,XMLImporter> importers
protected String targetNamespace
protected static final String HUMAN_PERFORMER
protected static final String POTENTIAL_OWNER
protected static final String RESOURCE_ASSIGNMENT_EXPR
protected static final String FORMAL_EXPRESSION
protected static final String USER_PREFIX
protected static final String GROUP_PREFIX
protected static final String ASSIGNEE_EXTENSION
protected static final String CANDIDATE_USERS_EXTENSION
protected static final String CANDIDATE_GROUPS_EXTENSION
protected static final String DUE_DATE_EXTENSION
protected static final String FOLLOW_UP_DATE_EXTENSION
protected static final String PRIORITY_EXTENSION
public BpmnParse(BpmnParser parser)
BpmnParser
.public BpmnParse deployment(DeploymentEntity deployment)
protected void parseRootElement()
protected void collectElementIds()
protected void parseDefinitionsAttributes()
protected void parseImports()
protected XMLImporter getImporter(String importType, Element theImport)
public void parseMessages()
protected void parseSignals()
public void parseErrors()
protected void parseEscalations()
protected Escalation createEscalation(String id, Element element)
public void parseProcessDefinitions()
public void parseCollaboration()
public ProcessDefinitionEntity parseProcess(Element processElement)
processElement
- The 'process' element.ProcessDefinitionImpl
object.protected void parseHistoryTimeToLive(Element processElement, ProcessDefinitionEntity processDefinition)
protected void parseLaneSets(Element parentElement, ProcessDefinitionEntity processDefinition)
public void parseScope(Element scopeElement, ScopeImpl parentScope)
scopeElement
- The XML element defining the scopeparentScope
- The scope that contains the nested scope.protected HashMap<String,Element> filterIntermediateCatchEvents(List<Element> activityElements)
protected HashMap<String,Element> filterCompensationHandlers(List<Element> activityElements)
protected void parseIntermediateCatchEvents(Element scopeElement, ScopeImpl parentScope, Map<String,Element> intermediateCatchEventElements)
protected void parseProcessDefinitionCustomExtensions(Element scopeElement, ProcessDefinition definition)
protected void parseStartAuthorization(Element scopeElement, ProcessDefinition definition)
protected void parsePotentialStarterResourceAssignment(Element performerElement, ProcessDefinitionEntity processDefinition)
protected void parseAssociations(Element scopeElement, ScopeImpl parentScope, Map<String,Element> compensationHandlers)
protected ActivityImpl parseCompensationHandlerForCompensationBoundaryEvent(ScopeImpl parentScope, ActivityImpl sourceActivity, String targetRef, Map<String,Element> compensationHandlers)
protected void parseAssociationOfCompensationBoundaryEvent(Element associationElement, ActivityImpl sourceActivity, ActivityImpl targetActivity)
protected void parseCompensationHandlers(ScopeImpl parentScope, Map<String,Element> compensationHandlers)
public void parseStartEvents(Element parentElement, ScopeImpl scope)
parentElement
- The 'parent' element that contains the start events (process,
subprocess).scope
- The ScopeImpl
to which the start events must be added.protected void selectInitial(List<ActivityImpl> startEventActivities, ProcessDefinitionEntity processDefinition, Element parentElement)
protected void parseProcessDefinitionStartEvent(ActivityImpl startEventActivity, Element startEventElement, Element parentElement, ScopeImpl scope)
protected void parseStartFormHandlers(List<Element> startEventElements, ProcessDefinitionEntity processDefinition)
protected void parseScopeStartEvent(ActivityImpl startEventActivity, Element startEventElement, Element parentElement, ActivityImpl scopeActivity)
protected void parseCompensationEventSubprocess(ActivityImpl startEventActivity, Element startEventElement, ActivityImpl scopeActivity, Element compensateEventDefinition)
protected void parseErrorStartEventDefinition(Element errorEventDefinition, ActivityImpl startEventActivity)
protected void setErrorCodeVariableOnErrorEventDefinition(Element errorEventDefinition, ErrorEventDefinition definition)
errorEventDefinition
- the XML errorEventDefinition tagdefinition
- the errorEventDefintion that can get the errorCodeVariable valueprotected void setErrorMessageVariableOnErrorEventDefinition(Element errorEventDefinition, ErrorEventDefinition definition)
errorEventDefinition
- the XML errorEventDefinition tagdefinition
- the errorEventDefintion that can get the errorMessageVariable valueprotected EventSubscriptionDeclaration parseMessageEventDefinition(Element messageEventDefinition)
protected void addEventSubscriptionDeclaration(EventSubscriptionDeclaration subscription, ScopeImpl scope, Element element)
protected boolean hasMultipleMessageEventDefinitionsWithSameName(EventSubscriptionDeclaration subscription, Collection<EventSubscriptionDeclaration> eventDefinitions)
protected boolean hasMultipleSignalEventDefinitionsWithSameName(EventSubscriptionDeclaration subscription, Collection<EventSubscriptionDeclaration> eventDefinitions)
protected boolean hasMultipleEventDefinitionsWithSameName(EventSubscriptionDeclaration subscription, Collection<EventSubscriptionDeclaration> eventDefinitions, String eventType)
protected void addEventSubscriptionJobDeclaration(EventSubscriptionJobDeclaration jobDeclaration, ActivityImpl activity, Element element)
protected boolean activityAlreadyContainsJobDeclarationEventType(List<EventSubscriptionJobDeclaration> jobDeclarationsForActivity, EventSubscriptionJobDeclaration jobDeclaration)
public void parseActivities(List<Element> activityElements, Element parentElement, ScopeImpl scopeElement)
activityElements
- The list of activities to be parsed. This list may be filtered before.parentElement
- The 'parent' element that contains the activities (process, subprocess).scopeElement
- The ScopeImpl
to which the activities must be added.protected ActivityImpl parseActivity(Element activityElement, Element parentElement, ScopeImpl scopeElement)
public void validateActivities(List<ActivityImpl> activities)
protected void validateActivity(ActivityImpl activity)
protected void validateOutgoingFlows(ActivityImpl activity)
public void validateExclusiveGateway(ActivityImpl activity)
public ActivityImpl parseIntermediateCatchEvent(Element intermediateEventElement, ScopeImpl scopeElement, ActivityImpl eventBasedGateway)
protected void parseIntermediateLinkEventCatchBehavior(Element intermediateEventElement, ActivityImpl activity, Element linkEventDefinitionElement)
protected void parseIntermediateMessageEventDefinition(Element messageEventDefinition, ActivityImpl nestedActivity)
public ActivityImpl parseIntermediateThrowEvent(Element intermediateEventElement, ScopeImpl scopeElement)
protected CompensateEventDefinition parseThrowCompensateEventDefinition(Element compensateEventDefinitionElement, ScopeImpl scopeElement)
protected void validateCatchCompensateEventDefinition(Element compensateEventDefinitionElement)
protected void parseBoundaryCompensateEventDefinition(Element compensateEventDefinition, ActivityImpl activity)
protected ActivityBehavior parseBoundaryCancelEventDefinition(Element cancelEventDefinition, ActivityImpl activity)
public ScopeImpl parseMultiInstanceLoopCharacteristics(Element activityElement, ScopeImpl scope)
public ActivityImpl createActivityOnScope(Element activityElement, ScopeImpl scopeElement)
ActivityImpl
on the given
scope element.protected void setActivityAsyncDelegates(ActivityImpl activity)
activity
- the activity which gets the delegatesprotected void addMessageJobDeclaration(MessageJobDeclaration messageJobDeclaration, ActivityImpl activity, boolean exclusive)
messageJobDeclaration
- the new message job declarationactivity
- the corresponding activityexclusive
- the flag which indicates if the async should be exclusiveprotected boolean exists(MessageJobDeclaration msgJobdecl, String procDefKey, String activityId)
msgJobdecl
- the message job declaration which is searchedprocDefKey
- the corresponding process definition keyactivityId
- the corresponding activity idprotected void removeMessageJobDeclarationWithJobConfiguration(ActivityImpl activity, String jobConfiguration)
activity
- the activity of the job declarationjobConfiguration
- the job configuration of the declarationprotected boolean isCompensationHandler(Element activityElement)
public ActivityImpl parseExclusiveGateway(Element exclusiveGwElement, ScopeImpl scope)
public ActivityImpl parseInclusiveGateway(Element inclusiveGwElement, ScopeImpl scope)
public ActivityImpl parseEventBasedGateway(Element eventBasedGwElement, Element parentElement, ScopeImpl scope)
public ActivityImpl parseParallelGateway(Element parallelGwElement, ScopeImpl scope)
public ActivityImpl parseScriptTask(Element scriptTaskElement, ScopeImpl scope)
protected ScriptTaskActivityBehavior parseScriptTaskElement(Element scriptTaskElement)
ScriptTaskActivityBehavior
for the script task element
corresponding to the script source or resource specified.scriptTaskElement
- the script task elementScriptTaskActivityBehavior
public ActivityImpl parseServiceTask(Element serviceTaskElement, ScopeImpl scope)
public ActivityImpl parseServiceTaskLike(String elementName, Element serviceTaskElement, ScopeImpl scope)
public ActivityImpl parseBusinessRuleTask(Element businessRuleTaskElement, ScopeImpl scope)
protected ActivityImpl parseDmnBusinessRuleTask(Element businessRuleTaskElement, ScopeImpl scope)
protected DecisionResultMapper parseDecisionResultMapper(Element businessRuleTaskElement)
protected void parseAsynchronousContinuationForActivity(Element activityElement, ActivityImpl activity)
protected void parseAsynchronousContinuation(Element element, ActivityImpl activity)
element
- with async characteristicsactivity
- protected ParameterValueProvider parsePriority(Element element, String priorityAttribute)
protected void addMessageJobDeclarationToActivity(MessageJobDeclaration messageJobDeclaration, ActivityImpl activity)
protected void addJobDeclarationToProcessDefinition(JobDeclaration<?,?> jobDeclaration, ProcessDefinition processDefinition)
public ActivityImpl parseSendTask(Element sendTaskElement, ScopeImpl scope)
protected void parseEmailServiceTask(ActivityImpl activity, Element serviceTaskElement, List<FieldDeclaration> fieldDeclarations)
protected void parseShellServiceTask(ActivityImpl activity, Element serviceTaskElement, List<FieldDeclaration> fieldDeclarations)
protected void parseExternalServiceTask(ActivityImpl activity, Element serviceTaskElement)
protected void validateFieldDeclarationsForEmail(Element serviceTaskElement, List<FieldDeclaration> fieldDeclarations)
protected void validateFieldDeclarationsForShell(Element serviceTaskElement, List<FieldDeclaration> fieldDeclarations)
public List<FieldDeclaration> parseFieldDeclarations(Element element)
protected FieldDeclaration parseFieldDeclaration(Element serviceTaskElement, Element fieldDeclarationElement)
protected FieldDeclaration parseStringFieldDeclaration(Element fieldDeclarationElement, Element serviceTaskElement, String fieldName)
protected FieldDeclaration parseExpressionFieldDeclaration(Element fieldDeclarationElement, Element serviceTaskElement, String fieldName)
protected String getStringValueFromAttributeOrElement(String attributeName, String elementName, Element element)
public ActivityImpl parseTask(Element taskElement, ScopeImpl scope)
public ActivityImpl parseManualTask(Element manualTaskElement, ScopeImpl scope)
public ActivityImpl parseReceiveTask(Element receiveTaskElement, ScopeImpl scope)
public ActivityImpl parseUserTask(Element userTaskElement, ScopeImpl scope)
public TaskDefinition parseTaskDefinition(Element taskElement, String taskDefinitionKey, ProcessDefinitionEntity processDefinition)
protected void parseHumanPerformer(Element taskElement, TaskDefinition taskDefinition)
protected void parsePotentialOwner(Element taskElement, TaskDefinition taskDefinition)
protected void parseHumanPerformerResourceAssignment(Element performerElement, TaskDefinition taskDefinition)
protected void parsePotentialOwnerResourceAssignment(Element performerElement, TaskDefinition taskDefinition)
protected void parseUserTaskCustomExtensions(Element taskElement, TaskDefinition taskDefinition)
protected List<String> parseCommaSeparatedList(String s)
protected void parseTaskListeners(Element userTaskElement, TaskDefinition taskDefinition)
protected TaskListener parseTaskListener(Element taskListenerElement)
public void parseEndEvents(Element parentElement, ScopeImpl scope)
parentElement
- The 'parent' element that contains the end events (process,
subprocess).scope
- The ScopeImpl
to which the end events must be added.public void parseBoundaryEvents(Element parentElement, ScopeImpl flowScope)
parentElement
- The 'parent' element that contains the activities (process,
subprocess).flowScope
- The ScopeImpl
to which the activities must be added.protected ActivityImpl getMultiInstanceScope(ActivityImpl activity)
public void parseBoundaryTimerEventDefinition(Element timerEventDefinition, boolean interrupting, ActivityImpl boundaryActivity)
ActivityBehavior
.timerEventDefinition
- The XML element corresponding with the timer event detailsinterrupting
- Indicates whether this timer is interrupting.boundaryActivity
- The activity which maps to the structure of the timer event on the
boundary of another activity. Note that this is NOT the activity
onto which the boundary event is attached, but a nested activity
inside this activity, specifically created for this event.public void parseBoundarySignalEventDefinition(Element element, boolean interrupting, ActivityImpl signalActivity)
public void parseBoundaryMessageEventDefinition(Element element, boolean interrupting, ActivityImpl messageActivity)
protected void parseTimerStartEventDefinition(Element timerEventDefinition, ActivityImpl timerActivity, ProcessDefinitionEntity processDefinition)
protected void parseTimerStartEventDefinitionForEventSubprocess(Element timerEventDefinition, ActivityImpl timerActivity, boolean interrupting)
protected void parseEventDefinitionForSubprocess(EventSubscriptionDeclaration subscriptionDeclaration, ActivityImpl activity, Element element)
protected void parseIntermediateSignalEventDefinition(Element element, ActivityImpl signalActivity)
protected void parseSignalCatchEventDefinition(Element element, ActivityImpl signalActivity, boolean isStartEvent)
protected EventSubscriptionDeclaration parseSignalEventDefinition(Element signalEventDefinitionElement)
protected void parseIntermediateTimerEventDefinition(Element timerEventDefinition, ActivityImpl timerActivity)
protected TimerDeclarationImpl parseTimer(Element timerEventDefinition, ActivityImpl timerActivity, String jobHandlerType)
protected Expression parseExpression(Element parent, String name)
public void parseBoundaryErrorEventDefinition(Element errorEventDefinition, ActivityImpl boundaryEventActivity)
protected void addErrorEventDefinition(ErrorEventDefinition errorEventDefinition, ScopeImpl catchingScope)
protected void parseBoundaryEscalationEventDefinition(Element escalationEventDefinitionElement, boolean cancelActivity, ActivityImpl boundaryEventActivity)
protected Escalation findEscalationForEscalationEventDefinition(Element escalationEventDefinition)
null
, if referenced escalation not foundprotected EscalationEventDefinition createEscalationEventDefinitionForEscalationHandler(Element escalationEventDefinitionElement, ActivityImpl escalationHandler, boolean cancelActivity)
protected void addEscalationEventDefinition(ScopeImpl catchingScope, EscalationEventDefinition escalationEventDefinition, Element element)
protected void addTimerDeclaration(ScopeImpl scope, TimerDeclarationImpl timerDeclaration)
protected void addVariableDeclaration(ScopeImpl scope, VariableDeclaration variableDeclaration)
public BoundaryConditionalEventActivityBehavior parseBoundaryConditionalEventDefinition(Element element, boolean interrupting, ActivityImpl conditionalActivity)
element
- the XML element which contains the conditional event informationinterrupting
- indicates if the event is interrupting or notconditionalActivity
- the conditional event activitypublic ConditionalEventDefinition parseIntermediateConditionalEventDefinition(Element element, ActivityImpl conditionalActivity)
element
- the XML element which contains the conditional event informationconditionalActivity
- the conditional event activitypublic ConditionalEventDefinition parseConditionalStartEventForEventSubprocess(Element element, ActivityImpl conditionalActivity, boolean interrupting)
element
- the XML element which contains the conditional event informationinterrupting
- indicates if the event is interrupting or notconditionalActivity
- the conditional event activityprotected ConditionalEventDefinition parseConditionalEventDefinition(Element element, ActivityImpl conditionalActivity)
element
- the XML element which contains the conditional event informationconditionalActivity
- the conditional event activitypublic ActivityImpl parseSubProcess(Element subProcessElement, ScopeImpl scope)
subProcessElement
- The XML element corresponding with the subprocess definitionscope
- The current scope on which the subprocess is defined.protected ActivityImpl parseTransaction(Element transactionElement, ScopeImpl scope)
public ActivityImpl parseCallActivity(Element callActivityElement, ScopeImpl scope, boolean isMultiInstance)
callActivityElement
- The XML element defining the call activityscope
- The current scope on which the call activity is defined.protected void parseBinding(Element callActivityElement, ActivityImpl activity, BaseCallableElement callableElement, String bindingAttributeName)
protected void parseTenantId(Element callingActivityElement, ActivityImpl activity, BaseCallableElement callableElement, String attrName)
protected void parseVersion(Element callingActivityElement, ActivityImpl activity, BaseCallableElement callableElement, String bindingAttributeName, String versionAttributeName)
protected void parseInputParameter(Element callActivityElement, ActivityImpl activity, CallableElement callableElement)
protected void parseOutputParameter(Element callActivityElement, ActivityImpl activity, CallableElement callableElement)
protected boolean attributeValueEquals(Element element, String attribute, String comparisonValue)
protected CallableElementParameter parseCallableElementProvider(Element parameterElement)
public void parseProperties(Element element, ActivityImpl activity)
element
- The element that can contain properties.activity
- The activity where the property declaration is done.public void parseProperty(Element propertyElement, ActivityImpl activity)
propertyElement
- The 'property' element that defines how a property looks like and
is handled.public void parsePropertyCustomExtensions(ActivityImpl activity, Element propertyElement, String propertyName, String propertyType)
activity
- The activity where the property declaration is done.propertyElement
- The 'property' element defining the property.propertyName
- The name of the property.propertyType
- The type of the property.public void parseSequenceFlow(Element processElement, ScopeImpl scope, Map<String,Element> compensationHandlers)
processElement
- The 'process' element wherein the sequence flow are defined.scope
- The scope to which the sequence flow must be added.compensationHandlers
- public void parseSequenceFlowConditionExpression(Element seqFlowElement, TransitionImpl seqFlow)
seqFlowElement
- The 'sequenceFlow' element that can contain a condition.seqFlow
- The sequenceFlow object representation to which the condition must
be added.public void parseExecutionListenersOnScope(Element scopeElement, ScopeImpl scope)
scopeElement
- the XML element containing the scope definition.scope
- the scope to add the executionListeners to.protected boolean isValidEventNameForScope(String eventName, Element listenerElement)
public void parseExecutionListenersOnTransition(Element activitiElement, TransitionImpl activity)
public ExecutionListener parseExecutionListener(Element executionListenerElement)
ExecutionListener
implementation for the given
executionListener element.executionListenerElement
- the XML element containing the executionListener definition.public void parseDiagramInterchangeElements()
public void parseBPMNDiagram(Element bpmndiagramElement)
public void parseBPMNPlane(Element bpmnPlaneElement)
public void parseBPMNShape(Element bpmnShapeElement)
protected void parseDIBounds(Element bpmnShapeElement, HasDIBounds target)
public void parseBPMNEdge(Element bpmnEdgeElement)
public List<ProcessDefinitionEntity> getProcessDefinitions()
public ProcessDefinitionEntity getProcessDefinition(String processDefinitionKey)
public BpmnParse sourceInputStream(InputStream inputStream)
sourceInputStream
in class Parse
public BpmnParse sourceResource(String resource, ClassLoader classLoader)
sourceResource
in class Parse
public BpmnParse sourceResource(String resource)
sourceResource
in class Parse
public BpmnParse sourceString(String string)
sourceString
in class Parse
public Boolean parseBooleanAttribute(String booleanText, boolean defaultValue)
public Double parseDoubleAttribute(Element element, String attributeName, String doubleText, boolean required)
public Integer parseIntegerAttribute(Element element, String attributeName, String integerText, boolean required)
protected boolean isExclusive(Element element)
protected boolean isAsyncBefore(Element element)
protected boolean isAsyncAfter(Element element)
protected boolean isServiceTaskLike(Element element)
protected boolean hasConnector(Element element)
public Map<String,List<JobDeclaration<?,?>>> getJobDeclarations()
public List<JobDeclaration<?,?>> getJobDeclarationsByKey(String processDefinitionKey)
protected void parseActivityInputOutput(Element activityElement, ActivityImpl activity)
protected boolean checkActivityInputOutputSupported(Element activityElement, ActivityImpl activity, IoMapping inputOutput)
protected boolean checkActivityOutputParameterSupported(Element activityElement, ActivityImpl activity)
protected void ensureNoIoMappingDefined(Element element)
protected ParameterValueProvider createParameterValueProvider(Object value, ExpressionManager expressionManager)
protected void ensureNoExpressionInMessageStartEvent(Element element, EventSubscriptionDeclaration messageStartEventSubscriptionDeclaration)
Copyright © 2018. All rights reserved.