|
|
@ -299,7 +299,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
List<TaskDefinitionLog> taskDefinitionLogs = generateTaskDefinitionList(taskDefinitionJson); |
|
|
|
List<TaskDefinitionLog> taskDefinitionLogs = generateTaskDefinitionList(taskDefinitionJson); |
|
|
|
List<ProcessTaskRelationLog> taskRelationList = generateTaskRelationList(taskRelationJson, taskDefinitionLogs); |
|
|
|
List<ProcessTaskRelationLog> taskRelationList = generateTaskRelationList(taskRelationJson, taskDefinitionLogs); |
|
|
|
|
|
|
|
|
|
|
|
long processDefinitionCode = CodeGenerateUtils.getInstance().genCode(); |
|
|
|
long processDefinitionCode = CodeGenerateUtils.genCode(); |
|
|
|
ProcessDefinition processDefinition = |
|
|
|
ProcessDefinition processDefinition = |
|
|
|
new ProcessDefinition(projectCode, name, processDefinitionCode, description, |
|
|
|
new ProcessDefinition(projectCode, name, processDefinitionCode, description, |
|
|
|
globalParams, locations, timeout, loginUser.getId()); |
|
|
|
globalParams, locations, timeout, loginUser.getId()); |
|
|
@ -360,7 +360,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
|
|
|
|
|
|
|
|
long processDefinitionCode; |
|
|
|
long processDefinitionCode; |
|
|
|
try { |
|
|
|
try { |
|
|
|
processDefinitionCode = CodeGenerateUtils.getInstance().genCode(); |
|
|
|
processDefinitionCode = CodeGenerateUtils.genCode(); |
|
|
|
} catch (CodeGenerateException e) { |
|
|
|
} catch (CodeGenerateException e) { |
|
|
|
throw new ServiceException(Status.INTERNAL_SERVER_ERROR_ARGS); |
|
|
|
throw new ServiceException(Status.INTERNAL_SERVER_ERROR_ARGS); |
|
|
|
} |
|
|
|
} |
|
|
@ -1233,7 +1233,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
// build process definition
|
|
|
|
// build process definition
|
|
|
|
processDefinition = new ProcessDefinition(projectCode, |
|
|
|
processDefinition = new ProcessDefinition(projectCode, |
|
|
|
processDefinitionName, |
|
|
|
processDefinitionName, |
|
|
|
CodeGenerateUtils.getInstance().genCode(), |
|
|
|
CodeGenerateUtils.genCode(), |
|
|
|
"", |
|
|
|
"", |
|
|
|
"[]", null, |
|
|
|
"[]", null, |
|
|
|
0, loginUser.getId()); |
|
|
|
0, loginUser.getId()); |
|
|
@ -1388,7 +1388,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
sqlParameters.setSqlType(SqlType.NON_QUERY.ordinal()); |
|
|
|
sqlParameters.setSqlType(SqlType.NON_QUERY.ordinal()); |
|
|
|
sqlParameters.setLocalParams(Collections.emptyList()); |
|
|
|
sqlParameters.setLocalParams(Collections.emptyList()); |
|
|
|
taskDefinition.setTaskParams(JSONUtils.toJsonString(sqlParameters)); |
|
|
|
taskDefinition.setTaskParams(JSONUtils.toJsonString(sqlParameters)); |
|
|
|
taskDefinition.setCode(CodeGenerateUtils.getInstance().genCode()); |
|
|
|
taskDefinition.setCode(CodeGenerateUtils.genCode()); |
|
|
|
taskDefinition.setTaskType(TASK_TYPE_SQL); |
|
|
|
taskDefinition.setTaskType(TASK_TYPE_SQL); |
|
|
|
taskDefinition.setFailRetryTimes(0); |
|
|
|
taskDefinition.setFailRetryTimes(0); |
|
|
|
taskDefinition.setFailRetryInterval(0); |
|
|
|
taskDefinition.setFailRetryInterval(0); |
|
|
@ -1433,7 +1433,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
processDefinition.setProjectCode(projectCode); |
|
|
|
processDefinition.setProjectCode(projectCode); |
|
|
|
processDefinition.setUserId(loginUser.getId()); |
|
|
|
processDefinition.setUserId(loginUser.getId()); |
|
|
|
try { |
|
|
|
try { |
|
|
|
processDefinition.setCode(CodeGenerateUtils.getInstance().genCode()); |
|
|
|
processDefinition.setCode(CodeGenerateUtils.genCode()); |
|
|
|
} catch (CodeGenerateException e) { |
|
|
|
} catch (CodeGenerateException e) { |
|
|
|
log.error( |
|
|
|
log.error( |
|
|
|
"Save process definition error because generate process definition code error, projectCode:{}.", |
|
|
|
"Save process definition error because generate process definition code error, projectCode:{}.", |
|
|
@ -1456,7 +1456,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
taskDefinitionLog.setOperator(loginUser.getId()); |
|
|
|
taskDefinitionLog.setOperator(loginUser.getId()); |
|
|
|
taskDefinitionLog.setOperateTime(now); |
|
|
|
taskDefinitionLog.setOperateTime(now); |
|
|
|
try { |
|
|
|
try { |
|
|
|
long code = CodeGenerateUtils.getInstance().genCode(); |
|
|
|
long code = CodeGenerateUtils.genCode(); |
|
|
|
taskCodeMap.put(taskDefinitionLog.getCode(), code); |
|
|
|
taskCodeMap.put(taskDefinitionLog.getCode(), code); |
|
|
|
taskDefinitionLog.setCode(code); |
|
|
|
taskDefinitionLog.setCode(code); |
|
|
|
} catch (CodeGenerateException e) { |
|
|
|
} catch (CodeGenerateException e) { |
|
|
@ -2074,7 +2074,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
Map<Long, Long> taskCodeMap = new HashMap<>(); |
|
|
|
Map<Long, Long> taskCodeMap = new HashMap<>(); |
|
|
|
for (TaskDefinitionLog taskDefinitionLog : taskDefinitionLogs) { |
|
|
|
for (TaskDefinitionLog taskDefinitionLog : taskDefinitionLogs) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
long taskCode = CodeGenerateUtils.getInstance().genCode(); |
|
|
|
long taskCode = CodeGenerateUtils.genCode(); |
|
|
|
taskCodeMap.put(taskDefinitionLog.getCode(), taskCode); |
|
|
|
taskCodeMap.put(taskDefinitionLog.getCode(), taskCode); |
|
|
|
taskDefinitionLog.setCode(taskCode); |
|
|
|
taskDefinitionLog.setCode(taskCode); |
|
|
|
} catch (CodeGenerateException e) { |
|
|
|
} catch (CodeGenerateException e) { |
|
|
@ -2097,7 +2097,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
} |
|
|
|
} |
|
|
|
final long oldProcessDefinitionCode = processDefinition.getCode(); |
|
|
|
final long oldProcessDefinitionCode = processDefinition.getCode(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
processDefinition.setCode(CodeGenerateUtils.getInstance().genCode()); |
|
|
|
processDefinition.setCode(CodeGenerateUtils.genCode()); |
|
|
|
} catch (CodeGenerateException e) { |
|
|
|
} catch (CodeGenerateException e) { |
|
|
|
log.error("Generate process definition code error, projectCode:{}.", targetProjectCode, e); |
|
|
|
log.error("Generate process definition code error, projectCode:{}.", targetProjectCode, e); |
|
|
|
putMsg(result, Status.INTERNAL_SERVER_ERROR_ARGS); |
|
|
|
putMsg(result, Status.INTERNAL_SERVER_ERROR_ARGS); |
|
|
|