Class WorkflowStep.Builder
java.lang.Object
org.efs.activator.WorkflowStep.Builder
- Enclosing class:
WorkflowStep
Provides ability to programmatically define a
WorkflowStep instance. Requires definition of a
unique IEfsActivateAgent name, agent begin and
end states, and maximum allowed agent transition time.
A workflow step builder instance is accessed via
WorkflowStep.builder().
A builder may be used in combination with a loaded
typesafe WorkflowStepConfig bean to create a
workflow step instance.
- Author:
- Charles W. Rapp
-
Method Summary
Modifier and TypeMethodDescriptionSetsagentname.Sets time agent is allowed to complete the transition from begin to end state.beginState(EfsAgentState state) Sets expected agent begin state.build()Returns new workflow step based on this builder's settings.endState(EfsAgentState state) Sets target agent end state.set(WorkflowStepConfig config) Fills in builder with given workflow step configuration.
-
Method Details
-
agentName
Setsagentname.- Parameters:
name- agent name.- Returns:
this Builderinstance.- Throws:
IllegalArgumentException- ifnameis eithernullor an empty string.
-
beginState
Sets expected agent begin state.- Parameters:
state- agent begin state.- Returns:
this Builderinstance.- Throws:
NullPointerException- ifstateisnull.
-
endState
Sets target agent end state.- Parameters:
state- agent end state.- Returns:
this Builderinstance.- Throws:
NullPointerException- ifstateisnull.
-
allowedTransitionTime
Sets time agent is allowed to complete the transition from begin to end state.- Parameters:
time- allowed agent transition time.- Returns:
this Builderinstance.- Throws:
NullPointerException- iftimeisnull.IllegalArgumentException- iftime≤ zero.
-
set
Fills in builder with given workflow step configuration.- Parameters:
config- workflow configuration.- Returns:
this Builderinstance.- Throws:
NullPointerException- if required non-nullfield is set tonull.IllegalArgumentException- if a field is set to an invalid value.
-
build
Returns new workflow step based on this builder's settings.- Returns:
- new workflow step.
- Throws:
net.sf.eBus.util.ValidationException- ifthis Builderhas an incomplete or invalid setting.
-