热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.activiti.engine.history.HistoricProcessInstanceQuery.processInstanceId()方法的使用及代码示例

本文整理了Java中org.activiti.engine.history.HistoricProcessInstanceQuery.processInstanceId()

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

HistoricProcessInstanceQuery.processInstanceId介绍

[英]Only select historic process instances with the given process instance. ProcessInstance) ids and HistoricProcessInstance ids match.
[中]仅选择具有给定流程实例的历史流程实例。ProcessInstance)ID和HistoricProcessInstance ID匹配。

代码示例

代码示例来源:origin: hs-web/hsweb-framework

@Override
public HistoricProcessInstance selectHisProInst(String procInstId) {
return historyService.createHistoricProcessInstanceQuery().processInstanceId(procInstId).singleResult();
}

代码示例来源:origin: hs-web/hsweb-framework

@GetMapping(value = "/process-instance/{processInstanceId}/highlights", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public Object getHighlighted(@PathVariable String processInstanceId) {
JSONObject respOnseJSON= new JSONObject();
responseJSON.put("processInstanceId", processInstanceId);
JSONArray activitiesArray = new JSONArray();
JSONArray flowsArray = new JSONArray();
HistoricProcessInstance processInstance = historyService.createHistoricProcessInstanceQuery()
.processInstanceId(processInstanceId)
.singleResult();
ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) repositoryService
.getProcessDefinition(processInstance.getProcessDefinitionId());
responseJSON.put("processDefinitionId", processInstance.getProcessDefinitionId());
List highLightedActivities;
if (processInstance.getEndTime() != null) {
highLightedActivities = historyService
.createHistoricActivityInstanceQuery()
.processInstanceId(processInstanceId)
.activityType("endEvent")
.list().stream().map(HistoricActivityInstance::getActivityId)
.collect(Collectors.toList());
} else {
highLightedActivities = runtimeService.getActiveActivityIds(processInstanceId);
}
List highLightedFlows = getHighLightedFlows(processDefinition, processInstanceId);
activitiesArray.addAll(highLightedActivities);
flowsArray.addAll(highLightedFlows);
responseJSON.put("activities", activitiesArray);
responseJSON.put("flows", flowsArray);
return responseJSON;
}

代码示例来源:origin: Activiti/Activiti

.processInstanceId(processInstanceId).singleResult();
assertEquals(processInstanceId, historicProcessInstance.getId());
assertNotNull("Historic process instance has no start time", historicProcessInstance.getStartTime());

代码示例来源:origin: bill1012/AdminEAP

@Override
public String getStartUserId(String taskId) {
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
HistoricProcessInstance historicProcessInstance =
historyService.createHistoricProcessInstanceQuery()
.processInstanceId(task.getProcessInstanceId())
.singleResult();
return historicProcessInstance.getStartUserId();
}

代码示例来源:origin: bill1012/AdminEAP

.processInstanceId(instanceId).singleResult();
processDefinitiOnId=instance.getProcessDefinitionId();

代码示例来源:origin: bill1012/AdminEAP

} else {
HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery()
.processInstanceId
(processInstanceId).singleResult();
processDefinition = (ProcessDefinitionEntity) repositoryService.getProcessDefinition

代码示例来源:origin: bill1012/AdminEAP

/**
* 流程撤回 TODO MESSAGE 流程撤回需要给相关人员发送消息提醒
*
* @param instanceId 历史流程实例ID
* @param userId 用户ID
* @return
*/
@Override
public Result withdrawTask(String instanceId, String userId) {
HistoricProcessInstance processInstance = historyService.createHistoricProcessInstanceQuery().processInstanceId
(instanceId).singleResult();
Result result = this.canWithdraw(processInstance, userId);
if (!result.isSuccess()) {
return new Result(false, "不可撤回", "该任务已经被签收或者办理,无法撤回,请查看流程明细");
} else {
HistoricTaskInstance taskInstance = (HistoricTaskInstance) result.getData();
final TaskEntity task = (TaskEntity) taskService.createTaskQuery().processInstanceId(instanceId).singleResult();
try {
this.jumpTask(task, taskInstance.getTaskDefinitionKey());
//删除历史记录,填充签收人
this.deleteCurrentTaskInstance(task.getId(), taskInstance);
return new Result(true);
} catch (Exception ex) {
return new Result(false, "撤回异常", "任务撤回发生异常,异常原因:" + ex.getMessage());
}
}
}

代码示例来源:origin: Alfresco/alfresco-repository

public HistoricProcessInstance getHistoricProcessInstance(String id)
{
return historyService.createHistoricProcessInstanceQuery()
.processInstanceId(id)
.singleResult();
}

代码示例来源:origin: com.bbossgroups.pdp/pdp-workflow

/**
* 根据processInstanceId查询历史
*
* @param processInstanceId
* @return
*/
public HistoricProcessInstance getHisProcessInstanceById(
String processInstanceId) {
HistoricProcessInstance processInstance = historyService
.createHistoricProcessInstanceQuery()
.processInstanceId(processInstanceId).singleResult();
return processInstance;
}

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

protected HistoricProcessInstance getHistoricProcessInstanceFromRequest(String processInstanceId) {
HistoricProcessInstance processInstance = historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
if (processInstance == null) {
throw new ActivitiObjectNotFoundException("Could not find a process instance with id '" + processInstanceId + "'.", HistoricProcessInstance.class);
}
return processInstance;
}
}

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

