Skip to main content

Helpcenter

UI Connector

The Build.One UI Connector is part of the Build.One Platform. The UI Connector is typical used in a Progress Backend to open a screen in Build.One or to send messages to the Build.One Frontend, e. g. to update a status in the frontend from a function, which runs in the backend.

Examples for Progress Backends:

  • The development platform of Build.One

  • Any Progress client

  • An existing application build with Progress

This means the UI Connector can also be accessed outside of Build.One.

Technically the UI Connector works with the messaging server of Build.One and is implemented as a wrapper class, which implement REST-Calls to the messaging server. The messaging server is running on the NodeJS backend. Therefore, it is also possible to reuse the architecture of the UI Connector written in Progress ABL in other programming language.

Examples

The user has to be logged in into the Build.One platform to see the information provided by the backend. The browser must be opened and there must be an active Build.One session via user login, when calling the UI Connector from another application.

Example 1. Opening a Screen

The following code snippet is an example for opening the screen CustomerChooseDialog in the Build.One application. The Build.One application runs on http://localhost:59002, which is the standard URL to use the UI Connector in a gitpod environment. Include the following snippet in an own .p-file or run it in the integrated Progress client.

def var connector as Akioma.Swat.Integration.Client.UiConnector no-undo.

assign connector = new  
       Akioma.Swat.Integration.Client.UiConnector("http://localhost:59002").

  connector:launchContainer("CustomerChooseDialog", "").


Example 2. Sending a Message

The following code snippet is an example for sending a message to the Build.One application, which runs on http://localhost:59002. The text can be edited at the start of the program by entering some values into the variable txt. These are sent to the application along with the build.one string and displayed to the user developer.

def var connector as Akioma.Swat.Integration.Client.UiConnector no-undo.

assign connector = new 
				Akioma.Swat.Integration.Client.UiConnector("http://localhost:59002").

def var txt as char format "x(80)" no-undo.

repeat:
  update txt.
  connector:showMessage(txt,"","build.one says","developer").
end.


Methods

  • openContainer: Receives a container name and a handle and launches the specified container. If the container name is empty, it will launch by handle. If the container name of the container is 'offerNewG', it will launch OfferCreateDialog.

    • pcContainer AS CHARACTER

    • pcHdl AS CHARACTER

  • removeMessage: Removes a message with given ID (mandatory). If no message with the specified ID is found, nothing happens.

    • pcId  AS CHARACTER

  • showMessage: Shows a new notification with the given parameters. If ID is specified, it can also be updated later.

    • pcText AS CHARACTER

    • pcType AS CHARACTER

    • pcTitle AS CHARACTER

  • showMessage

    • pcText AS CHARACTER

    • pcType AS CHARACTER

    • pcTitle AS CHARACTER

    • pcUser AS CHARACTER

  • showMessage

    • pcId AS CHARACTER

    • pcText AS CHARACTER

    • pcType AS CHARACTER

    • pcTitle AS CHARACTER

    • pcMoreText AS CHARACTER

    • piExpire AS INTEGER

    • pcMessage AS CHARACTER

    • pcLinkValue AS CHARACTER

    • pcLinkDesc AS CHARACTER

    • pcBottom  AS CHARACTER

    • pcOptions AS CHARACTER

    • pcUser AS CHARACTER

    • pcDoc AS CHARACTER

    • pcDocDesc AS CHARACTER

  • updateMessage: Updates a message with the given ID with the specified parameters.

    • pcId AS CHARACTER

    • pcText AS CHARACTER

    • pcType AS CHARACTER

    • pcTitle AS CHARACTER

    • pcMoreText AS CHARACTER

    • piExpire AS INTEGER

    • pcMessage AS CHARACTER

    • pcLinkValue AS CHARACTER

    • pcLinkDesc AS CHARACTER

    • pcBottom  AS CHARACTER

    • pcOptions AS CHARACTER

    • pcUser AS CHARACTER

    • pcDoc AS CHARACTER

    • pcDocDesc AS CHARACTER

  • ShowDocumentLink: Is not working.

    • pcText AS CHARACTER

    • pcFile AS CHARACTER

    • pcFileDesc AS CHARACTER

    • pcText2 AS CHARACTER

The methods SetUIValue, applyUIattribute, ShowLinkMessage, ShowLinkMessageUser, RenderContaine, are not supported at this time

Note

For now, the link only allows navigating in swat. It is not a normal HREF link. For example, if the 'pcLinkValue' is send to the UI Connector it would open up the following URL: <gitpod_URL>/pcLinkValue. It does not work with external URLs. When displaying a link, the target will always be '_blank'. The code will be executed in a new window. Currently not doing much.

Note

If no user is supplied, then all the logged in users will receive the notification message.

Note

In some use cases, it is possible to combine multiple parameters which have a clickable link, such as 'moretext' and 'doc'. This is not recommended, because with the current behavior it is not possible to click both links. After the first click, the notification message is closed.

Note

When attempting to update a closed message (either by expiring or closed by clicking on it), nothing will happen.

Further Information

For further information about customizable notification messages, parameters and a UI Connector sample dialog, see Customizable Notification Messages.

API Documentation

API documentation with supported endpoints can be found on the following link: <gitpodenv>/node/docs/

Note

You need the slash at the end, otherwise it will not work.