Interface StateMachineToolOperations
-
- All Implemented Interfaces:
public interface StateMachineToolOperations<S extends Enum<S>>Operations for starting a state machine in a particular state.
-
-
Method Summary
Modifier and Type Method Description abstract ToolstartingIn(S state)Create a version of this tool that starts in the specified state. -
-
Method Detail
-
startingIn
abstract Tool startingIn(S state)
Create a version of this tool that starts in the specified state. Useful when the starting state depends on runtime context.
Example:
// Statically configured val tool = StateMachineTool("order", "Process order", OrderState::class.java) .withInitialState(OrderState.DRAFT) ... // Dynamically start in a different state val resumedTool = tool.startingIn(OrderState.CONFIRMED)
-
-
-
-