|
|
|
@ -384,17 +384,11 @@ public class ProcessService {
|
|
|
|
|
* @param processInstanceId processInstanceId |
|
|
|
|
*/ |
|
|
|
|
public void removeTaskLogFile(Integer processInstanceId) { |
|
|
|
|
|
|
|
|
|
LogClientService logClient = null; |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
logClient = new LogClientService(); |
|
|
|
|
List<TaskInstance> taskInstanceList = findValidTaskListByProcessId(processInstanceId); |
|
|
|
|
|
|
|
|
|
if (CollectionUtils.isEmpty(taskInstanceList)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
try (LogClientService logClient = new LogClientService()) { |
|
|
|
|
for (TaskInstance taskInstance : taskInstanceList) { |
|
|
|
|
String taskLogPath = taskInstance.getLogPath(); |
|
|
|
|
if (StringUtils.isEmpty(taskInstance.getHost())) { |
|
|
|
@ -408,14 +402,9 @@ public class ProcessService {
|
|
|
|
|
// compatible old version
|
|
|
|
|
ip = taskInstance.getHost(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// remove task log from loggerserver
|
|
|
|
|
logClient.removeTaskLog(ip, port, taskLogPath); |
|
|
|
|
} |
|
|
|
|
} finally { |
|
|
|
|
if (logClient != null) { |
|
|
|
|
logClient.close(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -569,7 +558,7 @@ public class ProcessService {
|
|
|
|
|
processInstance.setConnects(processDefinition.getConnects()); |
|
|
|
|
|
|
|
|
|
// reset global params while there are start parameters
|
|
|
|
|
setGlobalParamIfCommanded(processDefinition,cmdParam); |
|
|
|
|
setGlobalParamIfCommanded(processDefinition, cmdParam); |
|
|
|
|
|
|
|
|
|
// curing global params
|
|
|
|
|
processInstance.setGlobalParams(ParameterUtils.curingGlobalParams( |
|
|
|
@ -1067,7 +1056,7 @@ public class ProcessService {
|
|
|
|
|
/** |
|
|
|
|
* complement data needs transform parent parameter to child. |
|
|
|
|
*/ |
|
|
|
|
private String getSubWorkFlowParam(ProcessInstanceMap instanceMap, ProcessInstance parentProcessInstance,Map<String,String> fatherParams) { |
|
|
|
|
private String getSubWorkFlowParam(ProcessInstanceMap instanceMap, ProcessInstance parentProcessInstance, Map<String, String> fatherParams) { |
|
|
|
|
// set sub work process command
|
|
|
|
|
String processMapStr = JSONUtils.toJsonString(instanceMap); |
|
|
|
|
Map<String, String> cmdParam = JSONUtils.toMap(processMapStr); |
|
|
|
@ -1111,13 +1100,13 @@ public class ProcessService {
|
|
|
|
|
Object localParams = subProcessParam.get(Constants.LOCAL_PARAMS); |
|
|
|
|
List<Property> allParam = JSONUtils.toList(JSONUtils.toJsonString(localParams), Property.class); |
|
|
|
|
Map<String, String> globalMap = this.getGlobalParamMap(parentProcessInstance.getGlobalParams()); |
|
|
|
|
Map<String,String> fatherParams = new HashMap<>(); |
|
|
|
|
Map<String, String> fatherParams = new HashMap<>(); |
|
|
|
|
if (CollectionUtils.isNotEmpty(allParam)) { |
|
|
|
|
for (Property info : allParam) { |
|
|
|
|
fatherParams.put(info.getProp(), globalMap.get(info.getProp())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
String processParam = getSubWorkFlowParam(instanceMap, parentProcessInstance,fatherParams); |
|
|
|
|
String processParam = getSubWorkFlowParam(instanceMap, parentProcessInstance, fatherParams); |
|
|
|
|
|
|
|
|
|
return new Command( |
|
|
|
|
commandType, |
|
|
|
@ -2124,8 +2113,6 @@ public class ProcessService {
|
|
|
|
|
/** |
|
|
|
|
* solve the branch rename bug |
|
|
|
|
* |
|
|
|
|
* @param processData |
|
|
|
|
* @param oldJson |
|
|
|
|
* @return String |
|
|
|
|
*/ |
|
|
|
|
public String changeJson(ProcessData processData, String oldJson) { |
|
|
|
@ -2180,6 +2167,7 @@ public class ProcessService {
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* add authorized resources |
|
|
|
|
* |
|
|
|
|
* @param ownResources own resources |
|
|
|
|
* @param userId userId |
|
|
|
|
*/ |
|
|
|
|