當前位置: 首頁>>代碼示例>>Java>>正文


Java HistoricTaskInstanceEventEntity類代碼示例

本文整理匯總了Java中org.camunda.bpm.engine.impl.history.event.HistoricTaskInstanceEventEntity的典型用法代碼示例。如果您正苦於以下問題:Java HistoricTaskInstanceEventEntity類的具體用法?Java HistoricTaskInstanceEventEntity怎麽用?Java HistoricTaskInstanceEventEntity使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


HistoricTaskInstanceEventEntity類屬於org.camunda.bpm.engine.impl.history.event包,在下文中一共展示了HistoricTaskInstanceEventEntity類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: filterEvents

import org.camunda.bpm.engine.impl.history.event.HistoricTaskInstanceEventEntity; //導入依賴的package包/類
protected boolean filterEvents(HistoryEvent historyEvent) {
  if (historyEvent instanceof HistoricProcessInstanceEventEntity ||
      historyEvent instanceof HistoricActivityInstanceEventEntity ||
      historyEvent instanceof HistoricTaskInstanceEventEntity ||
      historyEvent instanceof HistoricVariableUpdateEventEntity) {
    return false;
  }
  return true;
}
 
開發者ID:camunda,項目名稱:camunda-bpm-elasticsearch,代碼行數:10,代碼來源:ElasticSearchDefaultIndexStrategy.java

示例2: prepareUpdateRequest

import org.camunda.bpm.engine.impl.history.event.HistoricTaskInstanceEventEntity; //導入依賴的package包/類
protected UpdateRequestBuilder prepareUpdateRequest(HistoryEvent historyEvent) throws IOException {
    UpdateRequestBuilder updateRequestBuilder = esClient.prepareUpdate()
        .setIndex(dispatcher.getDispatchTargetIndex(historyEvent))
        .setId(historyEvent.getProcessInstanceId());

    String dispatchTargetType = dispatcher.getDispatchTargetType(historyEvent);
    if (dispatchTargetType != null && !dispatchTargetType.isEmpty()) {
      updateRequestBuilder.setType(dispatchTargetType);
    }

    if (historyEvent instanceof HistoricProcessInstanceEventEntity) {
      prepareHistoricProcessInstanceEventUpdate(historyEvent, updateRequestBuilder);
    } else if (historyEvent instanceof HistoricActivityInstanceEventEntity ||
               historyEvent instanceof HistoricTaskInstanceEventEntity ||
               historyEvent instanceof HistoricVariableUpdateEventEntity) {
      updateRequestBuilder = prepareOtherHistoricEventsUpdateRequest(historyEvent, updateRequestBuilder);
    } else {
      // unknown event - insert...
      throw new IllegalArgumentException("Unknown event detected: '" + historyEvent + "'");
//      LOGGER.warning("Unknown event detected: '" + historyEvent + "'");
    }

    if (LOGGER.isLoggable(Level.FINE)) {
      updateRequestBuilder.setFields("_source");
    }

    return updateRequestBuilder;
  }
 
開發者ID:camunda,項目名稱:camunda-bpm-elasticsearch,代碼行數:29,代碼來源:ElasticSearchDefaultIndexStrategy.java

示例3: prepareOtherHistoricEventsUpdateRequest

import org.camunda.bpm.engine.impl.history.event.HistoricTaskInstanceEventEntity; //導入依賴的package包/類
protected UpdateRequestBuilder prepareOtherHistoricEventsUpdateRequest(HistoryEvent historyEvent, UpdateRequestBuilder updateRequestBuilder) throws IOException {
  HashMap<String, Object> scriptParams = new HashMap<String, Object>();

  if (historyEvent instanceof HistoricActivityInstanceEventEntity) {
    scriptParams.put("isActivityInstanceEvent", true);
    scriptParams.put("isTaskInstanceEvent", false);
    scriptParams.put("isVariableUpdateEvent", false);
  } else if (historyEvent instanceof HistoricTaskInstanceEventEntity) {
    scriptParams.put("isActivityInstanceEvent", false);
    scriptParams.put("isTaskInstanceEvent", true);
    scriptParams.put("isVariableUpdateEvent", false);
  } else {
    scriptParams.put("isActivityInstanceEvent", false);
    scriptParams.put("isTaskInstanceEvent", false);
    scriptParams.put("isVariableUpdateEvent", true);
  }

  String eventJson = transformer.transformToJson(historyEvent);
  // needed otherwise the resulting json is not an array/list and the update script throws an error
  List<Map<String,Object>> events = transformer.transformJsonToList("[" + eventJson + "]");
  scriptParams.put("value", events);

  updateRequestBuilder.setScript(ES_INDEX_UPDATE_SCRIPT, ScriptService.ScriptType.INLINE)
      .setScriptParams(scriptParams);

  return updateRequestBuilder;
}
 
