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

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

Best Java code snippets using org.camunda.bpm.engine.impl.history.handler.DbHistoryEventHandler.isInitialEvent (Showing top 4 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

 /** 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

 /** 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.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: 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);
    }
   }
  }
 }

org.camunda.bpm.engine.impl.history.handlerDbHistoryEventHandlerisInitialEvent

Popular methods of DbHistoryEventHandler

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

Popular in Java

  • Running tasks concurrently on multiple threads
  • getApplicationContext (Context)
  • findViewById (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
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