public virtual void fireHistoricCaseActivityInstanceUpdate() { ProcessEngineConfigurationImpl configuration = Context.ProcessEngineConfiguration; HistoryLevel historyLevel = configuration.HistoryLevel; if (historyLevel.isHistoryEventProduced(HistoryEventTypes.CASE_ACTIVITY_INSTANCE_UPDATE, this)) { CmmnHistoryEventProducer eventProducer = configuration.CmmnHistoryEventProducer; HistoryEventHandler eventHandler = configuration.HistoryEventHandler; HistoryEvent @event = eventProducer.createCaseActivityInstanceUpdateEvt(this); eventHandler.handleEvent(@event); } }
/// <summary> /// Process an <seealso cref="HistoryEvent"/> and handle them directly after creation. /// The <seealso cref="HistoryEvent"/> is created with the help of the given /// <seealso cref="HistoryEventCreator"/> implementation. /// </summary> /// <param name="creator"> the creator is used to create the <seealso cref="HistoryEvent"/> which should be thrown </param> public static void processHistoryEvents(HistoryEventCreator creator) { HistoryEventProducer historyEventProducer = Context.ProcessEngineConfiguration.HistoryEventProducer; HistoryEventHandler historyEventHandler = Context.ProcessEngineConfiguration.HistoryEventHandler; HistoryEvent singleEvent = creator.createHistoryEvent(historyEventProducer); if (singleEvent != null) { historyEventHandler.handleEvent(singleEvent); } IList <HistoryEvent> eventList = creator.createHistoryEvents(historyEventProducer); historyEventHandler.handleEvents(eventList); }