|
|
|
@ -637,6 +637,7 @@ public abstract class UpgradeDao {
|
|
|
|
|
ObjectNode task = (ObjectNode) tasks.path(i); |
|
|
|
|
ObjectNode param = (ObjectNode) task.get("params"); |
|
|
|
|
TaskDefinitionLog taskDefinitionLog = new TaskDefinitionLog(); |
|
|
|
|
String taskType = task.get("type").asText(); |
|
|
|
|
if (param != null) { |
|
|
|
|
JsonNode resourceJsonNode = param.get("resourceList"); |
|
|
|
|
if (resourceJsonNode != null && !resourceJsonNode.isEmpty()) { |
|
|
|
@ -646,6 +647,13 @@ public abstract class UpgradeDao {
|
|
|
|
|
} else { |
|
|
|
|
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("dependence", task.get("dependence")); |
|
|
|
|
taskDefinitionLog.setTaskParams(JSONUtils.toJsonString(param)); |
|
|
|
@ -658,9 +666,9 @@ public abstract class UpgradeDao {
|
|
|
|
|
} |
|
|
|
|
taskDefinitionLog.setDescription(task.get("description").asText()); |
|
|
|
|
taskDefinitionLog.setFlag(Constants.FLOWNODE_RUN_FLAG_NORMAL.equals(task.get("runFlag").asText()) ? Flag.YES : Flag.NO); |
|
|
|
|
taskDefinitionLog.setTaskType(task.get("type").asText()); |
|
|
|
|
taskDefinitionLog.setFailRetryInterval(task.get("retryInterval").asInt()); |
|
|
|
|
taskDefinitionLog.setFailRetryTimes(task.get("maxRetryTimes").asInt()); |
|
|
|
|
taskDefinitionLog.setTaskType(taskType); |
|
|
|
|
taskDefinitionLog.setFailRetryInterval(TaskType.SUB_PROCESS.getDesc().equals(taskType) ? 1 : task.get("retryInterval").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)); |
|
|
|
|
String name = task.get("name").asText(); |
|
|
|
|
taskDefinitionLog.setName(name); |
|
|
|
|