Search in sources :

Example 1 with RemoteRestRuntimeEngineBuilder

use of org.kie.remote.client.api.RemoteRestRuntimeEngineBuilder in project camel by apache.

the class JBPMEndpoint method createProducer.

public Producer createProducer() throws Exception {
    RemoteRestRuntimeEngineBuilder engineBuilder = RemoteRuntimeEngineFactory.newRestBuilder();
    if (configuration.getUserName() != null) {
        engineBuilder.addUserName(configuration.getUserName());
    }
    if (configuration.getPassword() != null) {
        engineBuilder.addPassword(configuration.getPassword());
    }
    if (configuration.getDeploymentId() != null) {
        engineBuilder.addDeploymentId(configuration.getDeploymentId());
    }
    if (configuration.getConnectionURL() != null) {
        engineBuilder.addUrl(configuration.getConnectionURL());
    }
    if (configuration.getProcessInstanceId() != null) {
        engineBuilder.addProcessInstanceId(configuration.getProcessInstanceId());
    }
    if (configuration.getTimeout() != null) {
        engineBuilder.addTimeout(configuration.getTimeout());
    }
    if (configuration.getExtraJaxbClasses() != null) {
        engineBuilder.addExtraJaxbClasses(configuration.getExtraJaxbClasses());
    }
    RuntimeEngine runtimeEngine = engineBuilder.build();
    return new JBPMProducer(this, runtimeEngine);
}
Also used : RuntimeEngine(org.kie.api.runtime.manager.RuntimeEngine) RemoteRestRuntimeEngineBuilder(org.kie.remote.client.api.RemoteRestRuntimeEngineBuilder)

Aggregations

RuntimeEngine (org.kie.api.runtime.manager.RuntimeEngine)1 RemoteRestRuntimeEngineBuilder (org.kie.remote.client.api.RemoteRestRuntimeEngineBuilder)1