Releases: NitorCreations/nflow
Releases · NitorCreations/nflow
v10.0.0
Highlights
nflow-explorer
- POTENTIALLY BREAKING CHANGE: uses hash (
#
) instead of hashbang (#!
) as web path prefix (react-router no longer supportshashType
) - Improved responsiveness on smaller displays
- POTENTIALLY BREAKING CHANGE: uses hash (
Details
nflow-explorer
- Setup demo deployment
- Support Azure AD authentication in Explorer (see nflow-explorer/src/config.js for configuration options)
- Improve REST API error response handling
- Sort state variables by name
- indicate workflow states used in graph and show active state in graph
- Use ReactJS 18.x, material UI 5.x
- Replace Create React App -build by Vite
nflow-engine
- Update postgres db schema table id's to bigserial instead of serial
- Dependency updates
- Jetty 11.0.20
- Apache CFX 4.0.4
- Dropwizard metrics 4.2.19
- logback 1.5.4
- jackson 2.17.0
- h2 2.2.224
- protobuf 3.25.1
- db2 jcc 11.5.9.0
- mssql-jdbc 12.6.1
- mysql-connector 8.3.0
- ojdbc11 23.2.0.0
- postgresql 42.7.3
- mariadb-java-client 3.3.3
- HikariCP 5.1.0
- netty 4.1.107
- joda-time 2.12.5
- commons-lang3 3.14.0
- slf4j 2.0.12
- spring 6.0.23
- reactor-netty 1.1.18
- reactor-core 3.6.5
v9.0.0
Highlights
- Update to Spring Framework 6
- BREAKING CHANGE: Support for Java 11 is dropped
- BREAKING CHANGE: Migrated from
javax
namespace tojakarta
namespace - Lot of dependency updates/changes related to
jakarta
changes- Guice 7.0.0
- Jersey 3.1.3
- Jetty 11.0.15
- Apache CFX 4.0.2
- Dropwizard metrics 4.2.19 and switch to jakarta servlets
- Jackson jaxrs to jakarta-rs
- Switch swagger jaxrs2 to jaxrs2-jakarta
- Hibernate validator 8.0.1.Final
- Annotation API to jakarta version 2.1.1
- Servlet API to jakarta version 6.0.0
- Glassfish EL to jakarta version 4.0.2
- Inject API to jakarta version 2.0.1
- Jaxb API to jakarta bind-api 4.0.0
- WS RS API to jakarta 3.1.0
nflow-engine
- POTENTIALLY BREAKING CHANGE: Add support to manage workflow instances without having the workflow implementation classes in the classpath.
- Clean up old workflow executors that have expired configured time ago (default 1 year).
- Optimize SQL queries used for dead node detection and workflow instance recovery.
- Add
recovered
timestamp to executor info (database, Java API and REST API). - Remove obsolete mysql legacy ddl sql scripts.
- Include generated mariadb.create.ddl.sql in sources.jar.
nflow-metrics
- export the nflow.database.type as a metric
nflow-netty
- POTENTIALLY BREAKING CHANGE: Netty configuration might need
Jackson2ObjectMapperBuilder
to havefindModulesViaServiceLoader
enabled as joda time module is not in wellknown modules anymore
- POTENTIALLY BREAKING CHANGE: Netty configuration might need
nflow-explorer
- POTENTIALLY BREAKING CHANGE: old
nflow-explorer
was removed andnflow-explorer-ng
was renamed tonflow-explorer
- POTENTIALLY BREAKING CHANGE: old
Details
nflow-engine
- POTENTIALLY BREAKING CHANGE: Add support to manage (create, update and read, but not execute) workflow instances without having the workflow implementation classes in the classpath.
- Implemented in #53.
- If a workflow definition is not found from the classpath, it is loaded from the database and stored in memory.
- Workflow definitions that are loaded from the database are refreshed at most at configured interval (
nflow.definition.refreshStoredFromDatabase.interval.seconds
, default 60). - This change enables managing workflows that have been removed from the classpath. You can disable this (potentially backwards incompatible) functionality by setting the refresh interval to -1.
- Potential use cases:
- Creating workflow instances in a separate application that does not need to be updated when the workflow implementations are changed
- Generic nFlow REST service that does not need to be updated when the workflow implementations or definitions are changed
- Having a cluster of nFlow executors that just execute the workflows and have no other business logic
- Improve shutdown sequence.
- Workflows that were acquired from the database but have not started executing can now be resumed immediately by another executor.
- Executing workflows are interrupted 5 seconds before shutdown timeout so that they get a chance to persist their state to the database. This also allows other executors to immediately resume the processing of the successfully interrupted workflows. The interrupting can be disabled by setting
nflow.executor.interrupt
to false. - Log a warning if updating workflow instance to the database fails because the instance has been recovered by another executor. Also avoid modifying state variables, adding new workflows and adding new child workflows if the workflow instance update fails.
- Add support to
MaintenanceWorkflow
for cleaning up old workflow executors that have expired configured time ago (default 1 year).- On the first startup, time period is read from
nflow.maintenance.executors.initial.deleteExpiredExecutors.olderThan
configuration option and stored in theconfig
state variable of the created maintenance workflow instance. - If the maintenance workflow instance has already been created, cleanup can be enabled by adding
"deleteExpiredExecutorsOlderThan": "P1Y"
to the JSON value of theconfig
state variable of the instance.
- On the first startup, time period is read from
- Optimize SQL queries used for dead node detection and workflow instance recovery.
- Find only dead nodes that have not been recovered yet.
- Update current timestamp to
nflow_executor.recovered
after the workflow instances of the dead node have been recovered.
- Add
recovered
timestamp to executor info (database, Java API and REST API). - Fix bug archiving when bigserial and bigint id types are used (on some databases)
- Remove obsolete mysql legacy ddl sql scripts.
- Include generated mariadb.create.ddl.sql in sources.jar.
- Added tests against Oracle now that there is a working docker image of Oracle XE
- POTENTIALLY BREAKING CHANGE: Add support to manage (create, update and read, but not execute) workflow instances without having the workflow implementation classes in the classpath.
nflow-rest-api
- POTENTIALLY BREAKING CHANGE: Remove
@Primary
annotation fromnflowRestObjectMapper
inRestConfiguration
to allow overriding default mapper. Spring Boot applications may need to define the mapper explicitly now.
- POTENTIALLY BREAKING CHANGE: Remove
nflow-metrics
- export the nflow.database.type as a metric
nflow-netty
- POTENTIALLY BREAKING CHANGE:
Jackson2ObjectMapperBuilder
might need configuration for jodatime- Spring Framework 6 doesn't have Joda time module in wellknown anymore, so might need to configure
findModulesViaServiceLoader
to enable it (or some other way)
- Spring Framework 6 doesn't have Joda time module in wellknown anymore, so might need to configure
- POTENTIALLY BREAKING CHANGE:
nflow-explorer
- POTENTIALLY BREAKING CHANGE: old
nflow-explorer
was removed andnflow-explorer-ng
was renamed tonflow-explorer
- Improved formatting timestamps
- Fix retry on endpoint change
- Fix querying with parent instance id
- Fix loading custom instance content for child workflow
- Fix state variables showing false values
- POTENTIALLY BREAKING CHANGE: old
- Dependency updates
- Guice 7.0.0
- Jersey 3.1.3
- Jetty 11.0.15
- Apache CFX 4.0.2
- Dropwizard metrics 4.2.19
- Hibernate validator 8.0.1.Final
- Annotation API to jakarta version 2.1.1
- Servlet API to jakarta version 6.0.0
- Glassfish EL to jakarta version 4.0.2
- Inject API to jakarta version 2.0.1
- Jaxb API to jakarta bind-api 4.0.0
- WS RS API to jakarta 3.1.0
- javassit 3.29.2
- logback-classic 1.4.6
- Commons lang3 3.13.0
- H2 2.2.220
- Jackson 2.15.2
- Joda-time 2.12.5
- Junit5 5.10.0
- MariaDB 3.1.2
- Mockito 5.4.0
- MSSQL 12.4.0-jre11
- MySQL 8.1.0
- OJDBC 23.2.0.0
- PostgreSQL 42.6.0
- Reactor core 3.5.9
- Reactor netty 1.1.10
- SLF4J 2.0.7
- Swagger 2.2.15
- Maven build plugin updates
- Assembly plugin 3.6.0
- Clean plugin 3.3.1
- Deploy plugin 3.1.1
- Download plugin 1.7.1
- Enforcer plugin 3.3.0
- Frontend plugin 1.13.4
- GPG plugin 3.1.0
- Install plugin 3.1.1
- Jacoco plugin 0.8.10
- PMD plugin 3.21.0
- Project info plugin 3.4.5
- Release plugin 3.0.1
- Resources plugin 3.3.1
- Shade plugin 3.5.0
- Site plugin 4.0.0-M9
- Source plugin 3.3.0
- Surefire plugin 3.1.2
- Spotbugs plugin 4.7.3.5
- Versions plugin 2.16.0
v8.0.0
Highlights
- Add support for Java 17.
- Add new user interface
nflow-explorer-ng
deprecatingnflow-explorer
see migration instructions- implemented using modern Javascript libraries (e.g. ReactJS instead of AngularJS)
- only minor changes changes to functionality (e.g. create workflow instance added, much improved workflow instance search, removed radiator graph)
- BREAKING CHANGE: Remove support for Java 8.
nflow-engine
- BREAKING CHANGE: Replace old
WorkflowDefinition
andAbstractWorkflowDefinition
with a newWorkflowDefinition
. - BREAKING CHANGE: Remove deprecated
WorkflowState.isRetryAllowed
, set exception analyzer for workflow definition instead (if needed). - BREAKING CHANGE: Change transition delay fields data types in
WorkflowSettings
and remove unusedimmediateTransitionDelay
setting.
- BREAKING CHANGE: Replace old
nflow-rest-api
- BREAKING CHANGE: Remove
ListWorkflowDefinitionResponse.TransitionDelays.immediate
field, it is not used by nFlow anymore. - Deprecate
include
query parameter (fetch / list workflow instances). - Add
includes
query parameter (fetch / list workflow instances). - Enable maintenance (archiving and deleting old workflow instances) by default.
- Enable workflow instance history clean-up (deleting old actions and state variables) by default.
- Add support to query also archived workflow instances.
- Define
maven.compiler.release = 11
- BREAKING CHANGE: Remove
Details
- Add support for Java 17, keep support for Java 11 and remove support for Java 8.
- Supported Java and database engine combinations are documented in SUPPORT_MATRIX.
- Minimum supported Maven version for building is 3.6.
nflow-engine
- All workflow definitions should now extend the new
WorkflowDefinition
class.- Workflow state type does not need to be defined as a generic type parameter anymore. The states can now be any classes that implement
WorkflowState
. - It is not recommended to define the workflow states as an enum anymore. This makes extending workflows definition classes and reusing states across different workflows easier.
- You can define the states as instances of
io.nflow.engine.workflow.curated.State
or anything else that implements the requiredWorkflowState
interface. - The workflow definitions must now register all possible states as described in
io.nflow.engine.workflow.definition.WorkflowDefinition
.
- Workflow state type does not need to be defined as a generic type parameter anymore. The states can now be any classes that implement
WorkflowState.isRetryAllowed
was removed. If it was overridden, you can usenew WorkflowSettings.Builder().setExceptionAnalyzer(...)
to change the behavior. The default behavior was not changed.WorkflowSettings
- Change
WorkflowSettings.Builder.setShortTransitionDelay
,WorkflowSettings.Builder.setMinErrorTransitionDelay
andWorkflowSettings.Builder.setMaxErrorTransitionDelay
parameter type fromint
toorg.joda.time.Duration
. - Remove
WorkflowSettings.Builder.setImmediateTransitionDelay
method. - Change
WorkflowSettings.shortTransitionDelay
,WorkflowSettings.minErrorTransitionDelay
andWorkflowSettings.maxErrorTransitionDelay
field type fromint
tolong
. - Remove
WorkflowSettings.immediateTransitionDelay
field. It is not used by nFlow.
- Change
- Maintenance workflow instance is added to nFlow database by default in startup. Instances that have been in final state longer than 45 days are archived. Archived instances that have been in final state longer than one year are deleted. Maintenance is run every night. Use
nflow.maintenance
configuration options to change the defaults before startup, or update the maintenance workflow instance state variables after the instance has been created. - Workflow instance actions and state variables that are older than 45 days are automatically cleaned up occasionally when the instance is processed. Use workflow settings to change the default time period (
setHistoryDeletableAfter
) and condition (setDeleteHistoryCondition
) of the clean-up. - Add support to query also archived workflow instances when not enough non-archived matches are found.
- Add
WorkflowInstance.Builder.setState(WorkflowState)
convenience method. - Detect state methods with duplicate @StateVar names
- Allow simple generics objects in Mutable state variables
- Support instantiating Collection,List and Map interfaces to empty in state variables
- Dependency updates
- logback-classic update to version 1.2.11
- apache cxf 3.5.2
- commons.lang3 3.12.0
- guice 5.1.0
- hibernate validator 6.2.3
- hikaricp 5.0.1
- jackson 2.13.3
- jackson-databind 2.13.3
- javassist 3.29.0
- jodatime 2.10.14
- slf4j 1.7.36
- spring 5.3.18
- All workflow definitions should now extend the new
nflow-rest-api
- BREAKING CHANGE: Remove
ListWorkflowDefinitionResponse.TransitionDelays.immediate
field, it is not used by nFlow. - Deprecate
include
query parameter (fetch / list workflow instances) that supported multiple values provided as comma separated string, i.e. likeinclude=actions,childWorkflows
. - Add
includes
query parameter (fetch / list workflow instances) that supports multiple query parameters, i.e. likeinclude=actions&include=childWorkflows
. - Add
queryArchive
query parameter. If set totrue
, also archived workflow instances are searched when not enough non-archived matches are found. Default value is false. - Dependency updates
- swagger 2.2.0
- jersey 2.35
- BREAKING CHANGE: Remove
nflow-jetty
- Dependency updates
- jetty 10.0.9
- reflections 0.10.2
- Dependency updates
nflow-netty
- Dependency updates
- reactor-core 3.4.18
- reactor-netty 1.0.19
- Dependency updates
nflow-metrics
- Dependency updates
- metrics 4.2.9
- Dependency updates
nflow-explorer
- Query and show also archived workflow instances when not enough non-archived matches are found. Querying and showing archived instances can be disabled in
config.js
. - Dependency updates
- nodejs 16.15.1
- npm 8.11.0
- lodash 4.17.21
- momentjs 2.29.1
- removed IE browser support
- Query and show also archived workflow instances when not enough non-archived matches are found. Querying and showing archived instances can be disabled in
nflow-tests
- Dependency updates
- h2 2.1.212
- Note: If you have persisted any h2 databases you must take a backup and restore. Also the nFlow h2 schema changed to work with 2.x release of h2.
- mssql 10.2.1
- mysql 8.0.29
- mariadb 3.0.5
- postgresql 42.3.6
- h2 2.1.212
- Dependency updates
v7.4.0
Highlights
nflow-explorer
- Customizable workflow search result table columns
Details
nflow-engine
- logback-classic update to version 1.2.9
nflow-explorer
- Make some external urls https instead of http
v7.3.1
Highlights
nflow-engine
- Optimize fetching workflow with large action history with many modified state variables.
Details
nflow-jetty
- Explicitly depend on jackson-databind so that projects including the nflow-jetty do not have to specify the version explicitly
- Dependency updates:
- jetty 9.4.41.v20210516
nflow-engine
- Improve SQL performance by using workflowId in the query which fetches the state of actions from
nflow_workflow_state
- Improve SQL performance by using workflowId in the query which fetches the state of actions from
nflow-explorer
- Disable karma tests
v7.3.0
Highlights
nflow-explorer
- Sortable workflow definitions, workflow instance search result and executors tables
- Persist workflow instance query parameters to URL
- Support wildcard characters when searching workflow instances by business key or external id
- Database scripts
- Fix issues in Oracle scripts
Details
nflow-jetty
- Dependency updates:
- jetty 9.4.38.v20210224
- Dependency updates:
nflow-explorer
- Added missing
executing
status to workflow instance search criteria - Included child workflows when auto-refreshing workflow instance actions table
- Added more child workflow details to workflow instance actions
- Dependency updates:
- urijs 1.19.6
- is-svg 4.3.1
- y18n 4.0.1
- Added missing
nflow-engine
- Support SQL wildcards in workflow instance queries by business key or external id
- Database scripts
- Disable cache for Oracle sequences
- Fix
nflow_workflow_action_insert
trigger in Oracle database scripts - Fix syntax error in
create table nflow_workflow
statement inoracle.create.ddl.sql
v7.2.4
Highlights
- Support disabling
CronWorkflow
s.
Details
nflow-engine
- Add
disabled
state (typemanual
) toCronWorkflow
to support disabling the work. By default there is no state method for thedisabled
state, but it can added in your workflow definition that extendsCronWorkflow
to execute custom logic when the workflow enters thedisabled
state.
- Add
nflow-rest-api-common
andnflow-rest-api-spring-web
- Fix exception to HTTP status conversion issue when using Netty
v7.2.3
Highlights
- Support updating workflow instance business key.
- Support for searching workflow instances by state variable key and value.
- Added optional properties for tuning parts of nFlow Explorer
- Facelift for workflow instance properties in nFlow Explorer
- Control retryable exception handling via
WorkflowSettings
(replaces deprecatedWorkflowState.isRetryAllowed(...)
) - Control retrying and logging of an exception thrown by a state method via
WorkflowSettings
(replaces deprecatedWorkflowState.isRetryAllowed(...)
) - Control retrying and logging of an exception thrown by a state method via
WorkflowSettings
(replaces deprecatedWorkflowState.isRetryAllowed(...)
). - Control logging and sleeping after exceptions in
WorkflowDispatcher
. - Control logging and sleeping after a failure to save workflow instance state.
- Support in
CronWorkflow
to wait for created child workflow instances to finish before scheduling the next work.
Details
nflow-engine
- Use
WorkflowInstanceService.updateWorkflowInstance
to update the business key of the workflow instance. - Use
StateExecution.setBusinessKey
to update the business key of the workflow instance after processing a state. - Use
QueryWorkflowInstances.setStateVariable
to limit search query by state variable name and key. Only the latest value of the state variable of the workflow instance is used. - Control retrying and logging of an exception thrown by a state method via
WorkflowSettings.Builder.setExceptionAnalyzer(...)
/ExceptionHandling
:- Control whether the exception is considered retryable or not (replaces deprecated
WorkflowState.isRetryAllowed(...)
). - Control which log level is used to log the retryable exception.
- Control whether the stack trace of the retryable exception is logged or not.
- Control whether the exception is considered retryable or not (replaces deprecated
- Control logging and sleeping after exceptions in
WorkflowDispatcher
by providing aDispatcherExceptionHandler
that returnsDispatcherExceptionHandling
objects:- Control whether the exception is logged or not.
- Control which log level is used to log the exception.
- Control whether the stack trace of the exception is logged or not.
- Control whether dispatcher should sleep after the exception or not.
- Control whether the sleep time should be randomized or not.
- Control logging after a failure to save workflow instance state by providing a
StateSaveExceptionHandler
that returnsStateSaveExceptionHandling
objects:- Control which log level is used to log the exception.
- Control whether the stack trace of the exception is logged or not.
- Control how long the
WorkflowStateProcessor
should sleep before retrying.
- Support in
CronWorkflow
to wait for child workflow instances created indoWork
state method to finish before scheduling the next work. ReturnNextAction.moveToStateAfter(waitForWorkToFinish, ...)
with some fail-safe waiting time instead ofNextAction.moveToState(schedule, ...)
to avoid immediate re-scheduling. When child workflows finish, they will wake up the parent workflow automatically, if it is still in the waiting state. Default implementation will check if any child workflows are still running, and keep waiting until they are all finished. OverrideCronWorkflow.waitForWorkToFinishImpl
for custom logic. - Add
hasUnfinishedChildWorkflows
helper inStateExecution
andWorkflowInstanceService
to check if the workflow instance has any child workflow instances with any other status thanWorkflowInstanceStatus.finished
.
- Use
nflow-rest-api-common
,nflow-rest-api-jax-rs
,nflow-rest-api-spring-web
UpdateWorkflowInstanceRequest.businessKey
field was added to support updating workflow instance business key via REST API.- Added support for new query parameters
stateVariableKey
andstateVariableValue
toGET /v1/workflow-instance
to limit search query by state variable name and key. Only the latest value of the state variable of the workflow instance is used. - Fix REST API serialization of state variable values that are not valid JSON by failing the serialization on trailing tokens and resorting to string representation as expected.
nflow-explorer
- Added optional
config.js
properties (htmlTitle
,nflowLogoFile
,hideFooter
) - Facelift for workflow instance properties
- Dependency updates:
- urijs 1.19.5
- socket.io 2.4.1
- Added optional
- Database
- Change
text
data types tovarchar(max)
for MS SQL Server
- Change
v7.2.2
Highlights
nflow-engine
- Handle exceptions if waking up parent workflow fails after updating workflow instance state.
nflow-explorer
- Remove "Save as PNG" button as it produced empty images. PR to restore functionality would be appreciated.
Details
nflow-engine
- Catch and log error when waking up parent workflow fails after updating workflow instance state. Failure in waking up parent workflow should not trigger a retry for the workflow instance update, as the update has already been done. As the parent is expected to handle situations where child workflow does not explicitly wake up the parent, it is ok to just log this error and continue.
v7.2.1
Highlights
-
nflow-engine
- Optimize fetching workflow instance with large history with many modified state variables.
-
nflow-rest-api-spring-web
andnflow-netty
- Change REST API calls to use a dedicated thread pool for all blocking database operations to avoid blocking the netty EventLoop thread.
Details
nflow-engine
- Fix SQL performance / memory issue when getting single workflow instance with action state variables, when the instance has lots of actions with lots of state variables. The old code fetched all state variables of all actions of the instance, the new code only fetches the state variables for the actions that will be returned.
- Fix instantiation of @StateVar(instantiateIfNotExists=true) Mutable - the result was incorrectly a Mutable wrapped in Mutable.
- Fix potential resource leaks
- Dependency updates:
- spring 5.2.8
- jackson 2.12.0
- hikaricp 3.4.5
- jodatime 2.10.8
- mysql 8.0.20
- node 12.16.2
- netty 0.9.11
- apache cxf 3.4.1
- commons-lang3 3.11
- hibernate validator 6.1.7.Final
- mariadb 2.7.1
- metrics 4.1.16
- mssql 8.4.1.jre8
- mysql 8.0.22
- postgresql 42.2.18
- swagger 1.6.2
- jetty 9.4.35.v20201120
- mockito 3.6.28
- spotbugs 4.2.0
nflow-explorer
- Dependency updates:
- autoprefixer 9.7.6
- node-sass 4.14.1
- http-proxy 1.18.1
- ini 1.3.7
- bl 1.2.3
- Dependency updates:
- nflow-rest-api-spring-web
- Change deendency from spring-web to spring-webflux to be able to use Project Reactor's types.
- Introduce a thread pool in SchedulerService and wrap all blocking database calls in the REST API to it.