Running a single-run or singleton procedure (OpenProcObject) on an OpenAppObject
You can run a procedure with no parameters in the main block as single-run, singleton, or persistent on the connected AppServer using the following method on the OpenAppObject:
Syntax
public OpenProcObject createPO(String procName, ProcedureType procType)
throws Open4GLException, RunTime4GLException,
SystemErrorException
procName
Specifies the name of the procedure to run, including any path relative to the PROPATH setting for the AppServer.
procType
A Java enum type that specifies the procedure as persistent (ProcedureType.PERSISTENT), single-run (ProcedureType.SINGLE_RUN), or singleton. (ProcedureType.SINGLETON).
This method returns a com.progress.open4gl.javaproxy.OpenProcObject, which you can use to run internal procedures and user-defined functions provided by the procedure.
Note: The main block of a singleton or single-run procedure cannot have any parameters, so there is no paramArray available with this syntax. Although persistent procedures can have parameters in general, only persistent procedures without parameters can be run using this syntax.
The OpenProcObject also contains the method getProcedureType(), which returns PERSISTENT, SINGLE_RUN, or SINGLETON, depending on the procedure type of the object: