我有一段代码:
List<ProcessInstance> instances =
processEngine.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).list();
instances.forEach(this::listProcessInstance);
private void listProcessInstance (ProcessInstance processInstance) {
log.info("<-------------- ProcessInstance ---------------> {} ", processInstance);
log.info(String.valueOf(processInstance.getProcessVariables()));
log.info("<-------------- ProcessInstance --------------->");
}
其中processvariables为空,但在表上有以下信息:
select * from ACT_RU_VARIABLE where PROC_INST_ID_ = 76759;
2条答案
按热度按时间flmtquvp1#
出于性能原因,默认查询不返回流程变量。必须显式地告诉查询包含以下变量:
bvjxkvbb2#
尝试以下代码段,