Exemplo n.º 1
0
  @Override
  public boolean performFinish() {

    grabDataFromWorkflowPage();

    if (!performValidations()) {
      return false;
    }

    if (!validateWorkflowAndPlaceholders() && !requestConfirmationForValidationErrorsWarnings()) {
      // keeps the execute dialog open
      return false;
    }

    WorkflowExecutionUtils.setNodeIdentifiersToTransientInCaseOfLocalOnes(
        wfDescription, localNodeId);
    saveWorkflow();

    grabDataFromPlaceholdersPage();

    Job job =
        new Job(Messages.workflowExecutionWizardTitle) {

          @Override
          protected IStatus run(IProgressMonitor monitor) {
            try {
              monitor.beginTask(Messages.settingUpWorkflow, 2);
              monitor.worked(1);
              executeWorkflowInBackground();
              monitor.worked(1);
              return Status.OK_STATUS;
            } finally {
              monitor.done();
            }
          };
        };
    job.setUser(true);
    job.schedule();

    return true;
  }