org.kie.kogito.app.Application Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of process-usertasks-with-security-springboot
Show all versions of process-usertasks-with-security-springboot
Kogito usertasks orchestration with security enabled on REST api - Spring Boot
package org.kie.kogito.app;
import org.kie.kogito.Config;
import org.kie.kogito.uow.UnitOfWorkManager;
@org.springframework.stereotype.Component()
public class Application implements org.kie.kogito.Application {
@org.springframework.beans.factory.annotation.Autowired(required = false)
java.util.Collection eventPublishers;
@org.springframework.beans.factory.annotation.Value("${kogito.service.url:#{null}}")
java.util.Optional kogitoService;
@org.springframework.beans.factory.annotation.Autowired()
org.kie.kogito.Config config;
Processes processes = new Processes(this);
public Config config() {
return config;
}
public UnitOfWorkManager unitOfWorkManager() {
return config().process().unitOfWorkManager();
}
@javax.annotation.PostConstruct()
public void setup() {
if (config().process() != null) {
if (eventPublishers != null) {
eventPublishers.forEach(publisher -> unitOfWorkManager().eventManager().addPublisher(publisher));
}
unitOfWorkManager().eventManager().setService(kogitoService.orElse(""));
unitOfWorkManager().eventManager().setAddons(config().addons());
}
}
public Processes processes() {
return processes;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy