String condition = transInst.getLoop().getCondition();
calculateTheAliveValue(token, condition);
if (rtCtx.isEnableTrace() && token.isAlive()) {
ProcessInstanceTrace trace = new ProcessInstanceTrace();
trace.setProcessInstanceId(e.getToken().getProcessInstanceId());
trace.setStepNumber(e.getToken().getStepNumber() + 1);
trace.setType(ProcessInstanceTrace.LOOP_TYPE);
trace.setFromNodeId(transInst.getLoop().getFromNode().getId());
trace.setToNodeId(transInst.getLoop().getToNode().getId());
trace.setEdgeId(transInst.getLoop().getId());
//TODO wmj2003 一旦token从当前边上经过,那么就保存流程运行轨迹,这里应该是insert
rtCtx.getPersistenceService().saveOrUpdateProcessInstanceTrace(
trace);
}
}