Search in sources :

Example 1 with ProcessStore

use of org.apache.ode.bpel.iapi.ProcessStore in project carbon-business-process by wso2.

the class BPELBindingContextImpl method createPartnerRoleChannel.

public PartnerRoleChannel createPartnerRoleChannel(QName processId, PortType portType, Endpoint initialPartnerEndpoint) {
    ProcessConf processConfiguration = ((ProcessStore) bpelServer.getMultiTenantProcessStore()).getProcessConfiguration(processId);
    Definition wsdl = processConfiguration.getDefinitionForService(initialPartnerEndpoint.serviceName);
    if (wsdl == null) {
        throw new ContextException("Cannot find definition for service " + initialPartnerEndpoint.serviceName + " in the context of process " + processId);
    }
    return createPartnerService(processConfiguration, initialPartnerEndpoint.serviceName, initialPartnerEndpoint.portName);
}
Also used : TenantProcessStore(org.wso2.carbon.bpel.core.ode.integration.store.TenantProcessStore) ProcessStore(org.apache.ode.bpel.iapi.ProcessStore) ProcessConf(org.apache.ode.bpel.iapi.ProcessConf) Definition(javax.wsdl.Definition) ContextException(org.apache.ode.bpel.iapi.ContextException)

Example 2 with ProcessStore

use of org.apache.ode.bpel.iapi.ProcessStore in project carbon-business-process by wso2.

the class BPELBindingContextImpl method activateMyRoleEndpoint.

public EndpointReference activateMyRoleEndpoint(QName processId, Endpoint myRoleEndpoint) {
    try {
        if (log.isDebugEnabled()) {
            log.debug("Activating MyRole endpoint for process: " + processId + " endpoint: " + myRoleEndpoint);
        }
        ProcessConf processConfiguration = ((ProcessStore) bpelServer.getMultiTenantProcessStore()).getProcessConfiguration(processId);
        BPELProcessProxy processProxy = publishAxisService(processConfiguration, myRoleEndpoint.serviceName, myRoleEndpoint.portName);
        serviceEprMap.put(processProxy, processProxy.getServiceReference());
        updateServiceList(getTenantId(processId), myRoleEndpoint, STATE.ADD);
        return processProxy.getServiceReference();
    } catch (AxisFault af) {
        final String errMsg = "Could not activate endpoint for service " + myRoleEndpoint.serviceName + " and port " + myRoleEndpoint.portName;
        log.error(errMsg, af);
        throw new ContextException(errMsg, af);
    }
}
Also used : TenantProcessStore(org.wso2.carbon.bpel.core.ode.integration.store.TenantProcessStore) ProcessStore(org.apache.ode.bpel.iapi.ProcessStore) AxisFault(org.apache.axis2.AxisFault) ProcessConf(org.apache.ode.bpel.iapi.ProcessConf) ContextException(org.apache.ode.bpel.iapi.ContextException)

Aggregations

ContextException (org.apache.ode.bpel.iapi.ContextException)2 ProcessConf (org.apache.ode.bpel.iapi.ProcessConf)2 ProcessStore (org.apache.ode.bpel.iapi.ProcessStore)2 TenantProcessStore (org.wso2.carbon.bpel.core.ode.integration.store.TenantProcessStore)2 Definition (javax.wsdl.Definition)1 AxisFault (org.apache.axis2.AxisFault)1