Package org.gpel.model

Examples of org.gpel.model.GpelSequence


        //
        // If block
        //
        EndifNode endifNode = getEndifNode(ifNode);
        GpelSequence ifSequence = createIfSequence(ifNode, endifNode, true, parentBlock);
        GpelIf gpelIf = new GpelIf(this.bpelNS, condition, ifSequence);

        //
        // Else block
        //
        GpelSequence elseSequence = createIfSequence(ifNode, endifNode, false, parentBlock);
        GpelElse gpelElse = new GpelElse(this.bpelNS, elseSequence);
        gpelIf.setElse(gpelElse);

        //
        // Create global variables for endif.
View Full Code Here


    private GpelSequence createIfSequence(IfNode ifNode, EndifNode endifNode, boolean ifBlock,
            Collection<Node> parentBlock) throws GraphException {
        Set<Node> block = getIfBlock(ifNode, ifBlock);
        parentBlock.removeAll(block);
        GpelSequence sequence = new GpelSequence(this.bpelNS);
        addBlock(block, sequence);

        // Create a copy to global variable.
        List<DataPort> outputPorts = endifNode.getOutputPorts();
        ArrayList<GpelAssignCopy> copies = new ArrayList<GpelAssignCopy>();
        for (int i = 0; i < outputPorts.size(); i++) {
            DataPort outputPort = outputPorts.get(i);
            String variable = outputPort.getID() + OUTPUT_SUFFIX;
            int index = ifBlock ? i : i + outputPorts.size();
            DataPort inputPort = endifNode.getInputPort(index);
            Port fromPort = inputPort.getFromPort();
            GpelAssignCopyFrom from = createAssignCopyFrom(fromPort);
            GpelAssignCopyTo to = new GpelAssignCopyTo(this.bpelNS);
            to.setVariable(variable);
            GpelAssignCopy copy = new GpelAssignCopy(this.bpelNS, from, to);
            copies.add(copy);
        }
        GpelAssign assign = new GpelAssign(this.bpelNS, copies);
        sequence.addActivity(assign);

        return sequence;
    }
View Full Code Here

        //
        // normal block
        //
        EndBlockNode endBlockNode = getEndBlockNode(blockNode);
        GpelSequence normalSequence = createBlockSequence(blockNode, endBlockNode, true, parentBlock);
        GpelScope scope = new GpelScope(this.bpelNS, normalSequence);

        //
        // exception block
        //
View Full Code Here

    private GpelSequence createBlockSequence(BlockNode blockNode, EndBlockNode endBlockNode, boolean blockBlock,
            Collection<Node> parentBlock) throws GraphException {
        Set<Node> block = getBlockBlock(blockNode, blockBlock);
        parentBlock.removeAll(block);
        GpelSequence sequence = new GpelSequence(this.bpelNS);
        addBlock(block, sequence);

        // Create a copy to global variable.
        List<DataPort> outputPorts = endBlockNode.getOutputPorts();
        ArrayList<GpelAssignCopy> copies = new ArrayList<GpelAssignCopy>();
        for (int i = 0; i < outputPorts.size(); i++) {
            DataPort outputPort = outputPorts.get(i);
            String variable = outputPort.getID() + OUTPUT_SUFFIX;
            int index = blockBlock ? i : i + outputPorts.size();
            DataPort inputPort = endBlockNode.getInputPort(index);
            Port fromPort = inputPort.getFromPort();
            GpelAssignCopyFrom from = createAssignCopyFrom(fromPort);
            GpelAssignCopyTo to = new GpelAssignCopyTo(this.bpelNS);
            to.setVariable(variable);
            GpelAssignCopy copy = new GpelAssignCopy(this.bpelNS, from, to);
            copies.add(copy);
        }
        GpelAssign assign = new GpelAssign(this.bpelNS, copies);
        sequence.addActivity(assign);

        return sequence;
    }
View Full Code Here

TOP

Related Classes of org.gpel.model.GpelSequence

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.