protected HistoricProcessInstance getHistoricProcessInstanceFromRequest(String processInstanceId) {
HistoricProcessInstance processInstance = historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
if (processInstance == null) {
throw new ActivitiObjectNotFoundException("Could not find a process instance with id '" + processInstanceId + "'.", HistoricProcessInstance.class);
}
return processInstance;
}
}

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

protected HistoricProcessInstance getHistoricProcessInstanceFromRequest(String processInstanceId) {
HistoricProcessInstance processInstance = historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
if (processInstance == null) {
throw new ActivitiObjectNotFoundException("Could not find a process instance with id '" + processInstanceId + "'.", HistoricProcessInstance.class);
}
return processInstance;
}
}

代码示例来源:origin: org.finra.herd/herd-service

@Override
public HistoricProcessInstance getHistoricProcessInstanceByProcessInstanceId(String processInstanceId)
{
return activitiHistoryService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).includeProcessVariables().singleResult();
}

代码示例来源:origin: org.alfresco/alfresco-repository

public WorkflowInstance convert(HistoricProcessInstance instance, Map collectedvariables)
{
if(instance == null)
return null;

HistoricProcessInstance historicInstance = historyService
.createHistoricProcessInstanceQuery()
.processInstanceId(instance.getId())
.singleResult();

return convertToInstanceAndSetVariables(historicInstance, collectedvariables);
}

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

private String findEndActivityName(ProcessInstance pi, ProcessToolContext ctx) {
List history = getProcessEngine().getHistoryService().createHistoricProcessInstanceQuery()
.processInstanceId(pi.getInternalId())
.list();
if (history != null && !history.isEmpty()) {
String endActivityName = history.get(0).getEndActivityId();
if (Strings.hasText(endActivityName)) {
return endActivityName;
}
}
return null;
}

代码示例来源:origin: org.alfresco/alfresco-repository

public WorkflowInstance convertAndSetVariables(ProcessInstance instance, Map collectedvariables)
{
if(instance == null)
return null;

HistoricProcessInstance historicInstance = historyService
.createHistoricProcessInstanceQuery()
.processInstanceId(instance.getId())
.singleResult();

return convertToInstanceAndSetVariables(historicInstance, collectedvariables);
}

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

HistoricProcessInstance getHistoricProcessInstance(String processInstanceId, String spaceId) {
HistoricProcessInstanceQuery query = engine.getHistoryService().createHistoricProcessInstanceQuery().variableValueEquals(
Constants.VARIABLE_NAME_SPACE_ID, spaceId).excludeSubprocesses(true).processInstanceId(processInstanceId);
return query.singleResult();
}

代码示例来源:origin: org.toxos.process-assertions.activiti/activiti-6_0_0

@Override
public void processIsEnded(final String processInstanceId) {
// Assert there is no running process instance
callback.trace(LogMessage.PROCESS_6, processInstanceId);
final ProcessInstance processInstance = getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
Assert.assertThat(processInstance, is(nullValue()));
// Assert there is a historic process instance and it is ended
callback.trace(LogMessage.PROCESS_4, processInstanceId);
final HistoricProcessInstance historicProcessInstance = getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
historicProcessInstanceEnded(historicProcessInstance);
}

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

HistoricProcessInstance getHistoricProcessInstance(String processDefinitionKey, String spaceId, String processInstanceId) {
HistoricProcessInstanceQuery query = engine.getHistoryService().createHistoricProcessInstanceQuery().processDefinitionKey(
processDefinitionKey).variableValueEquals(Constants.VARIABLE_NAME_SPACE_ID, spaceId).excludeSubprocesses(
true).processInstanceId(processInstanceId);
return query.singleResult();
}

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

public SavedReportDetailPanel(String historicProcessInstance) {
this.i18nManager = ExplorerApp.get().getI18nManager();

this.historicProcessInstance = ProcessEngines.getDefaultProcessEngine()
.getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(historicProcessInstance).singleResult();
initUi();
}

