Class EngineConfiguration

java.lang.Object
io.nflow.engine.config.EngineConfiguration

@Configuration @ComponentScan("io.nflow.engine") public class EngineConfiguration extends Object
The main Spring configuration class for nFlow engine.
  • Constructor Details

    • EngineConfiguration

      public EngineConfiguration()
  • Method Details

    • nflowExecutor

      @Bean public WorkflowInstanceExecutor nflowExecutor(ThreadFactory nflowThreadFactory, Environment env)
      Creates a workflow instance executor for processing workflow instances.
      Parameters:
      nflowThreadFactory - Thread factory to be used for creating instance executor threads.
      env - The Spring environment.
      Returns:
      Workflow instance executor.
    • nflowThreadFactory

      @Bean public ThreadFactory nflowThreadFactory()
      Creates a thread factory for creating instance executor threads.
      Returns:
      Instance executor thread factory.
    • nflowObjectMapper

      Creates an object mapper for serializing and deserializing workflow instance state variables to and from database.
      Returns:
      Object mapper.
    • nflowNonSpringWorkflowsListing

      @Bean public AbstractResource nflowNonSpringWorkflowsListing(Environment env)
      Creates a resource for listing workflows that are not defined as Spring beans.
      Parameters:
      env - The Spring environment.
      Returns:
      A resource representing the file that contains a list of workflow class names.