Business objects are managed under the module ‘Business Objects’. The main screen lists all existing business objects in table form. On the top left, you can switch between server-side and client-side business objects.
Press ‘+’ in the upper right corner to create a new one from scratch. This fires up the following screen:
First, choose a name for your client-side business object and define a description (optional). Add some tags, so you can search in the overviews and the UI Designer by the tags.
You may then select any connector, plugin, server-side business object, client-side business object or managed libraries on the left side. It opens a dialog where you can select it. Each selected item appears in the list below, from where you might also remove it again by clicking the delete icon underneath ‘Actions’.
When you’re done, leave the screen by hitting the ‘Save’ button and return to the overview page. Your new business object appears in the table.
Usage of client-side Business Objects
You can see which applications or interfaces are using the business object. For that, click on the appropriate icon within the business object overview underneath ‘Actions’.
It opens a popup that displays all used applications:
By clicking on an entry, the application opens so that you can edit it directly.
Accessing input and output parameters of client-side Business Objects
You can access your input parameters via oPayload.<myInputParameter>.
To use the output parameters you have to return an object that has your parameters as properties. E.g.
return { myOutputParameter : myOutputValue }
As client-side Business Objects and their contents are called asynchronously, it may happen when a connector call is called that it is not yet finished and is returned undefined or null.
To avoid this, you must call fnSuccess instead.
fnSuccess ({ myOutputParameter : myOutputValue })
It must be called in your last callback/function of your client-side Business Object and returns the data.
In the case of an error, the following can be specified:
fnError ({ myErrorMessage : myErrorMessageValue })