Generate an XML Payload
Use this API to generate the required XML payload for a job execution.
Name
CDR_PUB_EXE_EXTERNAL.GenerateXmlPayload
Signature
FUNCTION GENERATEXMLPAYLOAD( 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, PI_NJOBID IN NUMBER, PI_VJOBTYPE IN VARCHAR2, PI_NDOWNLOADCONFIGID IN NUMBER, PI_VPROGRAM IN VARCHAR2, PI_VWORKDIRECTORY IN VARCHAR2, PI_VRUNSCRIPT IN VARCHAR2, PI_VOUTPUTPATH IN VARCHAR2, PI_VPRIORITY IN VARCHAR2, PI_VSCHEMA IN VARCHAR2, PI_VUSERID IN VARCHAR2, PI_VSUBDIRECTORIES IN CDR_VC_LIST_COLL, PI_NSURROGATEJOBID IN CDR_JOBS_V.JOB_ID%TYPE := NULL, PI_VTECHTYPE IN VARCHAR2 := NULL, PI_NSURROGATEPRREFID IN CDR_JOBS_V.PRREF_ID%TYPE := NULL ) RETURN CLOB;
Return
Type CLOB Description Returns the generated XML as a CLOB.
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
- PI_NJOBID (Mandatory) Enter the Job_ID.
- PI_VJOBTYPE (Mandatory) Enter the Job Type—either tmp for an internal job or exe for a user-executed job
- PI_NDOWNLOADCONFIGID (Optional) If the entire job configuration is stored in
cdr_temp_blobs (against the Job_ID), you can enter the ID of the BLOB for the job.
Query CDR_TEMP_BLOBS_V to get the value. If you do not enter a BLOB ID, enter 0.
- PI_VPROGRAM (Mandatory) Enter the command to be executed on the server.
- PI_VWORKDIRECTORY (Mandatory) Enter the full path of the root folder in the DP server Home under which the job folder gets created.
- PI_VRUNSCRIPT (Mandatory) Enter the name of the main script to be executed for the job.
- PI_VOUTPUTPATH (Mandatory) Enter the path where the output will be generated, relative to the work directory/ folder.
- PI_VPRIORITY (Mandatory) Enter the job priority. The possible values are the lookup codes in the lookup type 'CDR_JOB_PRIORITIES'.
- PI_VSCHEMA (Mandatory) Enter the ID of the ZZ_Schema allocated for the current job. You can query CDR_JOBS_V to get this ID.
- PI_VUSERID (Mandatory) Enter the UserId that is executing the job. Use the API CDR_PUB_DEF_FACTORY_SUPPORT.GETUSERID to get this ID.
- PI_VSUBDIRECTORIES This is a collection of type CDR_VC_LIST_COLL. Enter the names of subdirectories that should be created under the Job directory in the DP Server.
- PI_NSURROGATEJOBID SurrogateJobId. (Optional) Enter the job ID under which the created outputs will be uploaded if it is different from the current job; for example, a master job.
- PI_VTECHTYPE (Mandatory) Enter the TechType name being used for the job.
- PI_NSURROGATEPRREFID SurrogatePrrefId(Optional) Enter the ID of the master job for this job, if any.
Parent topic: Create and Execute Output LOBs