Advanced features / Program execution |
There are different ways to execute compiled programs, according to the configuration and the development or production context.
Make sure that all required environment variables are properly defined, such as FGLPROFILE, FGLGUI, FGLSERVER, FGLLDPATH, LANG/LC_ALL.
To display program forms in graphical mode, the GUI front-end must run on the computer defined by FGLSERVER, and all network security components (i.e. firewalls) must allow TCP connections on the port defined by this environment variable.
Verify the database client environment settings, and check that the database server is running and can be accessed, for example by using a database vendor specific tool to execute SQL commands.
A program can be executed with the fglrun tool from the server command line:
fglrun myprogram
This method is typically used in development context. After compiling the programs and forms, for example with the make utility, execute the programs with fglrun.
Sub-programs can be executed from the main program with the RUN instruction. There can be limitations, according to the platform where the parent program executes.
It is also possible to start programs on the application server from the platform where the front-end resides.
On Android devices, an app can switch between foreground to background states.
The Android system can decide to stop an app in background state, for example when resources are required for other apps.
Genero programs running on servers are typically not prepared to be stopped at any time: Except in case of major failure, it's the program which decides when it terminates. On mobile devices, Android can decide to stop the app when it is in background state.
By default, when the app goes to background state, a notification is shown by GMA, to keep the app in foreground state, and avoid Android to stop the app. The notification disappears, when the app returns to foreground state.
Use the androidKeepForeground style attribute to control the way the GMA forces Android to keep your app alive: Set this attribute to "no" if your app can be stopped by Android, when it is in background state. When this style attribute is set to "no", GMA will not displaye a notification, when the app switches to background mode.
For more details, see UserInterface style attributes.