当前位置: 首页>>代码示例>>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;未经允许,请勿转载。