推荐阅读
  • 本文详细介绍了Java中vector的使用方法和相关知识,包括vector类的功能、构造方法和使用注意事项。通过使用vector类,可以方便地实现动态数组的功能,并且可以随意插入不同类型的对象,进行查找、插入和删除操作。这篇文章对于需要频繁进行查找、插入和删除操作的情况下,使用vector类是一个很好的选择。 ... [详细]
  • 如何使用Java获取服务器硬件信息和磁盘负载率
    本文介绍了使用Java编程语言获取服务器硬件信息和磁盘负载率的方法。首先在远程服务器上搭建一个支持服务端语言的HTTP服务,并获取服务器的磁盘信息,并将结果输出。然后在本地使用JS编写一个AJAX脚本,远程请求服务端的程序,得到结果并展示给用户。其中还介绍了如何提取硬盘序列号的方法。 ... [详细]
  • flowable工作流 流程变量_信也科技工作流平台的技术实践
    1背景随着公司业务发展及内部业务流程诉求的增长,目前信息化系统不能够很好满足期望,主要体现如下:目前OA流程引擎无法满足企业特定业务流程需求,且移动端体 ... [详细]
  • Java学习笔记之面向对象编程(OOP)
    本文介绍了Java学习笔记中的面向对象编程(OOP)内容,包括OOP的三大特性(封装、继承、多态)和五大原则(单一职责原则、开放封闭原则、里式替换原则、依赖倒置原则)。通过学习OOP,可以提高代码复用性、拓展性和安全性。 ... [详细]
  • Imtryingtofigureoutawaytogeneratetorrentfilesfromabucket,usingtheAWSSDKforGo.我正 ... [详细]
  • Iamtryingtomakeaclassthatwillreadatextfileofnamesintoanarray,thenreturnthatarra ... [详细]
  • Spring源码解密之默认标签的解析方式分析
    本文分析了Spring源码解密中默认标签的解析方式。通过对命名空间的判断,区分默认命名空间和自定义命名空间,并采用不同的解析方式。其中,bean标签的解析最为复杂和重要。 ... [详细]
  • 向QTextEdit拖放文件的方法及实现步骤
    本文介绍了在使用QTextEdit时如何实现拖放文件的功能,包括相关的方法和实现步骤。通过重写dragEnterEvent和dropEvent函数,并结合QMimeData和QUrl等类,可以轻松实现向QTextEdit拖放文件的功能。详细的代码实现和说明可以参考本文提供的示例代码。 ... [详细]
  • 开发笔记:加密&json&StringIO模块&BytesIO模块
    篇首语:本文由编程笔记#小编为大家整理,主要介绍了加密&json&StringIO模块&BytesIO模块相关的知识,希望对你有一定的参考价值。一、加密加密 ... [详细]
  • Java容器中的compareto方法排序原理解析
    本文从源码解析Java容器中的compareto方法的排序原理,讲解了在使用数组存储数据时的限制以及存储效率的问题。同时提到了Redis的五大数据结构和list、set等知识点,回忆了作者大学时代的Java学习经历。文章以作者做的思维导图作为目录,展示了整个讲解过程。 ... [详细]
  • 本文讨论了如何优化解决hdu 1003 java题目的动态规划方法,通过分析加法规则和最大和的性质,提出了一种优化的思路。具体方法是,当从1加到n为负时,即sum(1,n)sum(n,s),可以继续加法计算。同时,还考虑了两种特殊情况:都是负数的情况和有0的情况。最后,通过使用Scanner类来获取输入数据。 ... [详细]
  • 知识图谱——机器大脑中的知识库
    本文介绍了知识图谱在机器大脑中的应用,以及搜索引擎在知识图谱方面的发展。以谷歌知识图谱为例,说明了知识图谱的智能化特点。通过搜索引擎用户可以获取更加智能化的答案,如搜索关键词"Marie Curie",会得到居里夫人的详细信息以及与之相关的历史人物。知识图谱的出现引起了搜索引擎行业的变革,不仅美国的微软必应,中国的百度、搜狗等搜索引擎公司也纷纷推出了自己的知识图谱。 ... [详细]
  • ZSI.generate.Wsdl2PythonError: unsupported local simpleType restriction ... [详细]
  • Python正则表达式学习记录及常用方法
    本文记录了学习Python正则表达式的过程,介绍了re模块的常用方法re.search,并解释了rawstring的作用。正则表达式是一种方便检查字符串匹配模式的工具,通过本文的学习可以掌握Python中使用正则表达式的基本方法。 ... [详细]
  • Java在运行已编译完成的类时,是通过java虚拟机来装载和执行的,java虚拟机通过操作系统命令JAVA_HOMEbinjava–option来启 ... [详细]
author-avatar
手机用户2502856053
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有