Create a Submission, Get Job ID
Use this API to create a submission before starting the job.
Name
CDR_PUB_EXE_SUBMISSION.CreateSubmission
Signature
FUNCTION CREATESUBMISSION( P_API_VERSION IN NUMBER, P_INIT_MSG_LIST IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_COMMIT IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_VALIDATION_LEVEL IN NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, PIO_OSUBMISSION IN OUT CDR_SUBMISSION_OBJ_TYPE, PIO_COSUBDETAILS IN OUT CDR_SUBMISSION_DETAILS_COLL, PI_JOBCONTEXTRC IN CDR_JOBS_V.JOB_CONTEXT_RC%TYPE, PI_EXECMODE IN VARCHAR2, PI_REFRESHTS IN CDR_JOBS_V.REFRESH_TS%TYPE ) RETURN CDR_JOBS_V.JOB_ID%TYPE;
Return
CDR_JOBS_V.JOB_ID%TYPE: The Job ID.
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
- PIO_OSUBMISSION (Mandatory) This parameter is of type
CDR_SUBMISSION_OBJ_TYPE.
Enter values for the following attributes: COMPANY_ID, EXECUTION_SETUP_OBJ_ID, EXECUTION_SETUP_OBJ_VER, WA_OBJ_ID, MASTER_PRREF_ID, MASTER_PRREF_VER, ACTIVE_FLAG_RC, SUBMISSION_TYPE_RC.
You can query MASTER_PRREF_ID and MASTER_PRREF_VER from CDR_PROGRAM_REFS_V with the Object ID and version of the object to be executed as the Prref Obj Id and Prref Obj ver.
- PIO_COSUBDETAILS (Mandatory) This parameter is part of a collection of
runtime parameters. It is of type CDR_SUBMISSION_DETAILS_COLL. Enter values for the
runtime parameters that you want to include in the job submission.
The required attributes are: COMPANY_ID, SUBMISSION_ID, PRREF_ID, PRREF_VER, PARAMETER_REF_OBJ_ID, PARAMETER_REF_OBJ_VER, PARAMETER_VALUE.
- PI_JOBCONTEXTRC (Mandatory) Enter the Job Context.
The possible values are the lookup_codes inside the lookup_type CDR_JOB_CONTEXTS: $JOBCONTEXT$BACKCHAIN, $JOBCONTEXT$COMPONENT, $JOBCONTEXT$SCHEDULED; $JOBCONTEXT$SUBMISSION.
- PI_EXECMODE (Mandatory) Enter a value for the execution mode. There are 3 possible values: SYNCHRONOUS (start the job and wait for completion), QUEUE (enqueue the job on the LSH queues), DIRECT (directly submit the job to OWB but would not wait).
- PI_REFRESHTS (Mandatory) Enter the Refresh timestamp you want to have associated with the job. It is normally 'sysdate,' but if you want to explicitly set a timestamp you can enter it here; for example, for a recovery job.
Parent topic: Create Submission Records