/** * Validate the executed workflow and the placeholder page, if any warnings or errors exist. * * @return <code>false</code>, if at least one error or one warning exist */ private boolean validateWorkflowAndPlaceholders() { Map<String, String> componentNames = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER); WorkflowNodeValidatorUtils.initializeMessages(wfDescription); // workflow-error int workflowErrorAmount = WorkflowNodeValidatorUtils.getWorkflowErrors(); boolean workflowError = WorkflowNodeValidatorUtils.hasErrors(); componentNames.putAll(WorkflowNodeValidatorUtils.getComponentNames(Type.ERROR)); // workflow-warning int workflowWarningAmount = WorkflowNodeValidatorUtils.getWorkflowWarnings(); boolean workflowWarning = WorkflowNodeValidatorUtils.hasWarnings(); componentNames.putAll(WorkflowNodeValidatorUtils.getComponentNames(Type.WARNING)); // placeholder-error boolean placeholderError = placeholdersPage.validateErrors(); int placeholderErrorAmount = placeholdersPage.getErrorAmount(); componentNames.putAll(placeholdersPage.getComponentNamesWithError(true)); createErrorMessage( placeholderError, workflowError, workflowWarning, placeholderErrorAmount + workflowErrorAmount, workflowWarningAmount, componentNames); return !(placeholderError || workflowError || workflowWarning); }
private void grabDataFromPlaceholdersPage() { placeholdersPage.performFinish(); Map<String, Map<String, String>> placeholders = placeholdersPage.getPlaceholders(); for (String wfNodeId : placeholders.keySet()) { wfDescription .getWorkflowNode(wfNodeId) .getComponentDescription() .getConfigurationDescription() .setPlaceholders(placeholders.get(wfNodeId)); } }
@Override public boolean canFinish() { return workflowPage.canFinish() && (getContainer().getCurrentPage() == placeholdersPage || placeholdersPage.canFinish()); }