Try OpenEdge Now
skip to main content
Java Open Clients
Using the Open Client Java OpenAPI to Directly Access the AppServer : Running procedures and user-defined functions : Running a single-run or singleton procedure (OpenProcObject) on an OpenAppObject

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:
public OpenProcObject createPO(String procName, ProcedureType procType)
                   throws Open4GLException, RunTime4GLException,
Specifies the name of the procedure to run, including any path relative to the PROPATH setting for the AppServer.
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:
public ProcedureType getProcedureType()