Package org.drools.definition.process

Examples of org.drools.definition.process.Node


        if ( process == null ) {
            throw new IllegalArgumentException( "Could not read process" );
        } else {
            log.debug( "Processing " + process.getId() );
            StartNode start = process.getStart();
            Node target = start.getTo().getTo();
            if ( target instanceof Split ) {
                Split split = (Split) target;
                for ( Connection connection : split.getDefaultOutgoingConnections() ) {
                    String s = constraints.get( XmlBPMNProcessDumper.getUniqueNodeId( connection.getTo() ) );
                    if ( s != null ) {
View Full Code Here


            throw new IllegalArgumentException( "Could not read process" );
        }
        log.debug( "Processing " + process.getId() );
        result = new HashMap<String, String[]>();
        StartNode start = process.getStart();
        Node target = start.getTo().getTo();
        if ( target instanceof Split ) {
            Split split = (Split) target;
            for ( Connection connection : split.getDefaultOutgoingConnections() ) {
                Constraint constraint = split.getConstraint( connection );
                if ( constraint != null ) {
View Full Code Here

        if ( process == null ) {
            throw new IllegalArgumentException( "Could not read process" );
        } else {
            log.debug( "Processing " + process.getId() );
            StartNode start = process.getStart();
            Node target = start.getTo().getTo();
            if ( target instanceof Split ) {
                Split split = (Split) target;
                for ( Connection connection : split.getDefaultOutgoingConnections() ) {
                    String s = constraints.get( XmlBPMNProcessDumper.getUniqueNodeId( connection.getTo() ) );
                    if ( s != null ) {
View Full Code Here

            throw new IllegalArgumentException( "Could not read process" );
        }
        log.debug( "Processing " + process.getId() );
        result = new HashMap<String, String[]>();
        StartNode start = process.getStart();
        Node target = start.getTo().getTo();
        if ( target instanceof Split ) {
            Split split = (Split) target;
            for ( Connection connection : split.getDefaultOutgoingConnections() ) {
                Constraint constraint = split.getConstraint( connection );
                if ( constraint != null ) {
View Full Code Here

        if ( process == null ) {
            throw new IllegalArgumentException( "Could not read process" );
        } else {
            log.debug( "Processing " + process.getId() );
            StartNode start = process.getStart();
            Node target = start.getTo().getTo();
            if ( target instanceof Split ) {
                Split split = (Split) target;
                for ( Connection connection : split.getDefaultOutgoingConnections() ) {
                    String s = constraints.get( XmlBPMNProcessDumper.getUniqueNodeId( connection.getTo() ) );
                    if ( s != null ) {
View Full Code Here

    public static void updateProcess(RuleFlowProcess process,
                                     Collection<TransferNode> contentNodes) {

        for ( TransferNode tn : contentNodes ) {

            Node node = process.getNode( tn.getId() );

            updateNode( tn,
                        node );
        }
    }
View Full Code Here

    private static void updateForEach(ElementContainerTransferNode tn,
                                      ForEachNode foreachNode) {

        for ( TransferNode subTn : tn.getContentModel().getNodes() ) {

            Node subNode = foreachNode.getNode( subTn.getId() );

            updateNode( subTn,
                        subNode );
        }
    }
View Full Code Here

    private static void updateComposite(ElementContainerTransferNode tn,
                                        CompositeNode compositeNode) {

        for ( TransferNode subTn : tn.getContentModel().getNodes() ) {

            Node subNode = compositeNode.getNode( subTn.getId() );

            updateNode( subTn,
                        subNode );
        }
    }
View Full Code Here

                                                                RuleFlowContentModel model) {

        List<TransferNode> transferNodes = new ArrayList<TransferNode>();

        for ( int i = 0; i < nodes.length; i++ ) {
            Node node = nodes[i];
            TransferNode.Type type = getType( node );
            TransferNode tn = null;

            if ( type == TransferNode.Type.WORK_ITEM ) {

                tn = createWorkItemTransfernode( (WorkItemNode) node );

            } else if ( type == TransferNode.Type.HUMANTASK ) {

                tn = createHumanTaskTransferNode( (HumanTaskNode) node );

            } else if ( type == TransferNode.Type.SPLIT ) {

                tn = createSplitNode( (Split) node );

            } else if ( type == TransferNode.Type.FOR_EACH ) {

                tn = createRuleFlowContentModelTransferNode( ((ForEachNode) node).getNodes() );

            } else if ( type == TransferNode.Type.COMPOSITE ) {

                tn = createRuleFlowContentModelTransferNode( ((CompositeNode) node).getNodes() );

            } else {

                tn = new TransferNode();

            }

            /*
             * Creates connections for from and to this node.
             */
            createConnections( model,
                               node );

            tn.setId( node.getId() );

            //Guard needed to Migrate v4 ruleflows to v5
            Integer x = (Integer) node.getMetaData( "x" );
            if ( x != null ) {
                tn.setX( x );
            }

            // Guard needed to Migrate v4 ruleflows to v5
            Integer y = (Integer) node.getMetaData( "y" );
            if ( y != null ) {
                tn.setY( y );
            }

            Integer height = (Integer) node.getMetaData( "height" );
            if ( height != null ) {
                tn.setHeight( height );
            }

            Integer width = (Integer) node.getMetaData( "width" );
            if ( width != null ) {
                tn.setWidth( width );
            }

            tn.setName( node.getName() );
            tn.setType( type );

            transferNodes.add( tn );
        }

View Full Code Here

                event.getProcessInstance().getProcessName(),
                event.getProcessInstance().getId()) );
    }
   
    private String createNodeId(NodeInstance nodeInstance) {
        Node node = nodeInstance.getNode();
        if (node == null) {
            return "";
        }
        String nodeId = "" + node.getId();
        NodeContainer nodeContainer = node.getNodeContainer();
        while (nodeContainer != null) {
            if (nodeContainer instanceof Node) {
                node = (Node) nodeContainer;
                nodeContainer = node.getNodeContainer();
                // TODO fix this filter out hidden compositeNode inside ForEach node
                if (!(nodeContainer.getClass().getName().endsWith("ForEachNode"))) {
                    nodeId = node.getId() + ":" + nodeId;
                }
            } else {
                break;
            }
        }
View Full Code Here

TOP

Related Classes of org.drools.definition.process.Node

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.