v7.0.0
BREAKING CHANGES
- Drop
nflow_workflow.root_workflow_id
column. - Remove, add and update foreign key constraints and indices in nFlow database tables.
ArchiveService
andArchiveResource
(/v1/archive
) are replaced byMaintenanceService
andMaintenanceResource
(/v1/maintenance
).- Change
WorkflowSettings.setHistoryDeleteableAfterHours(Integer)
toWorkflowSettings.setHistoryDeleteableAfter(ReadablePeriod)
for more flexible configuration. StateExecution.getAllChildWorkflows
does not return current state variables of child workflows anymore.WorkflowStateProcessor
does not read child workflow IDs of processed workflow instances anymore.QueryWorkflowInstances.Builder
does not query for current state variables by default anymore.BulkWorklow
moved toio.nflow.engine.workflow.curated
java package.
Highlights
nflow-engine
- Improve workflow instance archiving performance. Archiving has been in practice unusable in some scenarios.
- Add support for deleting workflow instances, actions and state variables from production and archive tables.
- Remove support for
nflow.executor.fetchChildWorkflowIds
configuration property. - Fix bug in stuck workflow instance processing detection when multiple states are processed consecutively by the same processor thread. Now the time counter is reset between each state.
- Added abstract
CronWorkflow
that can be used to periodically execute a task. - Built-in support for periodically running maintenance to clean up workflow instances.
Details
nflow-engine
nflow_workflow.root_workflow_id
was only used in old archiving code, so it was removed as the new archiving logic does not need it anymore.- Removed unnecessary indices and foreign keys and added missing indices to improve nFlow database performance. See database update scripts for details.
- Added name for all existing and new constraints in create scripts, if they did not have one yet. This is to make modify operations easier in future. All of these may not be covered in database update scripts.
- See
MaintenanceService
andMaintenanceConfiguration
for details on how to archive and delete workflow instances. The maintenance operations can now be limited by workflow type as well. - As ArchiveService is removed, the old functionality of
ArchiveService.archiveWorkflows(DateTime olderThan, int batchSize)
can now be achieved with
MaintenanceService.cleanupWorkflows(new MaintenanceConfiguration.Builder() .setArchiveWorkflows(new ConfigurationItem.Builder() .setOlderThanPeriod(new Period(olderThan, DateTime.now()) .setBatchSize(batchSize) .build()) .build)
- For example,
WorkflowSettings.setHistoryDeleteableAfterHours(12)
can now be achieved byWorkflowSettings.setHistoryDeleteableAfter(Period.hours(12))
. - To get child workflows with state variables in a state method, use
StateExecution.queryChildWorkflows
. - To get all child workflow IDs in a state method, use
StateExecution.getAllChildWorkflows
. - New
MaintenanceWorkflow
that can be enabled by settingnflow.maintenance.insertWorkflowIfMissing
property to true. On the first run the workflow is inserted and it will start to run periodically. Further configuration must be done by editing the two state variables of the workflow:cron
for the scheduling andconfig
for theMaintenanceConfiguration
to execute.- The first time configuration can also be tuned with
nflow.maintenance.initial.cron
,nflow.maintenance.initial.delete.olderThan
,nflow.maintenance.initial.archive.olderThan
andnflow.maintenance.initial.deleteArchived.olderThan
- The first time configuration can also be tuned with
- Dependency updates:
- spring 5.2.4
- jersey 2.30.1
- metrics 4.1.3
- netty 0.9.5
- mockito 3.3.0
- spotbugs 4.0.0
nflow-explorer
- Dependency updates:
- angular extra libraries 1.7.9
- angular-ui-router 1.0.25
- dagre-d3 0.6.4
- node-sass 9.7.4
- karma-jasmine 3.1.1
- autoprefixer 9.7.4
- node v12.16.1
- npm 6.13.7
- Dependency updates: