execute/4—run a program as an external process
The execute/4 primitive runs a program as an external process.
execute/4 arguments
Argument | Mode | Type | Description |
---|---|---|---|
$EVENT | Input | OBJECT | Specifies the object handle for the event on which the action is to be performed |
$PROG | Input | STRING | Specifies the name of the external program to be run |
$ARGS | Input | LIST_OF ANY | Action argument list. |
$ACTEVT | Input | STRING | YES|NO |
Use execute/4 to run the program specified in the $PROG argument as an external process on the event with the object handle specified in the $EVENT argument. The program location is determined in the same manner as it is for actions. For more information, see Actions. The execute/4 call terminates immediately when the external process has been set up, even if the program is not yet finished. The remainder of the rule is executed.
The program is activated by using the slot name as environment variable name, in an environment that contains all the slots of the event. In addition, some system-defined variables are available.
If the $ACTEVT argument is specified as YES, an MC_CELL_ACTION_RESULT event will be created. On termination of the program, the MC_CELL_ACTION_RESULT event will be updated with the result.
execute/4 example