activiti 有taskid怎么获取activityimpl
发布网友
发布时间:2022-05-05 09:26
我来回答
共1个回答
热心网友
时间:2022-06-27 06:35
* 根据实例编号查找下一个任务节点
* @param String procInstId :实例编号
* @return
*/
public TaskDefinition nextTaskDefinition(String procInstId){
//流程标示
String processDefinitionId = historyService.createHistoricProcessInstanceQuery().processInstanceId(procInstId).singleResult().getProcessDefinitionId();
ProcessDefinitionEntity def = (ProcessDefinitionEntity) ((RepositoryServiceImpl)repositoryService).getDeployedProcessDefinition(processDefinitionId);
//执行实例
ExecutionEntity execution = (ExecutionEntity) runtimeService.createProcessInstanceQuery().processInstanceId(procInstId).singleResult();
//当前实例的执行到哪个节点
String activitiId = execution.getActivityId(