Package org.gpel.model

Examples of org.gpel.model.GpelProcess


    if (0 == wf.getGraph().getNodes().size()) {
      this.engine.getErrorWindow().warning("Workflow is Empty");
      return;
    }
    new ODEDeploymentWindow(this.engine, true).show();
    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);

        process = wf.getOdeProcess(WSDLUtil.appendWSDLQuary(this.engine
            .getConfiguration().getXRegistryURL()), 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 {
        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

                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

     

//      new ODEClient().getInputs(workflow);
      BPELScript bpel = new BPELScript(workflow);
      bpel.create(BPELScriptType.GPEL);
      GpelProcess o = workflow.getGpelProcess();
      workflow.setGpelProcess(bpel.getGpelProcess());
      workflow.setWorkflowWSDL(bpel.getWorkflowWSDL()
          .getWsdlDefinitions());
     
     
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);
View Full Code Here

    try {
      String workflowName = workflow.getName();
      URI templateId = workflow.getUniqueWorkflowName();
      XBayaConfiguration configuration = this.xbayaEngine
          .getConfiguration();
      GpelProcess gpelProcess = null;
      String processString = null;

      gpelProcess = workflow.getOdeProcess(dscURI, configuration
          .getODEURL());
      processString = gpelProcess.xmlStringPretty();

      BufferedImage image = workflow.getImage();
      WsdlDefinitions workflowWSDL = workflow.getOdeWorkflowWSDL(dscURI,
          configuration.getODEURL());
View Full Code Here

                }
            }
        }

        // BPEL process
        GpelProcess process = workflow.getGpelProcess();
        if (processResource == null) {
            processResource = new GcProcessResource(PROCESS_GPEL_TITLE, process);
            links.add(processResource);
        } else {
            processResource.setXmlContent(process.xml());
        }

        // WSDL for the process
        workflowWSDLresource = wsdlResourceMap.remove(PROCESS_WSDL_TYTLE);
        WsdlDefinitions workflowWSDL = workflow.getWorkflowWSDL();
View Full Code Here

                wsdlResourceMap.put(wsdlTitle, wsdlResouece);
            }
        }

        // BPEL process
        GpelProcess process = new GpelProcess(processResource.getXmlContent());
        workflow.setGpelProcess(process);

        // WSDL for the process
        workflowWSDLresource = wsdlResourceMap.remove(PROCESS_WSDL_TYTLE);
        WsdlDefinitions workflowWSDL = new WsdlDefinitions(workflowWSDLresource
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

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.