Package org.apache.ode.bpel.iapi

Examples of org.apache.ode.bpel.iapi.ProcessConf


    public static AxisService createAxisService(AxisConfiguration axisConfiguration,
                                                BPELProcessProxy processProxy) throws AxisFault {
        QName serviceName = processProxy.getServiceName();
        String portName = processProxy.getPort();
        Definition wsdlDefinition = processProxy.getWsdlDefinition();
        ProcessConf processConfiguration = processProxy.getProcessConfiguration();

        if (log.isDebugEnabled()) {
            log.debug("Creating AxisService: Service=" + serviceName + " port=" + portName +
                      " WSDL=" + wsdlDefinition.getDocumentBaseURI() + " BPEL=" +
                      processConfiguration.getBpelDocument());
        }

        WSDL11ToAxisServiceBuilder serviceBuilder = createAxisServiceBuilder(processProxy);

        /** Need to figure out a way to handle service name extractoin. According to my perspective extracting
View Full Code Here


    private static AxisService populateAxisService(BPELProcessProxy processProxy,
                                                   AxisConfiguration axisConfiguration,
                                                   WSDL11ToAxisServiceBuilder serviceBuilder)
            throws AxisFault {
        ProcessConf pConf = processProxy.getProcessConfiguration();
        AxisService axisService = serviceBuilder.populateService();
        axisService.setParent(axisConfiguration);
        axisService.setWsdlFound(true);
        axisService.setCustomWsdl(true);
        axisService.setClassLoader(axisConfiguration.getServiceClassLoader());
        URL wsdlUrl = null;
        for (File file : pConf.getFiles()) {
            if (file.getAbsolutePath().
                    indexOf(processProxy.getWsdlDefinition().getDocumentBaseURI()) > 0) {
                try {
                    wsdlUrl = file.toURI().toURL();
                } catch (MalformedURLException e) {
                    String errorMessage = "Cannot convert File URI to URL.";
                    handleException(pConf.getProcessId(), errorMessage, e);
                }
            }
        }
        if (wsdlUrl != null) {
            axisService.setFileName(wsdlUrl);
        }

        Utils.setEndpointsToAllUsedBindings(axisService);

        //axisService.addParameter(new Parameter("useOriginalwsdl", "true"));
        //axisService.addParameter(new Parameter("modifyUserWSDLPortAddress", "true"));
        //axisService.addParameter(new Parameter("setEndpointsToAllUsedBindings", "true"));

        /* Setting service type to use in service management*/
        axisService.addParameter(ServerConstants.SERVICE_TYPE, "bpel");

        /* Process ID as a service parameter to use with process try-it*/
        axisService.addParameter(BPELConstants.PROCESS_ID, pConf.getProcessId());

        /* Fix for losing of security configuration  when updating BPEL package*/
        axisService.addParameter(new Parameter(CarbonConstants.PRESERVE_SERVICE_HISTORY_PARAM,
                                               "true"));
        axisService.addParameter(
View Full Code Here

    private static WSDL11ToAxisServiceBuilder createAxisServiceBuilder(BPELProcessProxy processProxy)
            throws AxisFault {
        Definition wsdlDef = processProxy.getWsdlDefinition();
        QName serviceName = processProxy.getServiceName();
        String portName = processProxy.getPort();
        ProcessConf pConf = processProxy.getProcessConfiguration();
        QName pid = pConf.getProcessId();
        InputStream wsdlInStream = null;

        URI wsdlBaseURI = pConf.getBaseURI()
                .resolve(wsdlDef.getDocumentBaseURI());
        try {
            wsdlInStream = wsdlBaseURI.toURL().openStream();
        } catch (MalformedURLException e) {
            String errMsg = "Malformed WSDL base URI.";
View Full Code Here

                        response.addChild(nameElmt);
                    }
                    sendResponse(factory, messageContext, "listProcessesResponse", response);
                } else if (operation.equals("getProcessPackage")) {
                    OMElement qnamePart = messageContext.getEnvelope().getBody().getFirstElement().getFirstElement();
                    ProcessConf process = _store.getProcessConfiguration(OMUtils.getTextAsQName(qnamePart));
                    if (process == null) {
                        throw new OdeFault("Could not find process: " + qnamePart.getTextAsQName());
                    }
                    String packageName = _store.getProcessConfiguration(OMUtils.getTextAsQName(qnamePart)).getPackage();
                    OMElement response = factory.createOMElement("packageName", null);
View Full Code Here

    QName qName2 = new QName("http://ode/bpel/unit-test", "HelloWorld2-2");
    QName qName3 = new QName("http://ode/bpel/unit-test", "HelloWorld2-3");

    @Test public void testRetireOld() throws Throwable {
        deploy("/bpel/2.0/TestVersionedRedeploy/HelloWorld-1");
        ProcessConf conf = store.getProcessConfiguration(qName1);
        Assert.assertEquals(ProcessState.ACTIVE, conf.getState());

        deploy("/bpel/2.0/TestVersionedRedeploy/HelloWorld-2");

        // Now 1 should be retired and 2 active
        conf = store.getProcessConfiguration(qName1);
        Assert.assertEquals(ProcessState.RETIRED, conf.getState());
        conf = store.getProcessConfiguration(qName2);
        Assert.assertEquals(ProcessState.ACTIVE, conf.getState());

        deploy("/bpel/2.0/TestVersionedRedeploy/HelloWorld-3");

        // 1 and 2 should be retired and 3 active
        conf = store.getProcessConfiguration(qName1);
        Assert.assertEquals(ProcessState.RETIRED, conf.getState());
        conf = store.getProcessConfiguration(qName2);
        Assert.assertEquals(ProcessState.RETIRED, conf.getState());
        conf = store.getProcessConfiguration(qName3);
        Assert.assertEquals(ProcessState.ACTIVE, conf.getState());
    }
View Full Code Here

    }

    private void handleEvent(ProcessStoreEvent pse) {
        __log.debug("Process store event: " + pse);
        ProcessConf pconf = _store.getProcessConfiguration(pse.pid);
        switch (pse.type) {
            case DEPLOYED:
                if (pconf != null) {
                    /*
                     * If and only if an old process exists with the same pid, the old process is cleaned up.
View Full Code Here

        OdeService service=_activeOdeServices.get(endpoint);
        if(service == null)
            service = new OdeService(this, endpoint);
        try {
            ProcessConf pc = _store.getProcessConfiguration(pid);
            InputStream is = pc.getCBPInputStream();
            OProcess compiledProcess = null;
            try {
                Serializer ofh = new Serializer(is);
                compiledProcess = ofh.readOProcess();
            } finally {
                is.close();
            }
            QName portType = null;
            for (Map.Entry<String, Endpoint> provide : pc.getProvideEndpoints().entrySet()) {
                if (provide.getValue().equals(endpoint)) {
                    OPartnerLink plink = compiledProcess.getPartnerLink(provide.getKey());
                    portType = plink.myRolePortType.getQName();
                    break;
                }
            }
            if (portType == null) {
                if (__log.isDebugEnabled()) {
                    __log.debug("Could not find PortType for endpoint");
                }
            } else {
                Definition def = pc.getDefinitionForService(endpoint.serviceName);
                if (def == null) {
                    __log.debug("Could not find definition for service: " + endpoint.serviceName);
                } else {
                    def = new WSDLFlattener(def).getDefinition(portType);
                    Document doc = WSDLFactory.newInstance().newWSDLWriter().getDocument(def);
View Full Code Here

                    }

                    // We have to do this after we set the property, since the
                    // ProcessConf object
                    // is immutable.
                    ProcessConf proc = _store.getProcessConfiguration(pid);
                    if (proc == null)
                        throw new ProcessNotFoundException("ProcessNotFound:" + pid);

                    fillProcessInfo(pi, proc, new ProcessInfoCustomizer(ProcessInfoCustomizer.Item.PROPERTIES));
View Full Code Here

                        __log.debug("Error setting property value for " + pid + "; " + propertyName, ex);
                    }

                    // We have to do this after we set the property, since the
                    // ProcessConf object is immutable.
                    ProcessConf proc = _store.getProcessConfiguration(pid);
                    if (proc == null)
                        throw new ProcessNotFoundException("ProcessNotFound:" + pid);

                    fillProcessInfo(pi, proc, new ProcessInfoCustomizer(ProcessInfoCustomizer.Item.PROPERTIES));
View Full Code Here

        try {
            _db.exec(new BpelDatabase.Callable<Object>() {
                public Object run(BpelDAOConnection conn) {
                    Collection<ProcessInstanceDAO> instances = conn.instanceQuery(instanceFilter);
                    for (ProcessInstanceDAO instance : instances) {
                        ProcessConf proc = _store.getProcessConfiguration(instance.getProcess().getProcessId());
                        if (proc == null)
                            throw new ProcessNotFoundException("ProcessNotFound:" + instance.getProcess().getProcessId());
                        // delete the instance and all related data
                        instance.delete(EnumSet.allOf(CLEANUP_CATEGORY.class));
                        ret.add(instance.getInstanceId());
View Full Code Here

TOP

Related Classes of org.apache.ode.bpel.iapi.ProcessConf

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.