Types of execution
- Last UpdatedApr 24, 2025
- 3 minute read
Triggered execution occurs when the ACE Configuration (aceconfig) record has its inputTriggered field set to true. When configured this way, the Application Calculation Engine (ACE) still processes the record on every execution cycle. It is not truly exception based execution. On each execution cycle, the ACE compares all of the input values with their previous values. If any differences are noted, the ACE code (acecode) is executed.
There are six basic types of ACE execution:
-
Input triggered
-
Alarm triggered
-
Startup triggered
-
Interval
-
Job Scheduler (JSH)
-
Manual
These are not independent of each other and a single aceconfig record can exhibit all six types of execution without reconfiguring.
Input, alarm and startup triggered execution are mutually inclusive tests. Any test that is satisfied and for which the record is configured causes execution to proceed. In addition, this triggering is independent of other ACE scheduling and can be combined with any other scheduling mechanism.
Interval execution occurs when ACE is configured with a time interval. As an example, if an aceconfig record is set to execute every 15 seconds, then it executes every 15 seconds independent of inputs changing. The 15 second intervals are set up so that they correspond with top-of-minute boundaries. Assuming a 5 second execution cycle, every 5 seconds the ACE checks this record to see if the 15 seconds have expired. If not, then the record is ignored. If the time has expired, then the record is executed and any flag processing needed is performed.
The Job Scheduler (JSH) execution is scheduled through the JSH in an indirect fashion. The JSH is used to schedule programs, scripts, or C code to run at specified moments in time or at specific intervals. To use JSH for ACE, you simply need to schedule a command as follows:
fnput aceconfig.<recordname> run
Where: <recordname> = the name of the desired aceconfig record.
The above argument causes the DoRun field to get set at that time. The aceconfig record will run on the next execution cycle.
Manual execution occurs when the ACE record executes only on Administrator/Controller command. This is accomplished by setting the interval to 0 seconds and clearing the inputTriggered flag. When a record is configured in this manner, the aceconfig record is never executed. To get it to execute, you must manually set the doRun flag to true. Whenever the doRun flag on record is set to true, that record will run if it is enabled.
The following chart shows the circumstances that will result in an ACE record being triggered. Note that points that are triggered on input changes get executed in many different circumstances.
The purpose of an input triggered point is to ensure that the output state always corresponds to the input state. Therefore, whenever the inputs change, the output must change as well, and any programmed side-effects must also happen. When the actual code that is being run is changed, the routine must be executed to ensure that the current output state matches the inputs. A simple example is a procedure that adds 2 onto an input. If this code is changed to instead add 4, then the output values for affected aceconfig records are wrong until they are executed. A similar argument holds for changes to the aceconfig records themselves.
Input triggered routines are also executed when a server goes Hot. This happens because the past values are not recorded when a server is not Hot and therefore we have to assume that they might have changed.
An argument is passed to each ACE procedure when it is run to flag startup situations rather than input changes. This flag is the runBecauseGoingHot parameter. The chart makes note of when this flag is set. If you do not want processing to occur in startup scenarios, then this flag can be cleared.
runBecauseGoingHot flag settings
|
|
Input Triggered |
Startup Triggered |
Alarm Triggered |
Periodic |
Not Triggered |
|---|---|---|---|---|---|
|
Acecode changes |
X, Y |
|
|
|
|
|
Aceconfig record changes |
X, Y |
|
|
|
|
|
Input changes |
X |
|
|
|
|
|
Hot after Startup |
X, Y |
X, Y |
|
|
|
|
Hot after Failover |
X, Y |
X, Y |
|
|
|
|
Input goes into alarm |
|
|
X |
|
|
|
Input comes out of alarm |
|
|
X |
|
|
|
Periodic time expires |
|
|
|
X |
|
|
doRun flag is set |
X |
X |
X |
X |
X |
X - ACE procedure will execute.
Y - runBecauseGoingHot flag will be set.