Revision 43918
Added by Alessia Bardi over 7 years ago
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/repohi/UpdateWfParametersJobNode.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.io.StringReader; |
4 | 4 |
import java.util.HashMap; |
5 |
import java.util.List; |
|
5 | 6 |
import java.util.Map; |
6 | 7 |
|
8 |
import com.google.common.base.Joiner; |
|
9 |
import com.google.common.collect.Iterables; |
|
7 | 10 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
8 | 11 |
import eu.dnetlib.msro.workflows.graph.Arc; |
9 | 12 |
import eu.dnetlib.msro.workflows.nodes.SimpleJobNode; |
... | ... | |
61 | 64 |
} |
62 | 65 |
} |
63 | 66 |
|
64 |
if (paramsNode.selectNodes("//PARAM[@managedBy='system' and @required='true' and not(text())]").size() > 0) { |
|
67 |
final List<Node> emptySysParams = paramsNode.selectNodes("//PARAM[@managedBy='system' and @required='true' and not(text())]"); |
|
68 |
if (emptySysParams.size() > 0) { |
|
65 | 69 |
((Element) doc.selectSingleNode("//CONFIGURATION")).addAttribute("status", WorkflowsConstants.WorkflowStatus.WAIT_SYS_SETTINGS.toString()); |
66 |
throw new MSROException("Error: some system parameters are empty");
|
|
70 |
throw new MSROException("Error: the following system parameters are empty: "+ Joiner.on(",").join(Iterables.transform(emptySysParams, p -> p.asXML())));
|
|
67 | 71 |
} else if (paramsNode.selectNodes("//PARAM[@managedBy='user' and @required='true' and not(text())]").size() > 0) { |
68 | 72 |
((Element) doc.selectSingleNode("//CONFIGURATION")).addAttribute("status", WorkflowsConstants.WorkflowStatus.WAIT_USER_SETTINGS.toString()); |
69 | 73 |
} else { |
Also available in: Unified diff
Log which sys parameters are empty