@Override
public void run(final EffectiveSubscriptionInternalEvent event) {
try {
if (event.getTransitionType() == SubscriptionBaseTransitionType.UNCANCEL ||
event.getRemainingEventsForUserOperation() > 0) {
return;
}
final InternalCallContext context = internalCallContextFactory.createInternalCallContext(event.getSearchKey2(), event.getSearchKey1(), "SubscriptionBaseTransition", CallOrigin.INTERNAL, UserType.SYSTEM, event.getUserToken());
dispatcher.processSubscriptionForInvoiceGeneration(event, context);
} catch (final InvoiceApiException e) {
log.warn("Unable to process event {}", event, e);
}
}
});