Examples of WorkflowProcess


Examples of org.kie.api.definition.process.WorkflowProcess

    }
   
    @SuppressWarnings("unchecked")
    protected DirectedGraph createDirectedGraph(Map<Long, Node> mapping) {
        DirectedGraph graph = new DirectedGraph();
        WorkflowProcess process = (WorkflowProcess) ((ProcessWrapper) ((GenericModelEditor) editor).getModel()).getProcess();
        for (org.kie.api.definition.process.Node processNode: process.getNodes()) {
            Node node = new Node();
            Integer width = (Integer) processNode.getMetaData().get("width");
            Integer height = (Integer) processNode.getMetaData().get("height");
            if (width == null || width <= 0) {
                width = 80;
            }
            if (height == null || height <= 0) {
                height = 40;
            }
            node.setSize(new Dimension(width, height));
            graph.nodes.add(node);
            mapping.put(processNode.getId(), node);
        }
        for (org.kie.api.definition.process.Node processNode: process.getNodes()) {
            for (List<Connection> connections: processNode.getIncomingConnections().values()) {
                for (Connection connection: connections) {
                    Node source = mapping.get(connection.getFrom().getId());
                    Node target = mapping.get(connection.getTo().getId());
                    graph.edges.add(new Edge(source, target));
View Full Code Here

Examples of org.kie.definition.process.WorkflowProcess

        editor.doSave(null);
    }
   
    protected DirectedGraph createDirectedGraph(Map<Long, Node> mapping) {
        DirectedGraph graph = new DirectedGraph();
        WorkflowProcess process = (WorkflowProcess) ((ProcessWrapper) ((GenericModelEditor) editor).getModel()).getProcess();
        for (org.kie.definition.process.Node processNode: process.getNodes()) {
            Node node = new Node();
            Integer width = (Integer) processNode.getMetaData().get("width");
            Integer height = (Integer) processNode.getMetaData().get("height");
            if (width == null || width <= 0) {
                width = 80;
            }
            if (height == null || height <= 0) {
                height = 40;
            }
            node.setSize(new Dimension(width, height));
            graph.nodes.add(node);
            mapping.put(processNode.getId(), node);
        }
        for (org.kie.definition.process.Node processNode: process.getNodes()) {
            for (List<Connection> connections: processNode.getIncomingConnections().values()) {
                for (Connection connection: connections) {
                    Node source = mapping.get(connection.getFrom().getId());
                    Node target = mapping.get(connection.getTo().getId());
                    graph.edges.add(new Edge(source, target));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.