public class FlowlessConditionPart
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
<T> FlowlessUserPart<T> |
on(java.lang.Class<T> messageClass)
Defines the type of messages or exceptions that will cause a system reaction,
given that the condition is fulfilled.
|
FlowlessStepPart |
step(java.lang.String stepName)
Creates a named step.
|
FlowlessSystemPart<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). |
FlowlessSystemPart<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> FlowlessUserPart<T> |
user(java.lang.Class<T> commandClass)
Defines the type of user commands that this step accepts.
|
public FlowlessStepPart step(java.lang.String stepName)
stepName - the name of the created steppublic <T> FlowlessUserPart<T> user(java.lang.Class<T> commandClass)
Given that the step's condition is true, 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> FlowlessUserPart<T> on(java.lang.Class<T> messageClass)
Given that the step's condition is true, 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 classmessageClass - the class of messages the system reacts topublic FlowlessSystemPart<ModelRunner> system(java.lang.Runnable systemReaction)
ModelRunner.reactTo(Object).systemReaction - the autonomous system reactionpublic FlowlessSystemPart<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.