org.zodiac.autoconfigure.flowable.FlowableServletAutoConfiguration Maven / Gradle / Ivy
package org.zodiac.autoconfigure.flowable;
import org.flowable.spring.SpringProcessEngineConfiguration;
import org.flowable.spring.boot.EngineConfigurationConfigurer;
import org.flowable.spring.boot.FlowableProperties;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.zodiac.flowable.core.constants.ProcessConstants;
@SpringBootConfiguration
@ConditionalOnWebApplication(type = Type.SERVLET)
@ConditionalOnClass(value = {ProcessConstants.class, org.flowable.engine.ProcessEngine.class, org.flowable.editor.language.json.converter.BpmnJsonConverter.class})
public class FlowableServletAutoConfiguration implements EngineConfigurationConfigurer {
private final FlowableProperties flowableProperties;
public FlowableServletAutoConfiguration(FlowableProperties flowableProperties) {
this.flowableProperties = flowableProperties;
}
@Override
public void configure(SpringProcessEngineConfiguration engineConfiguration) {
engineConfiguration.setActivityFontName(flowableProperties.getActivityFontName());
engineConfiguration.setLabelFontName(flowableProperties.getLabelFontName());
engineConfiguration.setAnnotationFontName(flowableProperties.getAnnotationFontName());
}
}