Skip to main content

Execute

Execute a class method or routine.

Synopsis

[Actions]
Execute:Namespace=namespace,[Additional Properties]

Description

Execute executes a class or routine. InterSystems IRIS® executes the defined class or routine when processing the [Actions] section during a configuration merge. The Execute parameters are always processed last. You specify the class or routine and its arguments in the Execute definition, and the class or routine must return a %StatusOpens in a new tab (%Library.StatusOpens in a new tab) value. During the merge, InterSystems IRIS runs the class or routine defined by Execute.

Examples

You can execute a class or a routine with Execute. For example:

Execute the class method SYS.ClassA.MethodZ() and pass three arguments to it; equivalent of SYS.ClassA.MethodZ("arg1","arg2","arg3"):
Execute:Namespace="%SYS",ClassName="SYS.ClassA",MethodName="MethodZ",Arg1="arg1",Arg2="arg2",Arg3="arg3"
Load and compile classes from an XML file; equivalent of $SYSTEM.OBJ.Load("c:\iris\test.xml","ck"):
Execute:Namespace="%SYS",ClassName=%SYSTEM.OBJ,MethodName="Load",Arg1="c:\iris\test.xml",Arg2="ck"
Run a routine and pass two arguments to it; equivalent of $$Tag2^ZTEST("arg1","arg2"):
Execute:Namespace="%SYS",RoutineName="$$Tag2^ZTEST",Arg1="arg1",Arg2="arg2"

Changing this Operation

This operation is designed to be used during a configuration merge. You can change Execute by editing the merge file in a text editor (as described in Editing the Active CPF).

FeedbackOpens in a new tab