Search code examples
schedulingpeoplesoftsqr

Scheduling a Peoplesoft SQR Process from SQR


In our project, we have a situation where we need to schedule an SQR on a specific date at the end of processing of another SQR. We can't set a recurrence since the date of the next run will be calculated based on rules and is not constant. Can anyone please let me know if anyone has faced this situation or any guidance on accomplishing this task will be greatly helpful.

Many thanks in Advance.


Solution

  • I don't recall SQR having the ability to schedule a process request built in; PeopleBooks mentions that outside systems could use the component interface to schedule a request, however, I have not done that with SQR before so I'm not sure if/how that's feasible.

    I would take the approach of running a job instead of your original SQR. The new job would include your original SQR followed by an App Engine process that schedules the needed SQR process instance on the date you need.

    Without knowing more specific details about your process, here's a code snippet of what you could run within the AE:

    Local ProcessRequest &processRequest;
    
    /* Create the ProcessRequest Object */
    &processRequest = CreateProcessRequest();
    
    /* Set all the Required Properties */
    &processRequest.RunControlID = "YOUR_RUN_CNTL_ID";
    &processRequest.ProcessType = "SQR";
    &processRequest.ProcessName = "YOUR_SQR_PROCESS_NAME";
    
    /* Set any Optional Properties for this Process */
    &processRequest.RunLocation = "YOUR_PROC_SCHED_SERVER_NAME";
    /* You would set the run date time to your future date */
    &processRequest.RunDateTime = %Datetime;
    &processRequest.TimeZone = %ServerTimeZone;
    
    /* Schedule the Process */
    &processRequest.Schedule();