/** * Process an {@link HistoryEvent} and handle them directly after creation. * The {@link HistoryEvent} is created with the help of the given * {@link HistoryEventCreator} implementation. * * @param creator the creator is used to create the {@link HistoryEvent} which should be thrown */ public static void processHistoryEvents(HistoryEventCreator creator) { HistoryEventProducer historyEventProducer = Context.getProcessEngineConfiguration().getHistoryEventProducer(); HistoryEventHandler historyEventHandler = Context.getProcessEngineConfiguration().getHistoryEventHandler(); HistoryEvent singleEvent = creator.createHistoryEvent(historyEventProducer); if (singleEvent != null) { historyEventHandler.handleEvent(singleEvent); } List<HistoryEvent> eventList = creator.createHistoryEvents(historyEventProducer); historyEventHandler.handleEvents(eventList); } }
/** * Process an {@link HistoryEvent} and handle them directly after creation. * The {@link HistoryEvent} is created with the help of the given * {@link HistoryEventCreator} implementation. * * @param creator the creator is used to create the {@link HistoryEvent} which should be thrown */ public static void processHistoryEvents(HistoryEventCreator creator) { HistoryEventProducer historyEventProducer = Context.getProcessEngineConfiguration().getHistoryEventProducer(); HistoryEventHandler historyEventHandler = Context.getProcessEngineConfiguration().getHistoryEventHandler(); HistoryEvent singleEvent = creator.createHistoryEvent(historyEventProducer); if (singleEvent != null) { historyEventHandler.handleEvent(singleEvent); } List<HistoryEvent> eventList = creator.createHistoryEvents(historyEventProducer); historyEventHandler.handleEvents(eventList); } }
/** * Process an {@link HistoryEvent} and handle them directly after creation. * The {@link HistoryEvent} is created with the help of the given * {@link HistoryEventCreator} implementation. * * @param creator the creator is used to create the {@link HistoryEvent} which should be thrown */ public static void processHistoryEvents(HistoryEventCreator creator) { HistoryEventProducer historyEventProducer = Context.getProcessEngineConfiguration().getHistoryEventProducer(); HistoryEventHandler historyEventHandler = Context.getProcessEngineConfiguration().getHistoryEventHandler(); HistoryEvent singleEvent = creator.createHistoryEvent(historyEventProducer); if (singleEvent != null) { historyEventHandler.handleEvent(singleEvent); } List<HistoryEvent> eventList = creator.createHistoryEvents(historyEventProducer); historyEventHandler.handleEvents(eventList); } }