本文整理汇总了Java中org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.getParent方法的典型用法代码示例。如果您正苦于以下问题:Java ExecutionEntity.getParent方法的具体用法?Java ExecutionEntity.getParent怎么用?Java ExecutionEntity.getParent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
的用法示例。
在下文中一共展示了ExecutionEntity.getParent方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initActivityInstanceEvent
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
protected void initActivityInstanceEvent(HistoricActivityInstanceEventEntity evt, ExecutionEntity execution, HistoryEventType eventType) {
PvmScope eventSource = execution.getActivity();
if (eventSource == null) {
eventSource = (PvmScope) execution.getEventSource();
}
String activityInstanceId = execution.getActivityInstanceId();
String parentActivityInstanceId = null;
ExecutionEntity parentExecution = execution.getParent();
if (parentExecution != null && CompensationBehavior.isCompensationThrowing(parentExecution) && execution.getActivity() != null) {
parentActivityInstanceId = CompensationBehavior.getParentActivityInstanceId(execution);
} else {
parentActivityInstanceId = execution.getParentActivityInstanceId();
}
initActivityInstanceEvent(evt,
execution,
eventSource,
activityInstanceId,
parentActivityInstanceId,
eventType);
}
示例2: handle
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
@Override
public void handle(MigratingInstanceParseContext parseContext, MigratingProcessElementInstance owningInstance, List<VariableInstanceEntity> variables) {
ExecutionEntity representativeExecution = owningInstance.resolveRepresentativeExecution();
for (VariableInstanceEntity variable : variables) {
parseContext.consume(variable);
boolean isConcurrentLocalInParentScope =
(variable.getExecution() == representativeExecution.getParent() && variable.isConcurrentLocal())
|| representativeExecution.isConcurrent();
owningInstance.addMigratingDependentInstance(new MigratingVariableInstance(variable, isConcurrentLocalInParentScope));
}
}
示例3: collectActivityInstanceVariables
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
protected List<VariableInstanceEntity> collectActivityInstanceVariables(MigratingActivityInstance instance) {
List<VariableInstanceEntity> variables = new ArrayList<VariableInstanceEntity>();
ExecutionEntity representativeExecution = instance.resolveRepresentativeExecution();
ExecutionEntity parentExecution = representativeExecution.getParent();
// decide for representative execution and parent execution whether to none/all/concurrentLocal variables
// belong to this activity instance
boolean addAllRepresentativeExecutionVariables = instance.getSourceScope().isScope()
|| representativeExecution.isConcurrent();
if (addAllRepresentativeExecutionVariables) {
variables.addAll(representativeExecution.getVariablesInternal());
}
else {
variables.addAll(getConcurrentLocalVariables(representativeExecution));
}
boolean addAnyParentExecutionVariables = parentExecution != null && instance.getSourceScope().isScope();
if (addAnyParentExecutionVariables) {
boolean addAllParentExecutionVariables = parentExecution.isConcurrent();
if (addAllParentExecutionVariables) {
variables.addAll(parentExecution.getVariablesInternal());
}
else {
variables.addAll(getConcurrentLocalVariables(parentExecution));
}
}
return variables;
}
示例4: attachState
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
@Override
public void attachState(MigratingScopeInstance owningActivityInstance) {
ExecutionEntity representativeExecution = owningActivityInstance.resolveRepresentativeExecution();
ScopeImpl currentScope = owningActivityInstance.getCurrentScope();
ExecutionEntity newOwningExecution = representativeExecution;
if (currentScope.isScope() && isConcurrentLocalInParentScope) {
newOwningExecution = representativeExecution.getParent();
}
newOwningExecution.addVariableInternal(variable);
}
示例5: detachState
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
@Override
public void detachState() {
ExecutionEntity currentScopeExecution = resolveRepresentativeExecution();
ExecutionEntity parentExecution = currentScopeExecution.getParent();
currentScopeExecution.setParent(null);
if (sourceScope.getActivityBehavior() instanceof CompositeActivityBehavior) {
parentExecution.leaveActivityInstance();
}
getParent().destroyAttachableExecution(parentExecution);
}
示例6: migrateState
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
@Override
public void migrateState() {
ExecutionEntity currentScopeExecution = resolveRepresentativeExecution();
currentScopeExecution.setProcessDefinition(targetScope.getProcessDefinition());
ExecutionEntity parentExecution = currentScopeExecution.getParent();
if (parentExecution != null && parentExecution.isConcurrent()) {
parentExecution.setProcessDefinition(targetScope.getProcessDefinition());
}
currentScope = targetScope;
if (!targetScope.isScope()) {
becomeNonScope();
currentScopeExecution = resolveRepresentativeExecution();
}
if (isLeafActivity(targetScope)) {
currentScopeExecution.setActivity((PvmActivity) targetScope);
}
if (sourceScope.getActivityBehavior() instanceof MigrationObserverBehavior) {
((MigrationObserverBehavior) sourceScope.getActivityBehavior()).migrateScope(currentScopeExecution);
}
migrateHistory(currentScopeExecution);
}
示例7: handleChildRemovalInScope
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
protected void handleChildRemovalInScope(ExecutionEntity removedExecution) {
// TODO: the following should be closer to PvmAtomicOperationDeleteCascadeFireActivityEnd
// (note though that e.g. boundary events expect concurrent executions to be preserved)
//
// Idea: attempting to prune and synchronize on the parent is the default behavior when
// a concurrent child is removed, but scope activities implementing ModificationObserverBehavior
// override this default (and therefore *must* take care of reorganization themselves)
// notify the behavior that a concurrent execution has been removed
// must be set due to deleteCascade behavior
ActivityImpl activity = removedExecution.getActivity();
if (activity == null) {
return;
}
ScopeImpl flowScope = activity.getFlowScope();
PvmExecutionImpl scopeExecution = removedExecution.getParentScopeExecution(false);
PvmExecutionImpl executionInParentScope = removedExecution.isConcurrent() ? removedExecution : removedExecution.getParent();
if (flowScope.getActivityBehavior() != null && flowScope.getActivityBehavior() instanceof ModificationObserverBehavior) {
// let child removal be handled by the scope itself
ModificationObserverBehavior behavior = (ModificationObserverBehavior) flowScope.getActivityBehavior();
behavior.destroyInnerInstance(executionInParentScope);
}
else {
if (executionInParentScope.isConcurrent()) {
executionInParentScope.remove();
scopeExecution.tryPruneLastConcurrentChild();
scopeExecution.forceUpdate();
}
}
}
示例8: addEventToScopeExecution
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
protected void addEventToScopeExecution(ExecutionEntity sourceScope, VariableEvent event) {
// ignore events of variables that are not set in an execution
ExecutionEntity sourceExecution = sourceScope;
ExecutionEntity scopeExecution = sourceExecution.isScope() ? sourceExecution : sourceExecution.getParent();
scopeExecution.delayEvent((ExecutionEntity) targetScope, event);
}
示例9: isDetached
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
@Override
public boolean isDetached() {
ExecutionEntity representativeExecution = resolveRepresentativeExecution();
return representativeExecution != representativeExecution.getProcessInstance()
&& representativeExecution.getParent() == null;
}