use of org.camunda.bpm.engine.impl.pvm.PvmScope in project camunda-bpm-platform by camunda.
the class DefaultHistoryEventProducer method initActivityInstanceEvent.
protected void initActivityInstanceEvent(HistoricActivityInstanceEventEntity evt, MigratingActivityInstance migratingActivityInstance, HistoryEventType eventType) {
PvmScope eventSource = migratingActivityInstance.getTargetScope();
String activityInstanceId = migratingActivityInstance.getActivityInstanceId();
MigratingActivityInstance parentInstance = migratingActivityInstance.getParent();
String parentActivityInstanceId = null;
if (parentInstance != null) {
parentActivityInstanceId = parentInstance.getActivityInstanceId();
}
ExecutionEntity execution = migratingActivityInstance.resolveRepresentativeExecution();
initActivityInstanceEvent(evt, execution, eventSource, activityInstanceId, parentActivityInstanceId, eventType);
}
use of org.camunda.bpm.engine.impl.pvm.PvmScope in project camunda-bpm-platform by camunda.
the class LegacyBehavior method isLegacyBehaviorRequired.
/**
* This method
* @param scopeExecution
* @param isLegacyBehaviorTurnedOff
* @return
*/
protected static boolean isLegacyBehaviorRequired(ActivityExecution scopeExecution) {
// legacy behavior is turned off: the current activity was parsed as scope.
// now we need to check whether a scope execution was correctly created for the
// event subprocess.
// first create the mapping:
Map<ScopeImpl, PvmExecutionImpl> activityExecutionMapping = scopeExecution.createActivityExecutionMapping();
// if the scope execution for the current activity is the same as for the parent scope
// -> we need to perform legacy behavior
PvmScope activity = scopeExecution.getActivity();
if (!activity.isScope()) {
activity = activity.getFlowScope();
}
return activityExecutionMapping.get(activity) == activityExecutionMapping.get(activity.getFlowScope());
}
Aggregations