public class LegacyBehavior extends Object
Since 7.3 the behavior of certain bpmn elements has changed slightly.
1. Some elements which did not used to be scopes are now scopes:
Constructor and Description |
---|
LegacyBehavior() |
Modifier and Type | Method and Description |
---|---|
protected static boolean |
areEqualEventSubscriptions(EventSubscriptionEntity subscription1,
EventSubscriptionEntity subscription2)
Checks if the parameters are the same apart from the execution id
|
static void |
cancelConcurrentScope(PvmExecutionImpl execution,
PvmActivity cancelledScopeActivity)
Cancels an execution which is both concurrent and scope.
|
static Map<ScopeImpl,PvmExecutionImpl> |
createActivityExecutionMapping(List<PvmExecutionImpl> scopeExecutions,
List<ScopeImpl> scopes)
Creates an activity execution mapping, when the scope hierarchy and the execution hierarchy are out of sync.
|
static void |
destroyConcurrentScope(PvmExecutionImpl execution)
Destroys a concurrent scope Execution.
|
static boolean |
destroySecondNonScope(PvmExecutionImpl execution)
Destroy an execution for an activity that was previously not a scope and now is
(e.g.
|
static PvmExecutionImpl |
determinePropagatingExecutionOnEnd(PvmExecutionImpl propagatingExecution)
Tolerates the broken execution trees fixed with CAM-3727 where there may be more
ancestor scope executions than ancestor flow scopes;
In that case, the argument execution is removed, the parent execution of the argument
is returned such that one level of mismatch is corrected.
|
protected static void |
ensureConcurrent(PvmExecutionImpl execution) |
protected static void |
ensureConcurrentScope(PvmExecutionImpl execution) |
protected static void |
ensureScope(PvmExecutionImpl execution) |
static boolean |
eventSubprocessComplete(ActivityExecution scopeExecution) |
static boolean |
eventSubprocessConcurrentChildExecutionEnded(ActivityExecution scopeExecution,
ActivityExecution endedExecution) |
static PvmExecutionImpl |
getScopeExecution(ScopeImpl scope,
Map<ScopeImpl,PvmExecutionImpl> activityExecutionMapping)
In case the process instance was migrated from a previous version, activities which are now parsed as scopes
do not have scope executions.
|
static boolean |
isConcurrentScope(PvmExecutionImpl propagatingExecution)
Concurrent + scope executions are legacy and could occur in processes with non-interrupting
boundary events or event subprocesses
|
protected static boolean |
isLegacyAsyncAtMultiInstance(PvmExecutionImpl execution)
This returns true only if the provided execution has reached its wait state in a legacy engine version, because
only in that case, it can be async and waiting at the inner activity wrapped by the miBody.
|
protected static boolean |
isLegacyBehaviorRequired(ActivityExecution scopeExecution)
This method
|
static void |
migrateMultiInstanceJobDefinitions(ProcessDefinitionEntity processDefinition,
List<JobDefinitionEntity> jobDefinitions) |
static void |
parseCancelBoundaryEvent(ActivityImpl activity) |
static void |
pruneConcurrentScope(PvmExecutionImpl execution)
Prunes a concurrent scope.
|
static void |
removeLegacyNonScopesFromMapping(Map<ScopeImpl,PvmExecutionImpl> mapping)
Remove all entries for legacy non-scopes given that the assigned scope execution is also responsible for another scope
|
static void |
removeLegacySubscriptionOnParent(ExecutionEntity execution,
EventSubscriptionEntity eventSubscription)
Required for migrating active sequential MI receive tasks.
|
static void |
repairMultiInstanceAsyncJob(ExecutionEntity execution)
When executing an async job for an activity wrapped in an miBody, set the execution to the
miBody.
|
static void |
repairParentRelationships(Collection<ActivityInstanceImpl> values,
String processInstanceId)
This is relevant for
GetActivityInstanceCmd where in case of legacy multi-instance execution trees, the default
algorithm omits multi-instance activity instances. |
static boolean |
signalCancelBoundaryEvent(String signalName)
With prior versions, the boundary event was already executed when compensation was performed; Thus, after
compensation completes, the execution is signalled waiting at the boundary event.
|
protected static <T> boolean |
valuesEqual(T value1,
T value2) |
protected static boolean |
wasNoScope(ActivityImpl activity)
Determines whether the given scope was a scope (boolean flag isScope)
when used as a multi-instance activity
|
public static void pruneConcurrentScope(PvmExecutionImpl execution)
#createConcurrentScope(PvmExecutionImpl)
.
See: javadoc of this class for note about concurrent scopes.execution
- public static void cancelConcurrentScope(PvmExecutionImpl execution, PvmActivity cancelledScopeActivity)
execution
- the concurrent scope execution to destroycancellingActivity
- the activity that cancels the execution; it must hold that
cancellingActivity's event scope is the scope the execution is responsible forpublic static void destroyConcurrentScope(PvmExecutionImpl execution)
execution
- the execution to destroypublic static boolean eventSubprocessComplete(ActivityExecution scopeExecution)
public static boolean eventSubprocessConcurrentChildExecutionEnded(ActivityExecution scopeExecution, ActivityExecution endedExecution)
public static boolean destroySecondNonScope(PvmExecutionImpl execution)
protected static boolean isLegacyBehaviorRequired(ActivityExecution scopeExecution)
scopeExecution
- isLegacyBehaviorTurnedOff
- public static PvmExecutionImpl getScopeExecution(ScopeImpl scope, Map<ScopeImpl,PvmExecutionImpl> activityExecutionMapping)
targetScope
- activityExecutionMapping
- protected static void ensureConcurrentScope(PvmExecutionImpl execution)
protected static void ensureConcurrent(PvmExecutionImpl execution)
protected static void ensureScope(PvmExecutionImpl execution)
public static Map<ScopeImpl,PvmExecutionImpl> createActivityExecutionMapping(List<PvmExecutionImpl> scopeExecutions, List<ScopeImpl> scopes)
scopeExecutions
- scopes
- protected static boolean wasNoScope(ActivityImpl activity)
protected static boolean isLegacyAsyncAtMultiInstance(PvmExecutionImpl execution)
public static PvmExecutionImpl determinePropagatingExecutionOnEnd(PvmExecutionImpl propagatingExecution)
public static boolean isConcurrentScope(PvmExecutionImpl propagatingExecution)
public static void removeLegacySubscriptionOnParent(ExecutionEntity execution, EventSubscriptionEntity eventSubscription)
Required for migrating active sequential MI receive tasks. These activities were formerly not scope, but are now. This has the following implications:
Before migration:
After migration:
Thus, this method removes the subscription on the miBody scope
protected static boolean areEqualEventSubscriptions(EventSubscriptionEntity subscription1, EventSubscriptionEntity subscription2)
protected static <T> boolean valuesEqual(T value1, T value2)
public static void removeLegacyNonScopesFromMapping(Map<ScopeImpl,PvmExecutionImpl> mapping)
public static void repairParentRelationships(Collection<ActivityInstanceImpl> values, String processInstanceId)
GetActivityInstanceCmd
where in case of legacy multi-instance execution trees, the default
algorithm omits multi-instance activity instances.public static void migrateMultiInstanceJobDefinitions(ProcessDefinitionEntity processDefinition, List<JobDefinitionEntity> jobDefinitions)
public static void repairMultiInstanceAsyncJob(ExecutionEntity execution)
public static boolean signalCancelBoundaryEvent(String signalName)
public static void parseCancelBoundaryEvent(ActivityImpl activity)
signalCancelBoundaryEvent(String)
Copyright © 2018. All rights reserved.