|
|
@ -637,6 +637,7 @@ public abstract class UpgradeDao { |
|
|
|
ObjectNode task = (ObjectNode) tasks.path(i); |
|
|
|
ObjectNode task = (ObjectNode) tasks.path(i); |
|
|
|
ObjectNode param = (ObjectNode) task.get("params"); |
|
|
|
ObjectNode param = (ObjectNode) task.get("params"); |
|
|
|
TaskDefinitionLog taskDefinitionLog = new TaskDefinitionLog(); |
|
|
|
TaskDefinitionLog taskDefinitionLog = new TaskDefinitionLog(); |
|
|
|
|
|
|
|
String taskType = task.get("type").asText(); |
|
|
|
if (param != null) { |
|
|
|
if (param != null) { |
|
|
|
JsonNode resourceJsonNode = param.get("resourceList"); |
|
|
|
JsonNode resourceJsonNode = param.get("resourceList"); |
|
|
|
if (resourceJsonNode != null && !resourceJsonNode.isEmpty()) { |
|
|
|
if (resourceJsonNode != null && !resourceJsonNode.isEmpty()) { |
|
|
@ -646,6 +647,13 @@ public abstract class UpgradeDao { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
taskDefinitionLog.setResourceIds(StringUtils.EMPTY); |
|
|
|
taskDefinitionLog.setResourceIds(StringUtils.EMPTY); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (TaskType.SUB_PROCESS.getDesc().equals(taskType)) { |
|
|
|
|
|
|
|
JsonNode jsonNodeDefinitionId = param.get("processDefinitionId"); |
|
|
|
|
|
|
|
if (jsonNodeDefinitionId != null) { |
|
|
|
|
|
|
|
param.put("processDefinitionCode", processDefinitionMap.get(jsonNodeDefinitionId.asInt()).getCode()); |
|
|
|
|
|
|
|
param.remove("processDefinitionId"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
param.put("conditionResult", task.get("conditionResult")); |
|
|
|
param.put("conditionResult", task.get("conditionResult")); |
|
|
|
param.put("dependence", task.get("dependence")); |
|
|
|
param.put("dependence", task.get("dependence")); |
|
|
|
taskDefinitionLog.setTaskParams(JSONUtils.toJsonString(param)); |
|
|
|
taskDefinitionLog.setTaskParams(JSONUtils.toJsonString(param)); |
|
|
@ -658,9 +666,9 @@ public abstract class UpgradeDao { |
|
|
|
} |
|
|
|
} |
|
|
|
taskDefinitionLog.setDescription(task.get("description").asText()); |
|
|
|
taskDefinitionLog.setDescription(task.get("description").asText()); |
|
|
|
taskDefinitionLog.setFlag(Constants.FLOWNODE_RUN_FLAG_NORMAL.equals(task.get("runFlag").asText()) ? Flag.YES : Flag.NO); |
|
|
|
taskDefinitionLog.setFlag(Constants.FLOWNODE_RUN_FLAG_NORMAL.equals(task.get("runFlag").asText()) ? Flag.YES : Flag.NO); |
|
|
|
taskDefinitionLog.setTaskType(task.get("type").asText()); |
|
|
|
taskDefinitionLog.setTaskType(taskType); |
|
|
|
taskDefinitionLog.setFailRetryInterval(task.get("retryInterval").asInt()); |
|
|
|
taskDefinitionLog.setFailRetryInterval(TaskType.SUB_PROCESS.getDesc().equals(taskType) ? 1 : task.get("retryInterval").asInt()); |
|
|
|
taskDefinitionLog.setFailRetryTimes(task.get("maxRetryTimes").asInt()); |
|
|
|
taskDefinitionLog.setFailRetryTimes(TaskType.SUB_PROCESS.getDesc().equals(taskType) ? 0 : task.get("maxRetryTimes").asInt()); |
|
|
|
taskDefinitionLog.setTaskPriority(JSONUtils.parseObject(JSONUtils.toJsonString(task.get("taskInstancePriority")), Priority.class)); |
|
|
|
taskDefinitionLog.setTaskPriority(JSONUtils.parseObject(JSONUtils.toJsonString(task.get("taskInstancePriority")), Priority.class)); |
|
|
|
String name = task.get("name").asText(); |
|
|
|
String name = task.get("name").asText(); |
|
|
|
taskDefinitionLog.setName(name); |
|
|
|
taskDefinitionLog.setName(name); |
|
|
|