LogicApp Script Features
The LogicApp is a general purpose application for executing service logic in a Lua sandbox.
A Lua script executing within the LogicApp may of course use all the features of the Lua programming language.
Additionally, there is a library of helper methods including core and pluggable helper methods.
These method are provided by three different sources – Built-In, Lua Services, and Lua Agents.
Regardless of the provider of the method, the implementation will be one of:
- Pure Lua: Method implemented in Lua without returning to LogicApp.
- Synchonous Action: Method returns to LogicApp framework but does not suspend.
- Asynchronous Action: Method returns to LogicApp, suspends to process asynchronously.
The Built-In methods provide access to the core
functions of the
n2svcd framework, such as debugging, EDR generation, and other
A Lua Service is the mechanism by which a Lua script is initiated within the LogicApp.
A LogicApp Lua script can only run when it is started by a service, and that script has access to only one service during its run-time. The service is responsible for:
- Choosing which Lua script to execute.
- Supplying arguments to the Lua script when it begins.
- Handling the final result returned by the Lua script.
- Optionally providing additional service-related methods to the script.
Each Service typically provides supporting methods which are only available to scripts which were initated by that service.
A Lua Agent provides general purpose functions which any Lua script can run.
A Lua script may use as many agents as it wishes (including none) during its execution.
Each Agent provides supporting methods. All scripts may use any installed & configured Agent, regardless of which Lua Service initiated the script.