fix code smells

This commit is contained in:
Zhou Zheng 2020-09-08 12:51:29 +08:00
parent cf9576b74a
commit 8ba41dc131
2 changed files with 3 additions and 4 deletions

View File

@ -133,7 +133,7 @@ public class TaskInstanceController extends BaseController {
@PostMapping(value = "/force-success")
@ResponseStatus(HttpStatus.OK)
@ApiException(FORCE_TASK_SUCCESS_ERROR)
public Result forceSingleTaskSuccess(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
public Result<Object> forceSingleTaskSuccess(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName,
@RequestParam(value = "taskInstanceId") Integer taskInstanceId) {
String userNameReplace = StringUtils.replaceNRTtoUnderline(loginUser.getUserName());

View File

@ -278,13 +278,12 @@ public class DagHelper {
}
Collection<String> startVertexs = null;
if (StringUtils.isNotEmpty(parentNodeName)) {
startVertexs = dag.getSubsequentNodes(parentNodeName);
// if task is CONDITION node
TaskNode task = dag.getNode(parentNodeName);
if (task.isConditionsTask() && completeTaskList.containsKey(parentNodeName)) {
startVertexs = parseConditionTask(parentNodeName, task, completeTaskList);
}
else {
startVertexs = dag.getSubsequentNodes(parentNodeName);
}
} else {
startVertexs = dag.getBeginNode();
}