Package org.gpel.model

Examples of org.gpel.model.GpelProcess


            try {
                // Create the script.
                bpel.create(BPELScriptType.BPEL2);

                GpelProcess gpelProcess = bpel.getGpelProcess();
                XMLUtil.saveXML(gpelProcess.xml(), bpelFile);

                WorkflowWSDL workflowWSDL = bpel.getWorkflowWSDL();
                XMLUtil.saveXML(workflowWSDL.getWsdlDefinitions().xml(), wsdlFile);

            } catch (IOException e) {
View Full Code Here


        if (bpelElement != null) {
            try {
                String bpelString = bpelElement.requiredText();
                XmlNamespace gpelNS = XmlInfosetBuilder.newInstance().newNamespace(BPELScript.GPEL, BPELScript.GPELNS);
                GpelConstants.GPEL_NS = gpelNS;
                this.gpelProcess = new GpelProcess(XMLUtil.stringToXmlElement(bpelString));
            } catch (RuntimeException e) {
                String error = "Failed to parse the BPEL document.";
                throw new GraphException(error, e);
            }
        }
View Full Code Here

            this.workflowPrefix = StringUtil.convertToJavaIdentifier(this.graph.getName());

            if (BPELScriptType.BPEL2 == type) {
                GpelConstants.GPEL_NS = XmlInfosetBuilder.newInstance().newNamespace(BPEL, BPEL2_NS);
                this.bpelNS = XmlInfosetBuilder.newInstance().newNamespace(BPEL, BPEL2_NS);
                this.process = new GpelProcess(bpelNS, bpelTargetNamespace);
            } else if (BPELScriptType.GPEL == type) {
                GpelConstants.GPEL_NS = XmlInfosetBuilder.newInstance().newNamespace(GPEL, GPELNS);
                this.bpelNS = XmlInfosetBuilder.newInstance().newNamespace(GPEL, GPELNS);
                this.process = new GpelProcess(bpelNS, bpelTargetNamespace);
            } else {
                throw new GraphException("Unknown BPEL type " + type);
            }

            // Target namespace of the workflow WSDL
View Full Code Here

        if (bpelElement != null) {
            try {
                String bpelString = bpelElement.requiredText();
                XmlNamespace gpelNS = XmlInfosetBuilder.newInstance().newNamespace(BPELScript.GPEL, BPELScript.GPELNS);
                GpelConstants.GPEL_NS = gpelNS;
                this.gpelProcess = new GpelProcess(XMLUtil.stringToXmlElement(bpelString));
            } catch (RuntimeException e) {
                String error = "Failed to parse the BPEL document.";
                throw new GraphException(error, e);
            }
        }
View Full Code Here

            try {
                // Create the script.
                bpel.create(BPELScriptType.BPEL2);

                GpelProcess gpelProcess = bpel.getGpelProcess();
                XMLUtil.saveXML(gpelProcess.xml(), bpelFile);

                WorkflowWSDL workflowWSDL = bpel.getWorkflowWSDL();
                XMLUtil.saveXML(workflowWSDL.getWsdlDefinitions().xml(), wsdlFile);

            } catch (IOException e) {
View Full Code Here

        XMLUtil.saveXML(workflow.toXML(), new File(this.temporalDirectory, filename + "-0.xwf"));

        // Create BPEL
        BPELScript bpel = new BPELScript(workflow);
        bpel.create(BPELScriptType.GPEL);
        GpelProcess gpelProcess = bpel.getGpelProcess();
        WorkflowWSDL workflowWSDL = bpel.getWorkflowWSDL();
        WsdlDefinitions definitions = workflowWSDL.getWsdlDefinitions();

        File bpelFile = new File(this.temporalDirectory, filename + XBayaConstants.BPEL_SUFFIX);
        File wsdlFile = new File(this.temporalDirectory, filename + XBayaConstants.WSDL_SUFFIX);
        XMLUtil.saveXML(gpelProcess.xml(), bpelFile);
        XMLUtil.saveXML(definitions.xml(), wsdlFile);

        // Save the workflow
        File workflowFile = new File(this.temporalDirectory, filename + XBayaConstants.WORKFLOW_FILE_SUFFIX);
        XMLUtil.saveXML(workflow.toXML(), workflowFile);

        // Read the workflow
        XmlElement workflowElement = XMLUtil.loadXML(workflowFile);
        workflow = new Workflow(workflowElement);

        // Create BPEL again
        bpel = new BPELScript(workflow);
        bpel.create(BPELScriptType.GPEL);
        gpelProcess = bpel.getGpelProcess();
        workflowWSDL = bpel.getWorkflowWSDL();
        definitions = workflowWSDL.getWsdlDefinitions();

        File bpelFile2 = new File(this.temporalDirectory, filename + "-2" + XBayaConstants.BPEL_SUFFIX);
        File wsdlFile2 = new File(this.temporalDirectory, filename + "-2" + XBayaConstants.WSDL_SUFFIX);
        XMLUtil.saveXML(gpelProcess.xml(), bpelFile2);
        XMLUtil.saveXML(definitions.xml(), wsdlFile2);

        File workflowFile2 = new File(this.temporalDirectory, filename + "-2" + XBayaConstants.WORKFLOW_FILE_SUFFIX);
        XMLUtil.saveXML(workflow.toXML(), workflowFile2);
View Full Code Here

        Workflow wf = this.engine.getGUI().getWorkflow();
        if (0 == wf.getGraph().getNodes().size()) {
            this.engine.getGUI().getErrorWindow().warning("Workflow is Empty");
            return;
        }
        GpelProcess process;
        try {

            int returnVal = this.bpelFileChooser.showSaveDialog(this.engine.getGUI().getFrame());
            if (returnVal == JFileChooser.APPROVE_OPTION) {
                File file = this.bpelFileChooser.getSelectedFile();

                String path = file.getPath();

                // Remove ".bpel" at the end if any
                if (path.endsWith(XBayaConstants.BPEL_SUFFIX)) {
                    path = path.substring(0, path.length() - XBayaConstants.BPEL_SUFFIX.length());
                }

                // Add ".bpel" at the end of the file name
                File bpelFile = new File(path + XBayaConstants.BPEL_SUFFIX);
                // Add ".wsdl" at the end of the file name
                File wsdlFile = new File(path + XBayaConstants.WSDL_SUFFIX);
                // todo this has to fix, for compilation purpose passing dummy value instead of xregistry url
                URI temp = null;
                try {
                    temp = new URI("temp");
                } catch (URISyntaxException e) {
                    e.printStackTrace(); // To change body of catch statement use File | Settings | File Templates.
                }
                process = wf.getOdeProcess(WSDLUtil.appendWSDLQuary(temp), this.engine.getConfiguration().getODEURL());
                String processString = process.xmlStringPretty();
                FileWriter writer = new FileWriter(bpelFile);
                writer.write(processString);
                writer.close();

                WsdlDefinitions workflowWSDL = wf.getOdeWorkflowWSDL(this.engine.getConfiguration().getDSCURL(),
View Full Code Here

        Workflow wf = this.engine.getWorkflow();
        if (0 == wf.getGraph().getNodes().size()) {
            this.engine.getErrorWindow().warning("Workflow is Empty");
            return;
        }
        GpelProcess process;
        try {

            int returnVal = this.bpelFileChooser.showSaveDialog(this.engine.getGUI().getFrame());
            if (returnVal == JFileChooser.APPROVE_OPTION) {
                File file = this.bpelFileChooser.getSelectedFile();

                String path = file.getPath();

                // Remove ".bpel" at the end if any
                if (path.endsWith(XBayaConstants.BPEL_SUFFIX)) {
                    path = path.substring(0, path.length() - XBayaConstants.BPEL_SUFFIX.length());
                }

                // Add ".bpel" at the end of the file name
                File bpelFile = new File(path + XBayaConstants.BPEL_SUFFIX);
                // Add ".wsdl" at the end of the file name
                File wsdlFile = new File(path + XBayaConstants.WSDL_SUFFIX);
                // todo this has to fix, for compilation purpose passing dummy value instead of xregistry url
                URI temp = null;
                try {
                    temp = new URI("temp");
                } catch (URISyntaxException e) {
                    e.printStackTrace(); // To change body of catch statement use File | Settings | File Templates.
                }
                process = wf.getOdeProcess(WSDLUtil.appendWSDLQuary(temp), this.engine.getConfiguration().getODEURL());
                String processString = process.xmlStringPretty();
                FileWriter writer = new FileWriter(bpelFile);
                writer.write(processString);
                writer.close();

                WsdlDefinitions workflowWSDL = wf.getOdeWorkflowWSDL(this.engine.getConfiguration().getDSCURL(),
View Full Code Here

            try {
                // Create the script.
                bpel.create(BPELScriptType.BPEL2);

                GpelProcess gpelProcess = bpel.getGpelProcess();
                XMLUtil.saveXML(gpelProcess.xml(), bpelFile);

                WorkflowWSDL workflowWSDL = bpel.getWorkflowWSDL();
                XMLUtil.saveXML(workflowWSDL.getWsdlDefinitions().xml(), wsdlFile);

            } catch (IOException e) {
View Full Code Here

            try {
                // Create the script.
                bpel.create(BPELScriptType.BPEL2);

                GpelProcess gpelProcess = bpel.getGpelProcess();
                XMLUtil.saveXML(gpelProcess.xml(), bpelFile);

                WorkflowWSDL workflowWSDL = bpel.getWorkflowWSDL();
                XMLUtil.saveXML(workflowWSDL.getWsdlDefinitions().xml(), wsdlFile);

            } catch (IOException e) {
View Full Code Here

TOP

Related Classes of org.gpel.model.GpelProcess

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.