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

org.openbp.config.engine.StandardEngineConfig Maven / Gradle / Ivy

There is a newer version: 0.9.11
Show newest version
package org.openbp.config.engine;

import org.openbp.server.engine.AutoCommittingEngineImpl;
import org.openbp.server.engine.Engine;
import org.openbp.server.engine.SessionMode;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Spring configuration that provides a process engine that executes a database commit after
 * calling the {@link #startToken}, {@link #resumeToken} or {@link #resumeWorkflow} methods.
 * This must be done if you execute your tasks using an EngineRunner in a background thread,
 * especially if you are running engine runners on several nodes of a cluster.
 * However, if you execute the process within the current thread, this might be omitted.
 * Typical cases might be batch processing or test cases.
 */
@Configuration
public class StandardEngineConfig
{
	@Bean
	public Engine engine()
	{
		AutoCommittingEngineImpl engine = new AutoCommittingEngineImpl();
		engine.setSessionMode(SessionMode.AUTO);
		return engine;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy