}
public void perform(ExecutionImpl execution) {
ActivityImpl activity = execution.getActivity();
ExecutionImpl propagatingExecution = execution;
if (activity.isLocalScope()) {
propagatingExecution = execution.destroyScope(activity);
}
ActivityImpl parentActivity = activity.getParentActivity();
ActivityImpl destination = execution.getTransition().getDestination();
if ( (parentActivity!=null)
&& (!parentActivity.contains(destination))
) {
propagatingExecution.setActivity(parentActivity);
propagatingExecution.fire(Event.END, parentActivity, AtomicOperation.TRANSITION_END_ACTIVITY);
} else {
propagatingExecution.performAtomicOperation(AtomicOperation.TRANSITION_TAKE);
}
}