You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been playing around with the state machine and have managed to utilise it to run as a workflow management system, where the state machine would persist the extended state to a database after a state transition using a preStateChange hook
However, I noticed that the DB write needs to be blocking otherwise actions which are supposed to run after state change tend to trigger
.state(ServiceRequestState.APPROVED, triggerActions())
// This will run before the state change leading to weird issues like the state context being in an inconsistent stageprivateCollection<? extendsAction<WorkflowState, WorkflowEvent>> triggerActions() {
returnList.of(
Actions.errorCallingAction(notifyCustomer, handleNotificationFailure),
Actions.errorCallingAction(logAnalytics, loggingFailure)
);
}
Currently my way around this is to provide an indication of the DB write being completed using the Workflow Extended State but would love to understand if there was a better way
The text was updated successfully, but these errors were encountered:
vedantshetty
changed the title
Reactive Interceptors
Support for Reactive Interceptors or Reactive Actions inside Interceptors
Oct 11, 2024
vedantshetty
changed the title
Support for Reactive Interceptors or Reactive Actions inside Interceptors
Support for Reactive Interceptors or Reactive Operations inside Interceptors
Oct 11, 2024
I have been playing around with the state machine and have managed to utilise it to run as a workflow management system, where the state machine would persist the extended state to a database after a state transition using a
preStateChange
hookHowever, I noticed that the DB write needs to be blocking otherwise actions which are supposed to run after state change tend to trigger
Currently my way around this is to provide an indication of the DB write being completed using the Workflow Extended State but would love to understand if there was a better way
The text was updated successfully, but these errors were encountered: