Class NflowEngine

  • All Implemented Interfaces:
    AutoCloseable

    public class NflowEngine
    extends Object
    implements AutoCloseable
    NflowEngine starts up nflow-engine with given database and workflow definitions. Use this if you want to start just the nflow-engine.
    • Constructor Detail

      • NflowEngine

        public NflowEngine​(DataSource dataSource,
                           SQLVariants sqlVariants,
                           Collection<WorkflowDefinition> workflowDefinitions)
        Starts up the NflowEngine with WorkflowDispatcher running in a thread. Property nflow.autostart controls if the thread is started automatically. If nflow.autostart=false, then the thread can be started with start() method.
        Parameters:
        dataSource - nFlow database data source.
        sqlVariants - SQL variants for the configured database type.
        workflowDefinitions - The registered workflow definitions.
    • Method Detail

      • start

        public void start()
        For manually starting dispatcher thread. This starts the nflow-engine if property nflow.autostart=false.
      • pause

        public void pause()
        Pauses a running nFlow engine.
      • resume

        public void resume()
        Resumes a paused nFlow engine.
      • isPaused

        public boolean isPaused()
        Returns true if the nFlow engine is currently paused.
        Returns:
        True if engine is currently paused.
      • isRunning

        public boolean isRunning()
        Returns true if the nFlow engine is currently running.
        Returns:
        True if engine is currently running.
      • close

        public void close()
        Shuts down the nFlow engine gracefully and returns when the shutdown is complete. This NflowEngine instance may not be restarted after close().
        Specified by:
        close in interface AutoCloseable
      • getMaintenanceService

        public MaintenanceService getMaintenanceService()
        Returns:
        ArchiveService for nFlow engine.
      • getHealthCheckService

        public HealthCheckService getHealthCheckService()
        Returns:
        HealthCheckService for nFlow engine.
      • getStatisticsService

        public StatisticsService getStatisticsService()
        Returns:
        StatisticsService for nFlow engine.
      • getWorkflowDefinitionService

        public WorkflowDefinitionService getWorkflowDefinitionService()
        Returns:
        WorkflowDefinitionService for nFlow engine.
      • getWorkflowInstanceService

        public WorkflowInstanceService getWorkflowInstanceService()
        Returns:
        WorkflowInstanceService for nFlow engine.
      • getWorkflowExecutorService

        public WorkflowExecutorService getWorkflowExecutorService()
        Returns:
        WorkflowExecutorService for nFlow engine.