iKnowBase


Package IKB_FUNCTIONS_CLIENT


Field Summary
 VARCHAR2(63)QUEUE_NAME CONSTANT := UPPER(IKB_GLOBAL_PREFS.PROVIDER_SCHEMA) || '.IKB_FUNCTIONS_Q'
           Oracle AQ queue name
 NUMBER(10,0)DEFAULT_PRIORITY CONSTANT := 4
           Default priority number if not explicitly set.
 NUMBER(10,0)DEFAULT_TTLSECONDS CONSTANT := 86400
           Default time-to-live in seconds for the enqueued request if not explicitly set.
 NUMBER(10,0)DEFAULT_MAX_WAIT_SECONDS CONSTANT := 60
           Default max number of seconds to wait for a response if not explicitly set.

Method Summary
  CLEANUP(P_MAX_AGE_DAYS IN INTEGER)
           Cleanup procedure deleting all records older than the specified number of days
 RAW SUBMIT(FUNCTIONNAME IN VARCHAR2, INPUT IN CLOB, SERVICENAME IN VARCHAR2 DEFAULT NULL, PRIORITY IN NUMBER DEFAULT DEFAULT_PRIORITY, TTLSECONDS IN BINARY_INTEGER DEFAULT DEFAULT_TTLSECONDS)
           Submit a job for processing at a later time (but "as soon as possible").
 RAW SUBMIT(REQUEST IN CLOB)
           Submit a job for processing at a later time (but "as soon as possible").
 CLOB SUBMIT_AND_WAIT_FOR_RESPONSE(FUNCTIONNAME IN VARCHAR2, INPUT IN CLOB, SERVICENAME IN VARCHAR2 DEFAULT NULL, PRIORITY IN NUMBER DEFAULT DEFAULT_PRIORITY, TTLSECONDS IN BINARY_INTEGER DEFAULT DEFAULT_TTLSECONDS, MAX_WAIT_SECONDS IN NUMBER DEFAULT DEFAULT_MAX_WAIT_SECONDS)
           Submit a job for processing at a later time (but "as soon as possible") and wait for response.
 CLOB SUBMIT_AND_WAIT_FOR_RESPONSE(REQUEST IN CLOB, MAX_WAIT_SECONDS IN NUMBER DEFAULT DEFAULT_MAX_WAIT_SECONDS)
           Submit a job for processing at a later time (but "as soon as possible") and wait for response.

Field Detail

DEFAULT_MAX_WAIT_SECONDS

        public NUMBER(10,0) DEFAULT_MAX_WAIT_SECONDS CONSTANT := 60
Default max number of seconds to wait for a response if not explicitly set.

DEFAULT_PRIORITY

        public NUMBER(10,0) DEFAULT_PRIORITY CONSTANT := 4
Default priority number if not explicitly set. Lower numbers = higher priority.

DEFAULT_TTLSECONDS

        public NUMBER(10,0) DEFAULT_TTLSECONDS CONSTANT := 86400
Default time-to-live in seconds for the enqueued request if not explicitly set.

QUEUE_NAME

        public VARCHAR2(63) QUEUE_NAME CONSTANT := UPPER(IKB_GLOBAL_PREFS.PROVIDER_SCHEMA) || '.IKB_FUNCTIONS_Q'
Oracle AQ queue name

Method Detail

CLEANUP

public  CLEANUP(P_MAX_AGE_DAYS IN INTEGER)
Cleanup procedure deleting all records older than the specified number of days
Parameters:
P_MAX_AGE_DAYS - Number of days to keep / remove logs older than p_max_age_days.


SUBMIT

public RAW SUBMIT(FUNCTIONNAME IN VARCHAR2, 
INPUT IN CLOB,
SERVICENAME IN VARCHAR2 DEFAULT NULL,
PRIORITY IN NUMBER DEFAULT DEFAULT_PRIORITY,
TTLSECONDS IN BINARY_INTEGER DEFAULT DEFAULT_TTLSECONDS)
Submit a job for processing at a later time (but "as soon as possible"). This function will issue the functions request on commit.
Parameters:
FUNCTIONNAME - Name of the function to execute.
INPUT - Map of input parameters.
SERVICENAME - Optional service name used to select one or more specific function servers.
PRIORITY - Optional priority number for the queued messages. Lower number has higher priority.
TTLSECONDS - Optional time to live in seconds for the request message.
Returns:
Job execution ID.


SUBMIT

public RAW SUBMIT(REQUEST IN CLOB)
Submit a job for processing at a later time (but "as soon as possible"). This function will issue the functions request on commit.
Parameters:
REQUEST - JSON-formatted execution request
Returns:
Job execution ID.


SUBMIT_AND_WAIT_FOR_RESPONSE

public CLOB SUBMIT_AND_WAIT_FOR_RESPONSE(FUNCTIONNAME IN VARCHAR2, 
INPUT IN CLOB,
SERVICENAME IN VARCHAR2 DEFAULT NULL,
PRIORITY IN NUMBER DEFAULT DEFAULT_PRIORITY,
TTLSECONDS IN BINARY_INTEGER DEFAULT DEFAULT_TTLSECONDS,
MAX_WAIT_SECONDS IN NUMBER DEFAULT DEFAULT_MAX_WAIT_SECONDS)
Submit a job for processing at a later time (but "as soon as possible") and wait for response. This function will issue the functions request immediately (NOT on commit). Make sure the data the function relies on have already been committed.
Parameters:
FUNCTIONNAME - Name of the function to execute.
INPUT - Map of input parameters.
PRIORITY - Optional priority number for the queued messages. Lower number has higher priority.
TTLSECONDS - Optional time to live in seconds for the request message.
Returns:
JSON-formatted FunctionResponse if a response was provided before maxWaitSeconds.


SUBMIT_AND_WAIT_FOR_RESPONSE

public CLOB SUBMIT_AND_WAIT_FOR_RESPONSE(REQUEST IN CLOB, 
MAX_WAIT_SECONDS IN NUMBER DEFAULT DEFAULT_MAX_WAIT_SECONDS)
Submit a job for processing at a later time (but "as soon as possible") and wait for response. This function will issue the functions request immediately (NOT on commit). Make sure the data the function relies on have already been committed.
Parameters:
REQUEST - JSON-formatted execution request
Returns:
JSON-formatted FunctionResponse if a response was provided before maxWaitSeconds.


iKnowBase