Class StepMovement<I>
java.lang.Object
io.superdurable.dex.StepMovement<I>
- Type Parameters:
I- the target Step's input type
Describes one transition to a typed Step and its input.
Use movements when a decision or RPC starts one or more next Steps. Options supplied to a movement override the target Step's default options for that execution only.
return StepDecision.goToMany(
StepMovement.of(ReserveInventory.class, order),
StepMovement.of(AuthorizePayment.class, order, paymentOptions));
-
Method Summary
Modifier and TypeMethodDescriptionstatic <I> StepMovement<I> Creates a movement using the target Step's default options.static <I> StepMovement<I> of(Class<? extends Step<I>> stepClass, I input, StepOptions options) Creates a movement with per-execution Step options.
-
Method Details
-
of
Creates a movement using the target Step's default options.- Type Parameters:
I- the target Step's input type- Parameters:
stepClass- the target Step classinput- the typed input for that Step- Returns:
- the typed Step movement
-
of
public static <I> StepMovement<I> of(Class<? extends Step<I>> stepClass, I input, StepOptions options) Creates a movement with per-execution Step options.- Type Parameters:
I- the target Step's input type- Parameters:
stepClass- the target Step classinput- the typed input for that Stepoptions- the per-execution options, ornullto use Step defaults- Returns:
- the typed Step movement
-