Sends a menu to subscribers via Unstructured Supplementary Service Data (USSD), and expects menu-option responses. This is an abstract state type, which you can extend to develop dynamic menus.
By default, USSD states are disabled. USSD is a custom protocol that mobile operators can implement. To develop USSD applications, contact SAP® Professional Services.
Typically used when the menu is created successfully, and the user sends a valid response.
Used only if there is an internal error processing the dynamic menu.
To process dynamic transitions, they must be implemented in the state’s code.
In this example, if users send a valid response, another application is called to process the response. If an error occurs, control is passed to an application that terminates processing. The selected option key is stored in the session variable VAR_KEY, and the selected option value is stored in the session variable VAR_VALUE.
/* The state attribute list is already set */ protected abstract Attribute getStateAttributeList(); /* * Initialize the dynamic list, possibly based on subscriber information */ protected abstract SmappState init(SmappStateProcessingAction action) throws MwizProcessingException, DBException, JAXBException, IOException, ServiceException, RequiredParameterMissingException; /* * Return the list of options in a format [[key,text],...] */ protected abstract List<KeyValuePair<String, String>> getMenuList() throws NumberFormatException, DBException, RequiredParameterMissingException; /* * Allow the branching of processes based on selected key. * If you want to use the configured dynamic follow-up * transitions, override this method and return continueDyn(key); * otherwise, override this method and return null to follow the * OK transition when the user selects an option. */ protected abstract SmappState saveSessionVariables(SmappStateProcessingContext context, String key, String value) throws MwizProcessingException, DBException, RequiredParameterMissingException; ...