executeProcedure

executeProcedure is the on API call that is supported by the webservice.

Syntax

executeProcedure(string key, string jobid, NameValueArrays paramArray)

Returns

int: status
Message[]: messages

Description

This method invokes the specified procedure with an optional array of parameters. The call executes synchronously; that is, it blocks the client and returns the result upon completion.

Parameters

Table 1. executeProcedure parameters
Name Description
key The unique key of the procedure to run. A RemoteException error is returned if no procedure is bound to key.
jobid Optional string that identifies the job that is associated with this procedure execution. This string is a pass-through item, but it can be used to tie client jobs to the execution of a particular procedure.
paramArray An array of parameters to pass to the procedure. An error status and message is returned if one or more of the parameters is invalid (such as, the wrong type or an incorrect value). It is up to the client to determine the parameters, their types, and the number of values that are required by the procedure.

Return Parameters

Table 2. executeProcedure return parameters
Name Description
status An integer code:
  • 0 indicates that the procedure ran successfully
  • an integer indicates an error

Procedures can use the status to indicate different levels of errors.

messages An array of zero or more message data structures. If status is 0, this array does not contain ERROR messages, but might contain INFORMATION and WARNING messages.

If status is non-zero, messages can contain any mix of ERROR, INFORMATION, and WARNING messages.