}
// events
QName name = invocation.getName();
Serializable payload = invocation.getPayload();
Event event = WSRPTypeFactory.createEvent(name, payload);
EventParams eventParams = WSRPTypeFactory.createEventParams(Collections.singletonList(event), WSRPUtils.getStateChangeFromAccessMode(accessMode));
eventParams.getExtensions().addAll(ExtensionAccess.getConsumerExtensionAccessor().getRequestExtensionsFor(EventParams.class));
return WSRPTypeFactory.createHandleEvents(requestPrecursor.getRegistrationContext(), portletContext,
requestPrecursor.getRuntimeContext(), requestPrecursor.getUserContext(), requestPrecursor.getMarkupParams(), eventParams);