@Override public void afterPlay(ReqContext context) { super.afterPlay(context); ScenarioSpec spec = getClass().getAnnotation(ScenarioSpec.class); if (spec == null) { throw new ReqPlayException( "Scenarios must be annotated with @ScenarioSpec: " + getClass().getCanonicalName()); } feature = (Feature) context.getAsFeature(spec.feature()); if (actorClass != null) { primaryActor = (Actor) context.getAsActor(actorClass); } for (Class<?> c : actorClasses) { actors.add((Actor) context.getAsActor(c)); } mainFlow.afterPlay(context); if (!alternativeFlows.isEmpty()) { for (AlternativeFlow flow : alternativeFlows) { flow.afterPlay(context); } } if (!exceptionFlows.isEmpty()) { for (ExceptionFlow flow : exceptionFlows) { flow.afterPlay(context); } } if (!extensionPoints.isEmpty()) { for (ExtensionPoint ep : extensionPoints) { ep.afterPlay(context); } } }