Package org.camunda.bpm.engine.impl.history.event

Examples of org.camunda.bpm.engine.impl.history.event.HistoricCaseInstanceEventEntity


  public HistoryEvent createCaseInstanceCreateEvt(DelegateCaseExecution caseExecution) {
    final CaseExecutionEntity caseExecutionEntity = (CaseExecutionEntity) caseExecution;

    // create event instance
    HistoricCaseInstanceEventEntity evt = newCaseInstanceEventEntity(caseExecutionEntity);

    // initialize event
    initCaseInstanceEvent(evt, caseExecutionEntity, HistoryEventTypes.CASE_INSTANCE_CREATE);

    // set create time
    evt.setCreateTime(ClockUtil.getCurrentTime());

    // set create user id
    evt.setCreateUserId(Context.getCommandContext().getAuthenticatedUserId());

    // set super case instance id
    CmmnExecution superCaseExecution = caseExecutionEntity.getSuperCaseExecution();
    if (superCaseExecution != null) {
      evt.setSuperCaseInstanceId(superCaseExecution.getCaseInstanceId());
    }

    return evt;
  }
View Full Code Here


  public HistoryEvent createCaseInstanceUpdateEvt(DelegateCaseExecution caseExecution) {
    final CaseExecutionEntity caseExecutionEntity = (CaseExecutionEntity) caseExecution;

    // create event instance
    HistoricCaseInstanceEventEntity evt = loadCaseInstanceEventEntity(caseExecutionEntity);

    // initialize event
    initCaseInstanceEvent(evt, caseExecutionEntity, HistoryEventTypes.CASE_INSTANCE_UPDATE);

    return evt;
View Full Code Here

  public HistoryEvent createCaseInstanceCloseEvt(DelegateCaseExecution caseExecution) {
    final CaseExecutionEntity caseExecutionEntity = (CaseExecutionEntity) caseExecution;

    // create event instance
    HistoricCaseInstanceEventEntity evt = loadCaseInstanceEventEntity(caseExecutionEntity);

    // initialize event
    initCaseInstanceEvent(evt, caseExecutionEntity, HistoryEventTypes.CASE_INSTANCE_CLOSE);

    // set end time
    evt.setEndTime(ClockUtil.getCurrentTime());

    if (evt.getStartTime() != null) {
      evt.setDurationInMillis(evt.getEndTime().getTime() - evt.getStartTime().getTime());
    }

    return evt;
  }
View Full Code Here

    return evt;
  }

  protected HistoricCaseInstanceEventEntity newCaseInstanceEventEntity(CaseExecutionEntity caseExecutionEntity) {
    return new HistoricCaseInstanceEventEntity();
  }
View Full Code Here

  @Override
  protected HistoricCaseInstanceEventEntity loadCaseInstanceEventEntity(CaseExecutionEntity caseExecutionEntity) {
    final String caseInstanceId = caseExecutionEntity.getCaseInstanceId();

    HistoricCaseInstanceEventEntity cachedEntity = findInCache(HistoricCaseInstanceEventEntity.class, caseInstanceId);

    if (cachedEntity != null) {
      return cachedEntity;
    }
    else {
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.history.event.HistoricCaseInstanceEventEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.