本文整理汇总了Java中org.camunda.bpm.engine.impl.pvm.process.ScopeImpl.getActivityBehavior方法的典型用法代码示例。如果您正苦于以下问题:Java ScopeImpl.getActivityBehavior方法的具体用法?Java ScopeImpl.getActivityBehavior怎么用?Java ScopeImpl.getActivityBehavior使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.camunda.bpm.engine.impl.pvm.process.ScopeImpl
的用法示例。
在下文中一共展示了ScopeImpl.getActivityBehavior方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isCompensationThrowing
import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入方法依赖的package包/类
/**
* Returns true if the given execution is in a compensation-throwing activity but there is no dedicated scope execution
* in the given mapping.
*/
public static boolean isCompensationThrowing(PvmExecutionImpl execution, Map<ScopeImpl, PvmExecutionImpl> activityExecutionMapping) {
if (CompensationBehavior.isCompensationThrowing(execution)) {
ScopeImpl compensationThrowingActivity = execution.getActivity();
if (compensationThrowingActivity.isScope()) {
return activityExecutionMapping.get(compensationThrowingActivity) ==
activityExecutionMapping.get(compensationThrowingActivity.getFlowScope());
}
else {
// for transaction sub processes with cancel end events, the compensation throwing execution waits in the boundary event, not in the end
// event; cancel boundary events are currently not scope
return compensationThrowingActivity.getActivityBehavior() instanceof CancelBoundaryEventActivityBehavior;
}
}
else {
return false;
}
}
示例2: handleChildRemovalInScope
import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入方法依赖的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();
}
}
}
示例3: isMiBody
import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入方法依赖的package包/类
protected boolean isMiBody(ScopeImpl scope) {
return scope.getActivityBehavior() instanceof MultiInstanceActivityBehavior;
}
示例4: isMultiInstance
import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入方法依赖的package包/类
protected boolean isMultiInstance(ScopeImpl flowScope) {
return flowScope.getActivityBehavior() instanceof MultiInstanceActivityBehavior;
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:4,代码来源:CannotRemoveMultiInstanceInnerActivityValidator.java
示例5: isMultiInstance
import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入方法依赖的package包/类
protected boolean isMultiInstance(ScopeImpl scope) {
return scope.getActivityBehavior() instanceof MultiInstanceActivityBehavior;
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:4,代码来源:CannotAddMultiInstanceInnerActivityValidator.java
示例6: handle
import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入方法依赖的package包/类
@Override
public void handle(MigratingInstanceParseContext parseContext, ActivityInstance element) {
MigratingActivityInstance migratingInstance = null;
MigrationInstruction applyingInstruction = parseContext.getInstructionFor(element.getActivityId());
ScopeImpl sourceScope = null;
ScopeImpl targetScope = null;
ExecutionEntity representativeExecution = parseContext.getMapping().getExecution(element);
if (element.getId().equals(element.getProcessInstanceId())) {
sourceScope = parseContext.getSourceProcessDefinition();
targetScope = parseContext.getTargetProcessDefinition();
}
else {
sourceScope = parseContext.getSourceProcessDefinition().findActivity(element.getActivityId());
if (applyingInstruction != null) {
String activityId = applyingInstruction.getTargetActivityId();
targetScope = parseContext.getTargetProcessDefinition().findActivity(activityId);
}
}
migratingInstance = parseContext.getMigratingProcessInstance()
.addActivityInstance(
applyingInstruction,
element,
sourceScope,
targetScope,
representativeExecution);
MigratingActivityInstance parentInstance = parseContext.getMigratingActivityInstanceById(element.getParentActivityInstanceId());
if (parentInstance != null) {
migratingInstance.setParent(parentInstance);
}
CoreActivityBehavior<?> sourceActivityBehavior = sourceScope.getActivityBehavior();
if (sourceActivityBehavior instanceof MigrationObserverBehavior) {
((MigrationObserverBehavior) sourceActivityBehavior).onParseMigratingInstance(parseContext, migratingInstance);
}
parseContext.submit(migratingInstance);
parseTransitionInstances(parseContext, migratingInstance);
parseDependentInstances(parseContext, migratingInstance);
}
示例7: supportsConcurrentChildInstantiation
import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; //导入方法依赖的package包/类
/**
* Cannot create more than inner instance in a sequential MI construct
*/
protected boolean supportsConcurrentChildInstantiation(ScopeImpl flowScope) {
CoreActivityBehavior<?> behavior = flowScope.getActivityBehavior();
return behavior == null || !(behavior instanceof SequentialMultiInstanceActivityBehavior);
}