Optional
actions?: string | string[]Name(s) of the functions to execute when the event happens.
Provide in the 'actions' key in the options of createOrchestrationMachine
.
These functions represent the behavior or side-effects to perform upon the event triggering the transition.
Optional
description?: stringDescription of the transition, providing additional context or information about its purpose. This can be helpful for documentation and understanding the intended behavior of the transition.
Optional
eventThe schema of the event that is expected to trigger the next state
Optional
guard?: string | { Guard statement to allow the transition only if true.
This statement acts as a condition that, when true, permits the execution of the transition's actions.
Refer to Stately.ai Guards for more information on guards.
It is defined in the gruads
key of the options.
The target state to transition to.
Optional
transformer?: TEventTransformerTransformer function name or the function itself to execute before the event gets executed.
This function, if defined, allows for the transformation of data or preparation before the actual execution of the transition's actions.
It can be used to modify or adapt the event data before it is processed. It is defined in the transformers
key of the options.
// Example transition configuration:
const transitionConfig: OrchestrationTransitionConfig = {
target: 'nextState',
actions: ['notifyUser', 'updateStateData'],
guard: 'isUserAuthorized',
description: 'Transition triggered when a user is authorized to perform an action.',
transformer: 'transformEventData',
};
Generated using TypeDoc
Configuration for transitioning between states in an orchestration machine.