Tabnine Logo
WorkflowReport.getState
Code IndexAdd Tabnine to your IDE (free)

How to use
getState
method
in
org.apache.taverna.platform.report.WorkflowReport

Best Java code snippets using org.apache.taverna.platform.report.WorkflowReport.getState (Showing top 7 results out of 315)

origin: org.apache.taverna.engine/taverna-run-impl

/**
 * Returns the current {@link State} of the <code>Run</code>.
 * 
 * A <code>Run</code>'s state can be CREATED, RUNNING, COMPLETED, PAUSED,
 * CANCELLED or FAILED.
 * 
 * @return the current <code>State</code> of the <code>Run</code>
 */
public State getState() {
  return workflowReport.getState();
}
origin: org.apache.taverna.engine/taverna-run-impl

public void pause() throws RunStateException, InvalidExecutionIdException {
  synchronized (workflowReport) {
    State state = workflowReport.getState();
    if (!state.equals(RUNNING))
      throw new RunStateException("Cannot pause a " + state + " run.");
    executionEnvironment.getExecutionService().pause(executionID);
    workflowReport.setPausedDate(new Date());
  }
}
origin: org.apache.taverna.engine/taverna-run-impl

public void resume() throws RunStateException, InvalidExecutionIdException {
  synchronized (workflowReport) {
    State state = workflowReport.getState();
    if (!state.equals(PAUSED))
      throw new RunStateException("Cannot resume a " + state
          + " run.");
    executionEnvironment.getExecutionService().resume(executionID);
    workflowReport.setResumedDate(new Date());
  }
}
origin: org.apache.taverna.engine/taverna-run-impl

public void start() throws RunStateException, InvalidExecutionIdException {
  synchronized (workflowReport) {
    State state = workflowReport.getState();
    if (!state.equals(CREATED))
      throw new RunStateException("Cannot start a " + state + " run.");
    executionEnvironment.getExecutionService().start(executionID);
  }
}
origin: org.apache.taverna.engine/taverna-report-api

@Override
public String toString() {
  DateFormat dateFormat = new SimpleDateFormat(dateFormatString);
  StringBuilder sb = new StringBuilder();
  int max = getLongestName(this, 0);
  spaces(sb, max + 1);
  sb.append("Status    ");
  sb.append("Queued    ");
  sb.append("Started   ");
  sb.append("Complete  ");
  sb.append("Errors    ");
  sb.append("Started             ");
  sb.append("Finished\n");
  sb.append(getSubject().getName());
  spaces(sb, max - getSubject().getName().length() + 1);
  sb.append(getState());
  spaces(sb, 10 - getState().name().length());
  sb.append("-");
  spaces(sb, 9);
  sb.append("-");
  spaces(sb, 9);
  sb.append("-");
  spaces(sb, 9);
  sb.append("-");
  spaces(sb, 9);
  addDates(sb, getStartedDate(), getCompletedDate(), dateFormat);
  for (ProcessorReport processorReport : getProcessorReports())
    addProcessor(sb, max, 0, processorReport, dateFormat);
  return sb.toString();
}
origin: org.apache.taverna.engine/taverna-run-impl

  public void cancel() throws RunStateException, InvalidExecutionIdException {
    synchronized (workflowReport) {
      State state = workflowReport.getState();
      if (state.equals(CANCELLED) || state.equals(COMPLETED)
          || state.equals(FAILED))
        throw new RunStateException("Cannot cancel a " + state
            + " run.");
      executionEnvironment.getExecutionService().cancel(executionID);
      workflowReport.setCancelledDate(new Date());
    }
  }
}
origin: org.apache.taverna.engine/taverna-run-impl

try (Bundle bundle = DataBundles.openBundle(bundlePath)) {
  WorkflowReport wfReport = workflowReportJson.load(bundle);
  assertEquals(State.COMPLETED, wfReport.getState());
  assertNull(wfReport.getParentReport());
org.apache.taverna.platform.reportWorkflowReportgetState

Popular methods of WorkflowReport

  • addProcessorReport
  • getSubject
  • <init>
  • getCompletedDate
  • getCreatedDate
  • getDataBundle
  • getProcessorReports
  • getStartedDate
  • setParentReport
  • addDates
  • addInvocation
  • addProcessor
  • addInvocation,
  • addProcessor,
  • addReportListener,
  • getCancelledDate,
  • getInvocations,
  • getLongestName,
  • getParentReport,
  • getPausedDate,
  • getPausedDates

Popular in Java

  • Parsing JSON documents to java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (Timer)
  • notifyDataSetChanged (ArrayAdapter)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now