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