Package org.jenkinsci.plugins.workflow.graph

Examples of org.jenkinsci.plugins.workflow.graph.FlowGraphWalker


    }

    private void writeDot(PrintWriter w) throws IOException {
        try {
            w.println("digraph G {");
            FlowGraphWalker walker = new FlowGraphWalker(run.getExecution());
            FlowNode n;
            while ((n=walker.next())!=null) {
                for (FlowNode p : n.getParents()) {
                    w.printf("%s -> %s%n",
                            p.getId(), n.getId());
                }
View Full Code Here


        FlowExecution exec = run.getExecution();
        if (exec == null) {
            return Collections.emptySet();
        }
        List<FlowNode> nodes = new ArrayList<FlowNode>();
        FlowGraphWalker walker = new FlowGraphWalker(exec);
        FlowNode n;
        while ((n = walker.next()) != null) {
            nodes.add(n);
        }
        Collections.reverse(nodes); // TODO would be more intuitive for FlowGraphWalker to do this to begin with
        return nodes;
    }
View Full Code Here

                assertBuildCompletedSuccessfully();

                story.j.assertLogContains("before=demo", b);
                story.j.assertLogContains("ONSLAVE=true", b);

                FlowGraphWalker walker = new FlowGraphWalker(e);
                List<WorkspaceAction> actions = new ArrayList<WorkspaceAction>();
                for (FlowNode n = walker.next(); n != null; n = walker.next()) {
                    WorkspaceAction a = n.getAction(WorkspaceAction.class);
                    if (a != null) {
                        actions.add(a);
                    }
                }
View Full Code Here

    /**
     * Creates a {@link Row} for each reachable {@link FlowNode}
     */
    private Map<FlowNode, Row> createAllRows() {
        heads = execution.getCurrentHeads();
        FlowGraphWalker walker = new FlowGraphWalker();
        walker.addHeads(heads);

        // nodes that we've visited
        Map<FlowNode,Row> rows = new LinkedHashMap<FlowNode, Row>();

        FlowNode n;
        while ((n=walker.next())!=null) {
            Row row = new Row(n);
            rows.put(n, row);
        }
        return rows;
    }
View Full Code Here

TOP

Related Classes of org.jenkinsci.plugins.workflow.graph.FlowGraphWalker

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.