public class StepPart
extends java.lang.Object
ModelBuilder to build a Model.Step| Modifier and Type | Method and Description |
|---|---|
StepAsPart |
as(AbstractActor... actors)
Defines which actors (i.e. user groups) can cause the system to react to the
message of this step.
|
UseCasePart |
continuesAfter(java.lang.String stepName)
Makes the model runner continue after the specified step.
|
UseCasePart |
continuesAt(java.lang.String stepName)
Makes the model runner continue at the specified step.
|
UseCasePart |
continuesWithoutAlternativeAt(java.lang.String stepName)
Makes the model runner continue at the specified step.
|
<T> StepUserPart<T> |
on(java.lang.Class<T> eventOrExceptionClass)
Defines the type of system event objects or exceptions that this step
handles.
|
StepSystemPart<ModelRunner> |
system(java.lang.Runnable systemReaction)
Defines an "autonomous system reaction", meaning the system will react
without needing a message provided via
ModelRunner.reactTo(Object). |
StepSystemPart<ModelRunner> |
systemPublish(java.util.function.Supplier<?> systemReaction)
Defines an "autonomous system reaction", meaning the system will react
without needing a message provided via
ModelRunner.reactTo(Object). |
<T> StepUserPart<T> |
user(java.lang.Class<T> commandClass)
Defines the type of user command objects that this step accepts.
|
public StepAsPart as(AbstractActor... actors)
actors - the actors that define the user groupspublic <T> StepUserPart<T> user(java.lang.Class<T> commandClass)
Given that the step's condition is true, and the actor is right, the system reacts to objects that are instances of the specified class or instances of any direct or indirect subclass of the specified class.
T - the type of the classcommandClass - the class of commands the system reacts to in this steppublic <T> StepUserPart<T> on(java.lang.Class<T> eventOrExceptionClass)
Given that the step's condition is true, and the actor is right, the system reacts to objects that are instances of the specified class or instances of any direct or indirect subclass of the specified class.
T - the type of the classeventOrExceptionClass - the class of events the system reacts to in this
steppublic StepSystemPart<ModelRunner> system(java.lang.Runnable systemReaction)
ModelRunner.reactTo(Object).systemReaction - the autonomous system reactionpublic StepSystemPart<ModelRunner> systemPublish(java.util.function.Supplier<?> systemReaction)
ModelRunner.reactTo(Object).
After executing the system reaction, the runner will publish the returned
event.systemReaction - the autonomous system reaction, that returns a single
event to be published.public UseCasePart continuesAfter(java.lang.String stepName)
stepName - name of the step to continue after, in this use case.NoSuchElementInModel - if no step with the specified stepName is found
in the current use casepublic UseCasePart continuesAt(java.lang.String stepName)
stepName - name of the step to continue at, in this use case.NoSuchElementInModel - if no step with the specified stepName is found
in the current use casepublic UseCasePart continuesWithoutAlternativeAt(java.lang.String stepName)
stepName - name of the step to continue at, in this use case.NoSuchElementInModel - if no step with the specified stepName is found
in the current use case