Page tree
Skip to end of metadata
Go to start of metadata

The Backend has the opportunity to trigger UI-Messages, which are created/triggered in the backend as part of the Businesslogic, but are displayed in the UI. This allows easier migration of old logic, where data access and UI were not separated.

There are 2 basic types: Messages and Questions.

The difference is that Messages are just displayed in the UI, and after they are displayed (and confirmed in case of a modal message) the UI does nothing.  Questions instead require an action/answer from the User. Hence, when displayed in the UI they provide additional buttons like yes/no, which the user can select from. After selecting a button, the backend call is immediately re-performed, providing information to the backend about which button has been clicked. It is then the task of the Backend-code to check for the answered questions and perform the correct logic.

The Message-functionality is available in Business-Tasks (when invoking BT-Methods) and Business-Entities (when submitting Records for create, update, delete).

Backend implementation:

In the Backend, Messages can be created using the message-API:

  • Message API / methods

 

Typical methods that contain code for creating ui-messages:

  • Validate

 

Overview

Typevisualizationj Sub-typesupdate behaviourUI behaviourVisualisation Modal/Non-ModalSample backend code
QuestionsInfo / warningwhile questions pending it will always undo, when all questions answered it depends on answers and/or the business-logicShow question, after user clicks button, re-perform backend call, unless user pressed cancelM 
Messages     
- Info-MessageInfo / warningCommitShow messageM / N 

- Validation-Message

Info / warning / errorundoShow validation messageM / N 
- Runtime-Errorerrorundoshow error message, in a promise (e.g. BusinessTask) the FAIL path will be executedM / N 
  • No labels