修复工作流创建流程时,流程名可能不存在的问题
This commit is contained in:
parent
f106afc0f9
commit
79228bd947
@ -289,7 +289,12 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 创建流程实例
|
// 创建流程实例
|
||||||
ProcessInstance instance = runtimeService.startProcessInstanceById(definition.getId(), businessKey, variables);
|
ProcessInstance instance = runtimeService.createProcessInstanceBuilder()
|
||||||
|
.processDefinitionId(definition.getId())
|
||||||
|
.businessKey(businessKey)
|
||||||
|
.name(definition.getName().trim())
|
||||||
|
.variables(variables)
|
||||||
|
.start();
|
||||||
// 设置流程名字
|
// 设置流程名字
|
||||||
runtimeService.setProcessInstanceName(instance.getId(), definition.getName());
|
runtimeService.setProcessInstanceName(instance.getId(), definition.getName());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user