Package org.jenkinsci.plugins.workflow.steps

Examples of org.jenkinsci.plugins.workflow.steps.FlowInterruptedException


     */
    @RequirePOST
    public HttpResponse doAbort() throws IOException, ServletException {
        preSubmissionCheck();

        FlowInterruptedException e = new FlowInterruptedException(Result.ABORTED, new Rejection(User.current()));
        outcome = new Outcome(null,e);
        getContext().onFailure(e);

        postSettlement();

View Full Code Here


    public boolean cancel(final CauseOfInterruption... causes) {
        // 'stopped' and 'thread' are updated atomically
        final CpsThread t;
        synchronized (this) {
            if (isDone())  return false;   // already complete
            stopped = new FlowInterruptedException(Result.ABORTED, causes); // TODO: the fact that I'm hard-coding exception seems to indicate an abstraction leak. Come back and think about this.
            t = this.thread;
        }

        if (t!=null) {
            t.getExecution().runInCpsVmThread(new FutureCallback<CpsThreadGroup>() {
View Full Code Here

    // TODO record the stage it got to and display that
    private static void cancel(StepContext context, StepContext newer) throws IOException, InterruptedException {
        println(context, "Canceled since " + newer.get(Run.class).getDisplayName() + " got here");
        println(newer, "Canceling older " + context.get(Run.class).getDisplayName());
        context.onFailure(new FlowInterruptedException(Result.NOT_BUILT, new CanceledCause(newer.get(Run.class))));
    }
View Full Code Here

    @Override
    public void interrupt(Result result, CauseOfInterruption... causes) throws IOException, InterruptedException {
        setResult(result);

        final FlowInterruptedException ex = new FlowInterruptedException(result,causes);

        // stop all ongoing activities
        Futures.addCallback(getCurrentExecutions(), new FutureCallback<List<StepExecution>>() {
            @Override
            public void onSuccess(List<StepExecution> l) {
View Full Code Here

TOP

Related Classes of org.jenkinsci.plugins.workflow.steps.FlowInterruptedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.