The GeneXusSuperApps module is intended for the development of Super Apps with GeneXus. It implements the following functionalities:
- Allow the Super App to query the Mini App catalog in the Provisioning Server, filtering by several criteria.
- Allow a Super App to load a Mini App and transition to it.
- Mini App cache management.
The GeneXusSuperApps module is compound by two External objects:
And these helpers as Structured Data Types (SDTs):
- MiniAppInformation
- CachedMiniApp
Note that the External objects are only available when running in a Super App. If the app is not a Super App, or called from a Mini App, then all methods will fail.
It is an SDT containing the detailed information of a Mini App.
The following members are part of this SDT (there may be more if needed):
- Id: String - the Mini App identifier as required by the Load method (see below)
- Name: String - the Mini App's human-readable name
- Description: String - a short description of the Mini App
- Metadata: URL - URL pointing to the Mini App metadata
- EntryPoint: String - Mini App main name
- ServiceURL: URL - URL pointing to the Mini App backend service URL
- Signature: String - Mini App signature
- Version: Integer - Mini App version
- Icon: Image - an application icon for the Mini App
- Banner: Image - an alternative image for promoting or featuring the Mini App
- Card: Image - an alternative image to present the Mini App in the Super App
It includes the following properties and methods:
ProvisioningURL: URL
Read-only property returning the Provisioning Server's URL.
These methods allow the Super App to query the Mini App catalog in the Provisioning Server, filtering with various criteria. You need to configure the super application properties to access the corresponding catalog (*)
Notes on returned MiniAppInformation fields:
- Metadata & ServiceURL are required (should not be empty)
- Icon, Banner & Card are optional (can be empty) and could be relative URLs. In case URLs are relative, Provisioning implementations transform URLs to absolute, being URLs relative to ProvisioningURL.
GetByText(&text, &start, &count): collectionOf(MiniAppInformation)
Returns the list of Mini Apps that match the given text criteria. The search is performed by doing a full-text search on the Mini Programs (name, title, description).
Parameters:
- &text: String - The string with the search criteria.
- &start: Integer - 0-based index from which elements will be returned.
- &count: Integer - maximum number of returned elements ( 0 means all ).
Returns:
- A collection of MiniAppInformation.
GetByLocation(&geopoint, &radius, &start, &count): collectionOf(MiniAppInformation)
Returns the list of Mini Apps that are available inside the circular region with the center in the given &geopoint and a maximum radius given by &radius.
Parameters:
- &geopoint: Geopoint - The center point of the specified region.
- &radius: Numeric - The radius in meters of the circular region.
- &start: Integer - 0-based index from which elements will be returned.
- &count: Integer - maximum number of returned elements ( 0 means all ).
Returns:
- A collection of MiniAppInformation.
GetByTag(&tag, &start, &count): collectionOf(MiniAppInformation)
When registering a Mini App in the provisioning server, several tags can be declared. This method will look for exact matches for the given tag.
Parameters:
- &tag: String - The tag to search for.
- &start: Integer - 0-based index from which elements will be returned.
- &count: Integer - maximum number of returned elements ( 0 means all ).
Returns:
- A collection of MiniAppInformation.
GetFeatured(&start, &count): collectionOf(MiniAppInformation)
Return the list of Mini Apps declared as featured in a time window (validFrom <= &today =< validTo).
Parameters:
- &start: Integer - 0-based index from which elements will be returned.
- &count: Integer - maximum number of returned elements ( 0 means all ).
Returns:
- A collection of MiniAppInformation.
GetById(&Id): MiniAppInformation
Returns the Mini Apps corresponding to the given Id.
Parameters:
- &Id: String - Mini App Id
Returns:
It includes the following properties and methods
Can be used to have a conditional code in the API exposed to the Mini App according to the Super App execution mode.
This property can be used to identify which Mini-App is called the Super-App API.
Load(in: &MiniAppInformation)
Loads a Mini App and transitions to it.
Parameters:
- &MiniAppInformation: SDT - Input parameter with the Mini App information, as previously defined. The following validations should be performed on MiniAppInformation fields, otherwise load should fail:
- EntryPoint should have the format {GUID}-{Name}, where {GUID} is the GUID of the KBObject type (currently valids are SDPanel, WorkWithSD and Menu (ex Dashboard)).
- Signature should not be empty and should be valid for the downloaded metadata from URL in Metadata field (If cached, no re-validation is required).
If the Mini App does not exist in the Provisioning Server, or if it is not compatible with the current version of the Super App, the method call fails (aborting the composite block when appropriate).
GetCached(): collectionOf(&CachedMiniApp)
RemoveCached(&miniAppId, &miniAppVersion): boolean
ClearCached(): boolean
You have to install GeneXusSuperApp module using the Manage Module References dialog from the Knowledge Manager option (located in the GeneXus IDE toolbar).
GeneXus Beta