Codota Logo
DbHistoryEventHandler
Code IndexAdd Codota to your IDE (free)

How to use
DbHistoryEventHandler
in
org.camunda.bpm.engine.impl.history.handler

Best Java code snippets using org.camunda.bpm.engine.impl.history.handler.DbHistoryEventHandler (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: camunda/camunda-bpm-platform

protected void initHistoryEventHandler() {
 if (historyEventHandler == null) {
  historyEventHandler = new DbHistoryEventHandler();
 }
}
origin: camunda/camunda-bpm-platform

public void handleEvents(List<HistoryEvent> historyEvents) {
 for (HistoryEvent historyEvent : historyEvents) {
  handleEvent(historyEvent);
 }
}
origin: camunda/camunda-bpm-platform

public void handleEvent(HistoryEvent historyEvent) {
 if (historyEvent instanceof HistoricVariableUpdateEventEntity) {
  insertHistoricVariableUpdateEntity((HistoricVariableUpdateEventEntity) historyEvent);
 } else if(historyEvent instanceof HistoricDecisionEvaluationEvent) {
  insertHistoricDecisionEvaluationEvent((HistoricDecisionEvaluationEvent) historyEvent);
 } else {
  insertOrUpdate(historyEvent);
 }
}
origin: camunda/camunda-bpm-platform

 /** general history event insert behavior */
 protected void insertOrUpdate(HistoryEvent historyEvent) {

  final DbEntityManager dbEntityManager = getDbEntityManager();

  if(isInitialEvent(historyEvent)) {
   dbEntityManager.insert(historyEvent);
  } else {
   if(dbEntityManager.getCachedEntity(historyEvent.getClass(), historyEvent.getId()) == null) {
    if (historyEvent instanceof HistoricScopeInstanceEvent) {
     // if this is a scope, get start time from existing event in DB
     HistoricScopeInstanceEvent existingEvent = (HistoricScopeInstanceEvent) dbEntityManager.selectById(historyEvent.getClass(), historyEvent.getId());
     if(existingEvent != null) {
      HistoricScopeInstanceEvent historicScopeInstanceEvent = (HistoricScopeInstanceEvent) historyEvent;
      historicScopeInstanceEvent.setStartTime(existingEvent.getStartTime());
     }
    }
    if(historyEvent.getId() == null) {
//          dbSqlSession.insert(historyEvent);
    } else {
     dbEntityManager.merge(historyEvent);
    }
   }
  }
 }

origin: camunda/camunda-bpm-platform

DbEntityManager dbEntityManager = getDbEntityManager();
if(shouldWriteHistoricDetail(historyEvent)) {
origin: org.camunda.bpm.extension/camunda-bpm-process-test-coverage

protected boolean isInitialEvent(HistoryEvent historyEvent) {
  String isInitialEvent = "isInitialEvent";
  return Api.feature(DbHistoryEventHandler.class, isInitialEvent, HistoryEvent.class).isSupported() ? super.isInitialEvent(historyEvent):
    (Boolean) Api.feature(DbHistoryEventHandler.class, isInitialEvent, String.class).invoke(this, historyEvent.getEventType());
}
origin: camunda/camunda-bpm-platform

 /** general history event insert behavior */
 protected void insertOrUpdate(HistoryEvent historyEvent) {

  final DbEntityManager dbEntityManager = getDbEntityManager();

  if(isInitialEvent(historyEvent)) {
   dbEntityManager.insert(historyEvent);
  } else {
   if(dbEntityManager.getCachedEntity(historyEvent.getClass(), historyEvent.getId()) == null) {
    if (historyEvent instanceof HistoricScopeInstanceEvent) {
     // if this is a scope, get start time from existing event in DB
     HistoricScopeInstanceEvent existingEvent = (HistoricScopeInstanceEvent) dbEntityManager.selectById(historyEvent.getClass(), historyEvent.getId());
     if(existingEvent != null) {
      HistoricScopeInstanceEvent historicScopeInstanceEvent = (HistoricScopeInstanceEvent) historyEvent;
      historicScopeInstanceEvent.setStartTime(existingEvent.getStartTime());
     }
    }
    if(historyEvent.getId() == null) {
//          dbSqlSession.insert(historyEvent);
    } else {
     dbEntityManager.merge(historyEvent);
    }
   }
  }
 }

origin: camunda/camunda-bpm-platform

DbEntityManager dbEntityManager = getDbEntityManager();
if(shouldWriteHistoricDetail(historyEvent)) {
origin: camunda/camunda-bpm-platform

protected void initHistoryEventHandler() {
 if (historyEventHandler == null) {
  historyEventHandler = new DbHistoryEventHandler();
 }
}
origin: camunda/camunda-bpm-platform

public void handleEvent(HistoryEvent historyEvent) {
 if (historyEvent instanceof HistoricVariableUpdateEventEntity) {
  insertHistoricVariableUpdateEntity((HistoricVariableUpdateEventEntity) historyEvent);
 } else if(historyEvent instanceof HistoricDecisionEvaluationEvent) {
  insertHistoricDecisionEvaluationEvent((HistoricDecisionEvaluationEvent) historyEvent);
 } else {
  insertOrUpdate(historyEvent);
 }
}
origin: org.camunda.bpm/camunda-engine

 /** general history event insert behavior */
 protected void insertOrUpdate(HistoryEvent historyEvent) {

  final DbEntityManager dbEntityManager = getDbEntityManager();

  if(isInitialEvent(historyEvent)) {
   dbEntityManager.insert(historyEvent);
  } else {
   if(dbEntityManager.getCachedEntity(historyEvent.getClass(), historyEvent.getId()) == null) {
    if (historyEvent instanceof HistoricScopeInstanceEvent) {
     // if this is a scope, get start time from existing event in DB
     HistoricScopeInstanceEvent existingEvent = (HistoricScopeInstanceEvent) dbEntityManager.selectById(historyEvent.getClass(), historyEvent.getId());
     if(existingEvent != null) {
      HistoricScopeInstanceEvent historicScopeInstanceEvent = (HistoricScopeInstanceEvent) historyEvent;
      historicScopeInstanceEvent.setStartTime(existingEvent.getStartTime());
     }
    }
    if(historyEvent.getId() == null) {
//          dbSqlSession.insert(historyEvent);
    } else {
     dbEntityManager.merge(historyEvent);
    }
   }
  }
 }

origin: org.camunda.bpm/camunda-engine

DbEntityManager dbEntityManager = getDbEntityManager();
if(shouldWriteHistoricDetail(historyEvent)) {
origin: camunda/camunda-bpm-platform

public void handleEvents(List<HistoryEvent> historyEvents) {
 for (HistoryEvent historyEvent : historyEvents) {
  handleEvent(historyEvent);
 }
}
origin: camunda/camunda-bpm-platform

/**
 * Add {@link DbHistoryEventHandler} to the list of
 * {@link HistoryEventHandler}.
 */
private void addDefaultDbHistoryEventHandler() {
 historyEventHandlers.add(new DbHistoryEventHandler());
}
origin: org.camunda.bpm/camunda-engine

public void handleEvent(HistoryEvent historyEvent) {
 if (historyEvent instanceof HistoricVariableUpdateEventEntity) {
  insertHistoricVariableUpdateEntity((HistoricVariableUpdateEventEntity) historyEvent);
 } else if(historyEvent instanceof HistoricDecisionEvaluationEvent) {
  insertHistoricDecisionEvaluationEvent((HistoricDecisionEvaluationEvent) historyEvent);
 } else {
  insertOrUpdate(historyEvent);
 }
}
origin: org.camunda.bpm/camunda-engine

public void handleEvents(List<HistoryEvent> historyEvents) {
 for (HistoryEvent historyEvent : historyEvents) {
  handleEvent(historyEvent);
 }
}
origin: camunda/camunda-bpm-platform

/**
 * Add {@link DbHistoryEventHandler} to the list of
 * {@link HistoryEventHandler}.
 */
private void addDefaultDbHistoryEventHandler() {
 historyEventHandlers.add(new DbHistoryEventHandler());
}
origin: org.camunda.bpm.extension/camunda-bpm-process-test-coverage

@Override
public void handleEvent(HistoryEvent historyEvent) {
  super.handleEvent(historyEvent);
  if (coverageTestRunState == null) {
    logger.warning("Coverage history event listener in use but no coverage run state assigned!");
    return;
  }
  if (historyEvent instanceof HistoricActivityInstanceEventEntity) {
    HistoricActivityInstanceEventEntity activityEvent = (HistoricActivityInstanceEventEntity) historyEvent;
    if (activityEvent.getActivityType().equals("multiInstanceBody"))
      return;
    final CoveredFlowNode coveredActivity =
      new CoveredFlowNode(historyEvent.getProcessDefinitionKey(), activityEvent.getActivityId());
    // Cover event start
    if (isInitialEvent(historyEvent)) {
      coverageTestRunState.addCoveredElement(coveredActivity);
    }
    // Cover event end
    else if (isEndEvent(historyEvent)) {
      coverageTestRunState.endCoveredElement(coveredActivity);
    }
  }
}
origin: camunda/camunda-bpm-platform

@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" })
public void testCompositeHistoryEventHandlerArgumentConstructorWithNotEmptyListNotNullTwoEvents() {
 // prepare the list with two events
 List<HistoryEventHandler> historyEventHandlers = new ArrayList<HistoryEventHandler>();
 historyEventHandlers.add(new CustomDbHistoryEventHandler());
 historyEventHandlers.add(new DbHistoryEventHandler());
 CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(historyEventHandlers);
 processEngineConfiguration.setHistoryEventHandler(compositeHistoryEventHandler);
 startProcessAndCompleteUserTask();
 assertEquals(2, countCustomHistoryEventHandler);
 assertEquals(2, historyService.createHistoricDetailQuery().count());
}
origin: org.camunda.bpm/camunda-engine

protected void initHistoryEventHandler() {
 if (historyEventHandler == null) {
  historyEventHandler = new DbHistoryEventHandler();
 }
}
org.camunda.bpm.engine.impl.history.handlerDbHistoryEventHandler

Javadoc

History event handler that writes history events to the process engine database using the DbEntityManager.

Most used methods

  • <init>
  • handleEvent
  • isInitialEvent
  • getDbEntityManager
  • insertHistoricDecisionEvaluationEvent
  • insertHistoricVariableUpdateEntity
    customized insert behavior for HistoricVariableUpdateEventEntity
  • insertOrUpdate
    general history event insert behavior
  • shouldWriteHistoricDetail

Popular in Java

  • Making http requests using okhttp
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • getSystemService (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Join (org.hibernate.mapping)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now