Package org.apache.ode.bpel.iapi

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


    public PartnerRoleChannel createPartnerRoleChannel(QName processId, PortType portType,
                                                       Endpoint initialPartnerEndpoint) {
        // NOTE: This implementation assumes that the initial value of the
        // partner role determines the binding.
        ProcessConf pconf = _store.getProcessConfiguration(processId);
        Definition wsdl = pconf.getDefinitionForService(initialPartnerEndpoint.serviceName);
        if (wsdl == null) {
            throw new ContextException("Cannot find definition for service " + initialPartnerEndpoint.serviceName
                                       + " in the context of process "+processId);
        }
        return _server.createExternalService(pconf, initialPartnerEndpoint.serviceName, initialPartnerEndpoint.portName);
View Full Code Here


        switch (pse.type) {
            case ACTIVATED:
            case RETIRED:
                // bounce the process
                _server.unregister(pse.pid);
                ProcessConf pconf = _store.getProcessConfiguration(pse.pid);
                if (pconf != null) _server.register(pconf);
                else __log.debug("slighly odd: recevied event " + pse + " for process not in store!");
                break;
            case DISABLED:
            case UNDEPLOYED:
View Full Code Here

            __log.debug("Activate endpoint: " + endpoint);
        }

        OdeService service = new OdeService(this, endpoint);
        try {
            ProcessConf pc = _store.getProcessConfiguration(pid);
            ProcessModel compiledProcess = null;
            InputStream is = pc.getCBPInputStream();
            try {
                Serializer ofh = new Serializer(is);
                compiledProcess = ofh.readPModel();
            } finally {
                is.close();             
            }
            QName portType = null;
            for (Map.Entry<String, Endpoint> provide : pc.getProvideEndpoints().entrySet()) {
                if (provide.getValue().equals(endpoint)) {
                    PartnerLinkModel plink = compiledProcess.getPartnerLink(provide.getKey());
                    portType = plink.getMyRolePortType().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

        store.registerListener(new ProcessStoreListener() {
            public void onProcessStoreEvent(ProcessStoreEvent event) {
                // bounce the process
                _bpelServer.unregister(event.pid);
                if (event.type != ProcessStoreEvent.Type.UNDEPLOYED) {
                    ProcessConf conf = (ProcessConf) store.getProcessConfiguration(event.pid);
                    // Test processes always run with in-mem DAOs
                    // conf.setTransient(true);  //FIXME: what should we use for ProcessConfImpl
                    _bpelServer.register(conf);
                }
            }
View Full Code Here

            return;
        }
       
        try {
            for (QName procName : procs) {
                ProcessConf conf = (ProcessConf) store.getProcessConfiguration(procName);
                // Test processes always run with in-mem DAOs
                //conf.setTransient(true); //FIXME: what should we use for ProcessConfImpl
                _bpelServer.register(conf);
            }
        } catch (Exception ex) {
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

            throw new InvalidRequestException("Valid QName as process id expected.");
        }
        ProcessInfoDocument ret = ProcessInfoDocument.Factory.newInstance();
        TProcessInfo pi = ret.addNewProcessInfo();
        try {
            ProcessConf pconf = _store.getProcessConfiguration(procid);
            if (pconf == null)
                throw new ProcessNotFoundException("ProcessNotFound:" + procid);
            fillProcessInfo(pi, pconf, custom);
            fillProcessInfoSummary(conn, new TProcessInfo[]{pi}, custom);
        } catch (ManagementException me) {
View Full Code Here

        // Now we need the process conf objects, we need to be
        // careful since someone could have deleted them by now
        List<ProcessConf> confs = new LinkedList<ProcessConf>();
        for (QName pid : pids) {
            ProcessConf pconf = _store.getProcessConfiguration(pid);
            confs.add(pconf);
        }

        if (filter != null) {
            // TODO Implement process status filtering when status will exist
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.