All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.drools.compiler.ProcessBuilderFactory Maven / Gradle / Ivy

There is a newer version: 10.0.0
Show newest version
package org.drools.compiler;

import org.drools.util.ServiceRegistryImpl;


public class ProcessBuilderFactory {

    private static ProcessBuilderFactoryService provider;

    public static ProcessBuilder newProcessBuilder(PackageBuilder packageBuilder) {
        return getProcessBuilderFactoryService().newProcessBuilder(packageBuilder);
    }

    public static synchronized void setProcessBuilderFactoryService(ProcessBuilderFactoryService provider) {
        ProcessBuilderFactory.provider = provider;
    }

    public static synchronized ProcessBuilderFactoryService getProcessBuilderFactoryService() {
        if (provider == null) {
            loadProvider();
        }
        return provider;
    }

    private static void loadProvider() {
        ServiceRegistryImpl.getInstance().addDefault( ProcessBuilderFactoryService.class, "org.jbpm.process.builder.ProcessBuilderFactoryServiceImpl" );
        setProcessBuilderFactoryService(ServiceRegistryImpl.getInstance().get( ProcessBuilderFactoryService.class ) );
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy