예제 #1
0
 private void grabDataFromWorkflowPage() {
   wfDescription.setName(workflowPage.getWorkflowName());
   wfDescription.setControllerNode(workflowPage.getControllerNodeId());
   wfDescription.setAdditionalInformation(workflowPage.getAdditionalInformation());
   Map<String, ComponentInstallation> cmpInstallations = workflowPage.getComponentInstallations();
   for (String wfNodeId : cmpInstallations.keySet()) {
     wfDescription
         .getWorkflowNode(wfNodeId)
         .getComponentDescription()
         .setComponentInstallationAndUpdateConfiguration(cmpInstallations.get(wfNodeId));
   }
 }
예제 #2
0
  /** @return true if all selected instances available. */
  public synchronized boolean performValidations() {
    WorkflowDescriptionValidationResult validationResult =
        workflowExecutionService.validateWorkflowDescription(wfDescription);
    workflowPage.getWorkflowComposite().refreshContent();

    if (getContainer().getCurrentPage() == placeholdersPage) {

      if (!validationResult.isSucceeded()) {
        // MessageDialog.openError(getShell(), "Instances Error", "Some instances selected, are not
        // available anymore:\n\n"
        // + validationResult.toString() + "\n\nCheck your connection(s) or select (an)other
        // instance(s).");
        if (!errorVisible) {
          errorVisible = true;
          MessageBox errorBox =
              new MessageBox(Display.getCurrent().getActiveShell(), SWT.ICON_ERROR | SWT.OK);
          errorBox.setMessage(
              "Some instances selected, are not available anymore:\n\n"
                  + validationResult.toString()
                  + "\n\nCheck your connection(s) or select (an)other instance(s).");
          errorBox.setText("Instances Error");
          int id = errorBox.open();
          if (id == SWT.OK || id == SWT.CLOSE) {
            errorVisible = false;
          }
        }
        return false;
      }
    }

    if (validationResult.isSucceeded()) {
      return true;
    }

    return false;
  }
예제 #3
0
  @Override
  public boolean canFinish() {

    return workflowPage.canFinish()
        && (getContainer().getCurrentPage() == placeholdersPage || placeholdersPage.canFinish());
  }