The processing engine recognizes three signaling actions: continue,
wait, and terminate, which you can send by calling:
- continueProcessing
(SmappState) – continues execution to the specified follow-up
state. Causes an infinite loop if the follow-up state is the same as the
calling state. Termination must be handled within the state.
- waitForMessage() – pauses
execution and waits for a response, then continues execution to the
specified follow-up state.
- terminateProcessing () –
terminates the application.
States that extend the
SmappStatePlugin class, implementing logic
inside the
processStateLogic method need not explicitly call
continueProcessing or
terminateProcessing.
The same functionality is accomplished by returning the follow-up state from the
processStateLogic method. For example, instead of calling
continueProcessing, return the follow-up state using one of
the helper methods:
- continueOk()
- continueFail()
- continueDyn()
To terminate processing, states should call continueFail, and let
the state-editor configuration determine what to do. If the state is not configured
to forward continueFail calls to a follow-up state, the
application automatically terminates.
Note: If a state calls waitForMessage before it returns null from the
processStateLogic method, the application does not terminate,
because the state is waiting for a response. For this reason, SAP recommends that
you do not let states return null.
To enable states to send messages and wait for replies before they continue
processing, call waitForMessage.
To display a message control in the state editor, call
supportsSendSmsMessage.