org.activiti.engine.runtime.Execution.getActivityId()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(249)

本文整理了Java中org.activiti.engine.runtime.Execution.getActivityId()方法的一些代码示例,展示了Execution.getActivityId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Execution.getActivityId()方法的具体详情如下:
包路径:org.activiti.engine.runtime.Execution
类名称:Execution
方法名:getActivityId

Execution.getActivityId介绍

[英]Returns the id of the activity where the execution currently is at. Returns null if the execution is not a 'leaf' execution (eg concurrent parent).
[中]返回当前执行所在的活动的id。如果执行不是“叶”执行(例如并发父级),则返回null。

代码示例

代码示例来源:origin: com.sap.cloud.lm.sl/com.sap.cloud.lm.sl.slp

private HistoricActivityInstance findHistoricActivityInProcessExecution(List<HistoricActivityInstance> historicActivities,
  Execution processExecution) {
  for (ListIterator<HistoricActivityInstance> iterator = historicActivities.listIterator(
    historicActivities.size()); iterator.hasPrevious();) {
    HistoricActivityInstance historicActivityInstance = (HistoricActivityInstance) iterator.previous();
    if (historicActivityInstance.getActivityId().equals(processExecution.getActivityId())) {
      return historicActivityInstance;
    }
  }
  return null;
}

代码示例来源:origin: com.sap.cloud.lm.sl/com.sap.cloud.lm.sl.slp

private String findProcessInReceiveTask(List<String> activeProcessIds) {
  for (String processId : activeProcessIds) {
    Execution processExecution = activitiFacade.getProcessExecution(processId);
    String activitiType = getActivitiType(processId, processExecution.getActivityId());
    if (activitiType.equals("receiveTask")) {
      return processId;
    }
  }
  return null;
}

代码示例来源:origin: FINRAOS/herd

builder.append("    execution.getActivityId():").append(execution.getActivityId()).append('\n');
builder.append("    execution.getParentId():").append(execution.getParentId()).append('\n');
builder.append("    execution.getProcessInstanceId():").append(execution.getProcessInstanceId()).append('\n');

代码示例来源:origin: org.activiti/activiti-rest

public ExecutionResponse createExecutionResponse(Execution execution, RestUrlBuilder urlBuilder) {
 ExecutionResponse result = new ExecutionResponse();
 result.setActivityId(execution.getActivityId());
 result.setId(execution.getId());
 result.setUrl(urlBuilder.buildUrl(RestUrls.URL_EXECUTION, execution.getId()));
 result.setSuspended(execution.isSuspended());
 result.setTenantId(execution.getTenantId());
 result.setParentId(execution.getParentId());
 if (execution.getParentId() != null) {
  result.setParentUrl(urlBuilder.buildUrl(RestUrls.URL_EXECUTION, execution.getParentId()));
 }
 
 result.setSuperExecutionId(execution.getSuperExecutionId());
 if (execution.getSuperExecutionId() != null) {
  result.setSuperExecutionUrl(urlBuilder.buildUrl(RestUrls.URL_EXECUTION, execution.getSuperExecutionId()));
 }
 result.setProcessInstanceId(execution.getProcessInstanceId());
 if (execution.getProcessInstanceId() != null) {
  result.setProcessInstanceUrl(urlBuilder.buildUrl(RestUrls.URL_PROCESS_INSTANCE, execution.getProcessInstanceId()));
 }
 return result;
}

相关文章