Class Step
java.lang.Object
com.broadleafcommerce.orchestration.config.Step
A configuration element that is analogous to a
SimpleActivity
in the workflow. Used to
establish the activities, as well as the decision criteria used to determine the next step based
on activity outcome (see ActivityResponse
).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDecision
(String response, String nextStep) protected boolean
copy()
boolean
Map of response value (seeActivityResponse.getResponseState()
) to activity name (seeSimpleActivity.getName()
).WhenisWait()
is true, the amount of time to pause before checking for an interrupt signal.getName()
The name of the activity.Analogous toActivityResponse.getPauseOnReturn()
.The timeout value for a step.The amount of time to wait for a cases whereisWait
is true.int
hashCode()
boolean
Whether the activity should be allowed to be selected for targeted execution viaSimpleWorkflow.goToStep(String)
.boolean
isWait()
Special case for a step that should simply wait for an amount of time.void
setAdminSelectable
(boolean adminSelectable) Whether the activity should be allowed to be selected for targeted execution viaSimpleWorkflow.goToStep(String)
.void
setInterruptPollingInterval
(Duration interruptPollingInterval) WhenisWait()
is true, the amount of time to pause before checking for an interrupt signal.void
The name of the activity.void
setPauseOnReturn
(Boolean pauseOnReturn) Analogous toActivityResponse.getPauseOnReturn()
.void
setTimeout
(Duration timeout) The timeout value for a step.void
setWait
(boolean isWait) Special case for a step that should simply wait for an amount of time.void
setWaitDuration
(Duration waitDuration) The amount of time to wait for a cases whereisWait
is true.toString()
-
Constructor Details
-
Step
-
Step
-
Step
public Step()
-
-
Method Details
-
addDecision
-
copy
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getName
The name of the activity. Should matchSimpleActivity.getName()
. Exception to this is whenisWait()
is true, in which case, there is no explicitly declaredSimpleActivity
. There is also no backing Spring bean for a wait step. -
isAdminSelectable
public boolean isAdminSelectable()Whether the activity should be allowed to be selected for targeted execution viaSimpleWorkflow.goToStep(String)
. -
getDecisions
Map of response value (seeActivityResponse.getResponseState()
) to activity name (seeSimpleActivity.getName()
). Used to decide what activity to execute next based on a response from the current activity. For a Step marked withisWait()
true, there will always only be one response key (WaitStep.WAIT_COMPLETION_RESPONSE
). -
isWait
public boolean isWait()Special case for a step that should simply wait for an amount of time. This type of step always results in a responseState ofWaitStep.WAIT_COMPLETION_RESPONSE
upon completion. For this type of step, you will usually include a single decision element whose key isWaitStep.WAIT_COMPLETION_RESPONSE
and whose value is the next activity to execute at the conclusion of the wait duration. -
getWaitDuration
The amount of time to wait for a cases whereisWait
is true. -
getInterruptPollingInterval
WhenisWait()
is true, the amount of time to pause before checking for an interrupt signal. Workflow signals (likeSimpleWorkflow.pause(boolean)
) can request change, and by intermittent polling for such signals, a wait step can exit early. -
getTimeout
The timeout value for a step. If the system detects that a step has not concluded within the timeout duration, the workflow is a candidate for being declared a failed workflow. The default is 5 minutes. Longer running activities should set this to a higher value to avoid premature conclusion of the workflow. -
getPauseOnReturn
Analogous toActivityResponse.getPauseOnReturn()
. Setting here has the effect of statically declaring theSimpleActivity
defined by this step should return the declared value on exit. This is useful for activities that are known to always pause the workflow upon exit. Note, if theActivityResponse
is explicitly set via logic in theSimpleActivity
, then that value will win over what's declared here. Default value is null (not set). -
setName
The name of the activity. Should matchSimpleActivity.getName()
. Exception to this is whenisWait()
is true, in which case, there is no explicitly declaredSimpleActivity
. There is also no backing Spring bean for a wait step. -
setAdminSelectable
public void setAdminSelectable(boolean adminSelectable) Whether the activity should be allowed to be selected for targeted execution viaSimpleWorkflow.goToStep(String)
. -
setWait
public void setWait(boolean isWait) Special case for a step that should simply wait for an amount of time. This type of step always results in a responseState ofWaitStep.WAIT_COMPLETION_RESPONSE
upon completion. For this type of step, you will usually include a single decision element whose key isWaitStep.WAIT_COMPLETION_RESPONSE
and whose value is the next activity to execute at the conclusion of the wait duration. -
setWaitDuration
The amount of time to wait for a cases whereisWait
is true. -
setInterruptPollingInterval
WhenisWait()
is true, the amount of time to pause before checking for an interrupt signal. Workflow signals (likeSimpleWorkflow.pause(boolean)
) can request change, and by intermittent polling for such signals, a wait step can exit early. -
setTimeout
The timeout value for a step. If the system detects that a step has not concluded within the timeout duration, the workflow is a candidate for being declared a failed workflow. The default is 5 minutes. Longer running activities should set this to a higher value to avoid premature conclusion of the workflow. -
setPauseOnReturn
Analogous toActivityResponse.getPauseOnReturn()
. Setting here has the effect of statically declaring theSimpleActivity
defined by this step should return the declared value on exit. This is useful for activities that are known to always pause the workflow upon exit. Note, if theActivityResponse
is explicitly set via logic in theSimpleActivity
, then that value will win over what's declared here. Default value is null (not set).
-