use of org.jbpm.runtime.manager.impl.factory.LocalTaskServiceFactory in project jbpm by kiegroup.
the class RuntimeManagerFactoryImpl method getTaskServiceFactory.
protected TaskServiceFactory getTaskServiceFactory(RuntimeEnvironment environment) {
// if there is an implementation of TaskServiceFactory in the environment then use it
TaskServiceFactory taskServiceFactory = (TaskServiceFactory) ((SimpleRuntimeEnvironment) environment).getEnvironmentTemplate().get("org.kie.internal.runtime.manager.TaskServiceFactory");
if (taskServiceFactory != null) {
return taskServiceFactory;
}
taskServiceFactory = new LocalTaskServiceFactory(environment);
return taskServiceFactory;
}
use of org.jbpm.runtime.manager.impl.factory.LocalTaskServiceFactory in project jbpm by kiegroup.
the class RuntimeManagerFactoryCDIImpl method getTaskServiceFactory.
@Override
protected TaskServiceFactory getTaskServiceFactory(RuntimeEnvironment environment) {
// if there is an implementation of TaskServiceFactory in the environment then use it
TaskServiceFactory taskServiceFactory = (TaskServiceFactory) ((SimpleRuntimeEnvironment) environment).getEnvironmentTemplate().get("org.kie.internal.runtime.manager.TaskServiceFactory");
if (taskServiceFactory != null) {
return taskServiceFactory;
}
try {
taskServiceFactory = taskServiceFactoryInjected.get();
// since this is CDI let's make sure it has all dependencies met
taskServiceFactory.newTaskService().toString();
} catch (Exception e) {
taskServiceFactory = new LocalTaskServiceFactory(environment);
}
return taskServiceFactory;
}
Aggregations