Package io.nflow.engine
Class NflowEngine
java.lang.Object
io.nflow.engine.NflowEngine
- All Implemented Interfaces:
AutoCloseable
NflowEngine starts up nflow-engine with given database and workflow definitions.
Use this if you want to start just the nflow-engine.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionNflowEngine(DataSource dataSource, SQLVariants sqlVariants, Collection<WorkflowDefinition> workflowDefinitions) Starts up the NflowEngine with WorkflowDispatcher running in a thread. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Shuts down the nFlow engine gracefully and returns when the shutdown is complete.booleanisPaused()Returns true if the nFlow engine is currently paused.booleanReturns true if the nFlow engine is currently running.voidpause()Pauses a running nFlow engine.voidresume()Resumes a paused nFlow engine.voidstart()For manually starting dispatcher thread.
-
Constructor Details
-
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 Details
-
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:
closein interfaceAutoCloseable
-
getMaintenanceService
- Returns:
- ArchiveService for nFlow engine.
-
getHealthCheckService
- Returns:
- HealthCheckService for nFlow engine.
-
getStatisticsService
- Returns:
- StatisticsService for nFlow engine.
-
getWorkflowDefinitionService
- Returns:
- WorkflowDefinitionService for nFlow engine.
-
getWorkflowInstanceService
- Returns:
- WorkflowInstanceService for nFlow engine.
-
getWorkflowExecutorService
- Returns:
- WorkflowExecutorService for nFlow engine.
-