This commit is contained in:
Fabio Sinibaldi 2022-04-29 17:00:12 +02:00
parent 0322042d73
commit ca32991c18
3 changed files with 10 additions and 5 deletions

View File

@ -189,6 +189,7 @@ public abstract class AbstractLifeCycleManager extends AbstractPlugin implements
@Override
public EventExecutionReport onEvent(EventExecutionRequest request) throws EventException, InvalidPluginRequestException {
log.info("Executing Event {}",request);
EventExecutionReport report=new EventExecutionReport(request);
report.getToSetLifecycleInformation().addEventReport(new TriggeredEvents());
TriggeredEvents info = report.getToSetLifecycleInformation().getLastEvent();

View File

@ -176,6 +176,7 @@ public class SimpleLifeCycleManager extends AbstractLifeCycleManager implements
ArrayList<IndexerPluginInterface> toReturn=new ArrayList<>();
UseCaseDescriptor desc = request.getUseCaseDescriptor();
List<HandlerDeclaration> indexers = desc.getHandlersMapByType().get(IndexerPluginDescriptor.INDEXER);
log.debug("Found UCD [{}] Indexers : {}",desc.getId(),indexers.size());
for (HandlerDeclaration handlerDeclaration : indexers)
toReturn.add((IndexerPluginInterface) pluginManager.getById(handlerDeclaration.getId()));
return toReturn;
@ -185,8 +186,10 @@ public class SimpleLifeCycleManager extends AbstractLifeCycleManager implements
ArrayList<MaterializationPlugin> toReturn=new ArrayList<>();
UseCaseDescriptor desc = request.getUseCaseDescriptor();
List<HandlerDeclaration> materializers = desc.getHandlersMapByType().get(MaterializerPluginDescriptor.MATERIALIZER);
for (HandlerDeclaration handlerDeclaration : materializers)
log.debug("Found UCD [{}] Materializers : {}",desc.getId(),materializers.size());
for (HandlerDeclaration handlerDeclaration : materializers) {
toReturn.add((MaterializationPlugin) pluginManager.getById(handlerDeclaration.getId()));
}
return toReturn;
}

View File

@ -73,7 +73,8 @@ public class UseCaseDescriptor {
if(!toReturn.containsKey(h.getType()))
toReturn.put(h.getType(),new ArrayList<>());
toReturn.get(h.getType()).add(h);
}catch (Throwable t){log.error("Invalid useCaseDescriptor : unable to get Handler Map by Type with {} in useCaseDescriptor [ID {}]",h,this.getId(),t);}
}catch (Throwable t){
log.error("Invalid useCaseDescriptor : unable to get Handler Map by Type with {} in useCaseDescriptor [ID {}]",h,this.getId(),t);}
});
return toReturn;
}