Highlights
- POTENTIALLY BREAKING CHANGE:
StateExecution.setVariable(...)throws error when called for@StateVarstate variables (see details below) - Add optional expected state and state transition validations for workflow instance updates
- Upgrade to Spring 7
- BREAKING CHANGE: Replace
ObjectMapperwithJsonMapper(see details below) - License changed from EUPL to Apache License, Version 2.0
Details
nflow-engineStateExecution.setVariable(...)now throws error if called for any@StateVarstate variable of the method.- Either stop calling
StateExecution.setVariable(...)or remove@StateVarstate variable from the method. - Previous behavior:
StateExecution.setVariable(...)was silently ignored.
- Either stop calling
- Add optional expected state and state transition validations for workflow instance updates.
- Add optional
expectedStateparameter toWorkflowInstanceService.updateWorkflowInstance; returnfalsewhen expected state does not match the workflow instance state in the database. - Add optional
validationModeparameter toWorkflowInstanceService.updateWorkflowInstance; returnfalsewhen transition from expected state to requested new state is not allowed by the workflow definition. validationModemust bedoNotValidatewhenexpectedStateis not given.- Keep
WorkflowInstanceService.updateWorkflowInstancethat does not takeexpectedStateandvalidationModeparameters to maintain backwards compatibility, but mark it as deprecated. - Add
WorkflowDefinition.isAllowedStateTransitionhelper for checking allowed transitions.
- Add optional
- Replace
ObjectMapperwithJsonMapperEngineObjectMapperSupplierrenamed toEngineJsonMapperSupplierEngineConfiguration.nflowObjectMapper()renamed toEngineConfiguration.nflowJsonMapper()EngineModule.nflowObjectMapper()renamed toEngineModule.nflowJsonMapper()
nflow-rest-api- Add optional expected state and state transition validations for workflow instance updates.
- Workflow instance update endpoints now take optional
expectedStatequery parameter, pass it through toWorkflowInstanceService.updateWorkflowInstance, and returnHTTP 409 Conflictwhen expected state does not match the workflow instance state in the database. - Workflow instance update endpoints now take optional
validationModequery parameter, pass it through toWorkflowInstanceService.updateWorkflowInstance, and returnHTTP 409 Conflictwhen transition from expected state to requested new state is not allowed by the workflow definition. validationModemust bedoNotValidatewhenexpectedStateis not given.
- Workflow instance update endpoints now take optional
- Replace
ObjectMapperwithJsonMapperRestConfiguration.nflowRestObjectMapper()renamed toRestConfiguration.nflowRestJsonMapper()RestConfiguration.REST_OBJECT_MAPPERrenamed toRestConfiguration.REST_JSON_MAPPERRestConfiguration.objectMapper()renamed toRestConfiguration.jsonMapper()RestClientConfiguration.objectMapper()renamed toRestClientConfiguration.jsonMapper()
- Add optional expected state and state transition validations for workflow instance updates.
- Dependency updates
- spring 7.0.7
- jackson 3.1.3
- jetty 12.1.9