// set the scope execution to the terminate end event and make it end here.
// (the history should reflect that the execution ended here and we want an 'end time' for the
// historic activity instance.)
((InterpretableExecution)scopeExecution).setActivity((ActivityImpl) terminateEndEventActivity);
// end the scope execution
scopeExecution.end();
}
// If we use this implementation, we run into trouble in the DbSqlSession, see ACT-1382