Runtime API#
This section documents GLOW’s Runtime API which enables the integration of a GLOW Solution (a Guided Workflow Application) with the GLOW infrastructure.
- ansys.saf.glow.runtime.glow_main(definition_module: ModuleType, ui_app_module: ModuleType | None = None) None#
Implement a Solution component process requiring a
Solutionderived Solution definition. The process will be orchestrated by GLOW which will pass command line arguments to enable the process to perform the required functionality.glow_mainwill parse those command line arguments.From the perspective of a Solution developer the call to
glow_mainis the means for registering a Solution (a class derived fromSolution) and, optionally, a UI for that Solution with the GLOW infrastructure.glow_mainshould be called as the only or core part of a module designed to run in the python top-level code environment.The
saf runcommand searchesansys.solutionsfor a module that importsglow_main(asglow_main) and executes that module in the python top-level code environment.The
saf runcommand, with a--no-uiargument, can run the Solution without a UI ifui_app_moduleis not present.The GLOW Solution template includes a
mainmodule that satisfies the requirements ofsaf run. The Solution Developer’s guide section on solution creation contains more information on the Solution template.- Parameters:
- definition_module
ModuleType The python module object that contains a single class derived from
Solution.- ui_app_module
ModuleType,optional The python module object that contains an
appvariable referring to a Dash app object. This module is required to enable the GLOW infrastructure to orchestrate a UI for the Solution.
- definition_module
Notes
The module containing
glow_mainwill potentially be executed by the orchestrator in a number of different concurrent processes in the same Solution stack.