開發者ID:camunda,項目名稱:camunda-bpm-elasticsearch,代碼行數:28,代碼來源:ElasticSearchDefaultIndexStrategy.java

示例4: createFromHistoryEvent

import org.camunda.bpm.engine.impl.history.event.HistoricTaskInstanceEventEntity; //導入依賴的package包/類
public static ElasticSearchProcessInstanceHistoryEntity createFromHistoryEvent(HistoryEvent historyEvent) {
  ElasticSearchProcessInstanceHistoryEntity esHistoryEntity = new ElasticSearchProcessInstanceHistoryEntity();

  esHistoryEntity.setId(historyEvent.getId()); // maybe use process instance id here?
  esHistoryEntity.setProcessInstanceId(historyEvent.getProcessInstanceId());

  if (historyEvent instanceof HistoricProcessInstanceEventEntity) {
    HistoricProcessInstanceEventEntity pie = (HistoricProcessInstanceEventEntity) historyEvent;

    esHistoryEntity.setExecutionId(pie.getExecutionId());
    esHistoryEntity.setProcessDefinitionId(pie.getProcessDefinitionId());

    esHistoryEntity.setStartActivityId(pie.getStartActivityId());
    esHistoryEntity.setEndActivityId(pie.getEndActivityId());
    esHistoryEntity.setStartTime(pie.getStartTime());
    esHistoryEntity.setEndTime(pie.getEndTime());
    esHistoryEntity.setDurationInMillis(pie.getDurationInMillis());

    esHistoryEntity.setBusinessKey(pie.getBusinessKey());
    esHistoryEntity.setStartUserId(pie.getStartUserId());
    esHistoryEntity.setDeleteReason(pie.getDeleteReason());
    esHistoryEntity.setSuperProcessInstanceId(pie.getSuperProcessInstanceId());

  } else if (historyEvent instanceof HistoricActivityInstanceEventEntity) {

    HistoricActivityInstanceEventEntity aie = (HistoricActivityInstanceEventEntity) historyEvent;
    esHistoryEntity.addHistoricActivityInstanceEvent(aie);

  } else if (historyEvent instanceof HistoricTaskInstanceEventEntity) {

    HistoricTaskInstanceEventEntity tie = (HistoricTaskInstanceEventEntity) historyEvent;
    esHistoryEntity.addHistoricTaskInstanceEvent(tie);

  } else if (historyEvent instanceof HistoricVariableUpdateEventEntity) {

    HistoricVariableUpdateEventEntity vue = (HistoricVariableUpdateEventEntity) historyEvent;
    esHistoryEntity.addHistoricVariableUpdateEvent(vue);

  } else {
    // unknown event - throw exception or return null?
  }

  return esHistoryEntity;
}
 
開發者ID:camunda,項目名稱:camunda-bpm-elasticsearch,代碼行數:45,代碼來源:ElasticSearchProcessInstanceHistoryEntity.java

示例5: getTasks

import org.camunda.bpm.engine.impl.history.event.HistoricTaskInstanceEventEntity; //導入依賴的package包/類
public List<HistoricTaskInstanceEventEntity> getTasks() {
  return tasks;
}
 
開發者ID:camunda,項目名稱:camunda-bpm-elasticsearch,代碼行數:4,代碼來源:ElasticSearchProcessInstanceHistoryEntity.java

示例6: setTasks

import org.camunda.bpm.engine.impl.history.event.HistoricTaskInstanceEventEntity; //導入依賴的package包/類
public void setTasks(List<HistoricTaskInstanceEventEntity> tasks) {
  this.tasks = tasks;
}
 
開發者ID:camunda,項目名稱:camunda-bpm-elasticsearch,代碼行數:4,代碼來源:ElasticSearchProcessInstanceHistoryEntity.java

示例7: addHistoricTaskInstanceEvent

import org.camunda.bpm.engine.impl.history.event.HistoricTaskInstanceEventEntity; //導入依賴的package包/類
public void addHistoricTaskInstanceEvent(HistoricTaskInstanceEventEntity taskInstanceEvent) {
  if (tasks == null) {
    tasks = new ArrayList<HistoricTaskInstanceEventEntity>();
  }
  tasks.add(taskInstanceEvent);
}
 
開發者ID:camunda,項目名稱:camunda-bpm-elasticsearch,代碼行數:7,代碼來源:ElasticSearchProcessInstanceHistoryEntity.java


注:本文中的org.camunda.bpm.engine.impl.history.event.HistoricTaskInstanceEventEntity類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。