本文整理汇总了Java中org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.isConcurrent方法的典型用法代码示例。如果您正苦于以下问题:Java ExecutionEntity.isConcurrent方法的具体用法?Java ExecutionEntity.isConcurrent怎么用?Java ExecutionEntity.isConcurrent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
的用法示例。
在下文中一共展示了ExecutionEntity.isConcurrent方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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));
}
}
示例2: collectTransitionInstanceVariables
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
protected List<VariableInstanceEntity> collectTransitionInstanceVariables(MigratingTransitionInstance instance) {
List<VariableInstanceEntity> variables = new ArrayList<VariableInstanceEntity>();
ExecutionEntity representativeExecution = instance.resolveRepresentativeExecution();
if (representativeExecution.isConcurrent()) {
variables.addAll(representativeExecution.getVariablesInternal());
}
else {
variables.addAll(ActivityInstanceHandler.getConcurrentLocalVariables(representativeExecution));
}
return variables;
}
示例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: 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);
}
示例5: destroyAttachableExecution
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
@Override
public void destroyAttachableExecution(ExecutionEntity execution) {
if (currentScope.getActivityBehavior() instanceof ModificationObserverBehavior) {
ModificationObserverBehavior behavior = (ModificationObserverBehavior) currentScope.getActivityBehavior();
behavior.destroyInnerInstance(execution);
}
else {
if (execution.isConcurrent()) {
execution.remove();
execution.getParent().tryPruneLastConcurrentChild();
execution.getParent().forceUpdate();
}
}
}
示例6: 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();
}
}
}