processState(SmappStateProcessingContext, SmappStateProcessingAction) method

This method is always called by the processing engine when the state is activated by the follow-up transition.

public void processState (
    SmappStateProcessingContext context,
    SmappStateProcessingAction action
) throws MwizProcessingException, DBException


The reference implementation provided in this method is described as follow. This reference implementation is provided for to help simplifying a typical state development. This implementation is sufficient for most cases.
  • Retrieve the input and output attributes value from the datasource, and bind the value to the input and output attributes. Note: these attributes are persisted to the datasource as a session variable.
  • Delegate the call to the subclass method for processing the state logic, processStateLogic(SmappStateProcessingContext, SmappStateProcessingAction).
  • The delegate method, processStateLogic(SmappStateProcessingContext, SmappStateProcessingAction) returns the follow-up transition as SmappState object.
  • If the follow-up transition (SmappState) returned by the processStateLogic() is not null, communicate the follow-up transition to the processing engine using the SmappStateProcessingAction object, as follow.
    Otherwise, if the returned follow-up transition is null, then the processing engine will terminate the application. NOTE: if a SmappStateProcessingAction object is not set the engine will terminate the flow.
    Used by: processing enginecontextthe state processing context containing all the necessary object needed while processing the state.actionmechanism to communicate suggested follow-up action to the processing engineMwizProcessingExceptionany exceptions that warrant terminating the applicationDBExceptionany database exceptions that warrant terminating the applicationCryptoExceptionany encryption exceptions that warrant terminating the application