0

I am attempting to use xmlpserver/services/v2/ScheduleService of the Oracle BI Publisher to schedule a recurring job. Unfortunately, with no examples and no luck with try and error method, I can't schedule a report in a recurring manner, I manage, however, to execute it once. I want to understand what tu put in recurrenceExpression, recurrenceExpressionType, repeatCount, repeatInterval, startDate to make it work. I am looking for a daily execution at n o'clock. Here is the XML :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://xmlns.oracle.com/oxp/service/v2">
   <soapenv:Header/>
   <soapenv:Body>
      <v2:scheduleReport>
         <v2:scheduleRequest>
            <v2:deliveryChannels>
               <v2:ftpOptions>
                  <v2:item>
                     <v2:ftpServerName>?</v2:ftpServerName>
                     <v2:remoteFile>?</v2:remoteFile>
                     <v2:sftpOption>?</v2:sftpOption>
                  </v2:item>
               </v2:ftpOptions>
            </v2:deliveryChannels>
            <v2:jobLocale>en_US</v2:jobLocale>
            <v2:jobTZ>Etc/UTC</v2:jobTZ>
            <v2:mergeOutputOption>false</v2:mergeOutputOption>
            <v2:notificationTo>?</v2:notificationTo>
            <v2:notifyWhenFailed>true</v2:notifyWhenFailed>
            <v2:notifyWhenSkipped>true</v2:notifyWhenSkipped>
            <v2:notifyWhenWarning>true</v2:notifyWhenWarning>
            <v2:recurrenceExpression>?</v2:recurrenceExpression>
            <v2:recurrenceExpressionType>cron</v2:recurrenceExpressionType>
            <v2:repeatCount>1</v2:repeatCount>
            <v2:repeatInterval>86400</v2:repeatInterval>
            <v2:reportRequest>
            <v2:attributeCalendar>Gregorian</v2:attributeCalendar>
            <v2:attributeFormat>Text</v2:attributeFormat>
            <v2:attributeLocale>fr</v2:attributeLocale>
            <v2:reportAbsolutePath>?</v2:reportAbsolutePath>
            <v2:sizeOfDataChunkDownload>-1</v2:sizeOfDataChunkDownload>
            </v2:reportRequest>
            <v2:saveDataOption>true</v2:saveDataOption>
            <v2:saveOutputOption>true</v2:saveOutputOption>
            <!--Optional:-->
            <v2:startDate>2022-09-23T19:07:00Z</v2:startDate>
            <v2:userJobName>test_REPORT</v2:userJobName>
         </v2:scheduleRequest>
         <v2:userID>?</v2:userID>
         <v2:password>?</v2:password>
      </v2:scheduleReport>
   </soapenv:Body>
</soapenv:Envelope>

Many fields in the example are blank to protect sensitive data. Here is the link to the documentation: https://docs.oracle.com/cd/E28280_01/bi.1111/e22259/scheduleservice.htm#BIPDV323

1 Answers1

0

About reccurence and cron expressions see this page: https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm
or this one: https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html
All I can offer is a working sample soap message (BI Publisher 12.2.1.4.0) scheduling the report on some start date with two parameters. BIP is quite sensitive to the start date format. Repeat count is an integer as well as repeat interval (seconds) and there is no questions there.

<?xml version="1.0" encoding="utf-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soap-env:Body>
        <ns0:scheduleReport xmlns:ns0="http://xmlns.oracle.com/oxp/service/v2">
            <ns0:scheduleRequest>
                <ns0:dataModelUrl>http://full_url_to_datamodel/YourDataModelName.xdm</ns0:dataModelUrl>
                <ns0:jobLocale>hr-Hr</ns0:jobLocale>
                <ns0:repeatCount>1</ns0:repeatCount>
                <ns0:reportRequest>
                    <ns0:attributeCalendar>Gregorian</ns0:attributeCalendar>
                    <ns0:attributeFormat>pdf</ns0:attributeFormat>
                    <ns0:attributeLocale>hr-Hr</ns0:attributeLocale>
                    <ns0:attributeTemplate>YourTemplateName.rtf</ns0:attributeTemplate>
                    <ns0:parameterNameValues>
                        <ns0:listOfParamNameValues>
                            <ns0:item>
                                <ns0:name>PARAM_1_NAME</ns0:name>
                                <ns0:values>
                                    <ns0:item>PARAM_1_VALUE</ns0:item>
                                </ns0:values>
                            </ns0:item>
                            <ns0:item>
                                <ns0:name>PARAM_2_NAME</ns0:name>
                                <ns0:values>
                                    <ns0:item>PARAM_2_VALUE</ns0:item>
                                </ns0:values>
                            </ns0:item>
                        </ns0:listOfParamNameValues>
                    </ns0:parameterNameValues>
                    <ns0:reportAbsolutePath>/~user/FolderPath/ToYour/Report/YourReportName.xdo</ns0:reportAbsolutePath>
                </ns0:reportRequest>
                <ns0:scheduleBurstingOption>True</ns0:scheduleBurstingOption>
                <ns0:startDate>2020-10-08T09:00:00+02:00</ns0:startDate>
                <ns0:userJobName>YOUR_JOB_NAME_2020-09_1</ns0:userJobName>
            </ns0:scheduleRequest>
            <ns0:userID>your_username</ns0:userID>
            <ns0:password>your_password</ns0:password>
        </ns0:scheduleReport>
    </soap-env:Body>
</soap-env:Envelope>

It took me some time to collect it all from the docs. Almost all of the types declared in wsdl are complex so I had to crawl through the docs to make it work. First thing that helped was extracting methods and types from the wsdl file of Schedule Service.
Here are the methods and types extracted from the wsdl.

/*
Service ( ScheduleService ) tns="http://xmlns.oracle.com/oxp/service/v2"
   Prefixes (1)
      ns0 = "http://xmlns.oracle.com/oxp/service/v2"
   Ports (1):
      (ScheduleService)
         Methods (41):
            cancelSchedule(xs:string jobInstanceID, xs:string userID, xs:string password, )
            cancelScheduleInSession(xs:string jobInstanceID, xs:string bipSessionToken, )
            deleteJobHistory(xs:string instanceJobID, xs:string userID, xs:string password, )
            deleteJobHistoryInSession(xs:string instanceJobID, xs:string bipSessionToken, )
            deleteSchedule(xs:string jobInstanceID, xs:string userID, xs:string password, )
            deleteScheduleInSession(xs:string jobInstanceID, xs:string bipSessionToken, )
            deliveryService(DeliveryRequest deliveryRequest, xs:string userID, xs:string password, )
            deliveryServiceInSession(DeliveryRequest deliveryRequest, xs:string bipSessionToken, )
            downloadDocumentData(xs:string jobOutputID, xs:string userID, xs:string password, )
            downloadDocumentDataInSession(xs:string jobOutputID, xs:string bipSessionToken, )
            downloadXMLData(xs:string jobInstanceID, xs:string userID, xs:string password, )
            downloadXMLDataInSession(xs:string jobInstanceID, xs:string bipSessionToken, )
            getAllJobInstanceIDs(xs:string submittedJobId, xs:string userID, xs:string password, )
            getAllScheduledReport(JobFilterProperties filter, xs:int beginIdx, xs:string userID, xs:string password, )
            getAllScheduledReportHistory(JobFilterProperties filter, xs:int beginIdx, xs:string userID, xs:string password, )
            getAllScheduledReportHistoryInSession(JobFilterProperties filter, xs:int beginIdx, xs:string bipSessionToken, )
            getAllScheduledReportInSession(JobFilterProperties filter, xs:int beginIdx, xs:string bipSessionToken, )
            getDeliveryServiceDefinition(xs:string userID, xs:string password, )
            getDeliveryServiceDefinitionInSession(xs:string bipSessionToken, )
            getDocumentData(xs:string jobOutputID, xs:string userID, xs:string password, )
            getDocumentDataInSession(xs:string jobOutputID, xs:string bipSessionToken, )
            getScheduledJobInfo(xs:string jobInstanceID, xs:string userID, xs:string password, )
            getScheduledJobInfoInSession(xs:string jobInstanceID, xs:string bipSessionToken, )
            getScheduledReportDeliveryInfo(xs:string jobOutputID, xs:string userID, xs:string password, )
            getScheduledReportDeliveryInfoInSession(xs:string jobOutputID, xs:string bipSessionToken, )
            getScheduledReportOutputInfo(xs:string jobInstanceID, xs:string userID, xs:string password, )
            getScheduledReportOutputInfoInSession(xs:string jobInstanceID, xs:string bipSessionToken, )
            getScheduledReportStatus(xs:string scheduledJobID, xs:string userID, xs:string password, )
            getScheduledReportStatusInSession(xs:string scheduledJobID, xs:string bipSessionToken, )
            getXMLData(xs:string jobInstanceID, xs:string userID, xs:string password, )
            getXMLDataInSession(xs:string jobInstanceID, xs:string bipSessionToken, )
            purgeJobHistory(xs:string instanceJobID, xs:string userID, xs:string password, )
            purgeJobHistoryInSession(xs:string instanceJobID, xs:string bipSessionToken, )
            resendScheduledReport(xs:string outputJobID, xs:string userID, xs:string password, )
            resendScheduledReportInSession(xs:string outputJobID, xs:string bipSessionToken, )
            resumeSchedule(xs:string jobInstanceID, xs:string userID, xs:string password, )
            resumeScheduleInSession(xs:string jobInstanceID, xs:string bipSessionToken, )
            scheduleReport(ScheduleRequest scheduleRequest, xs:string userID, xs:string password, )
            scheduleReportInSession(ScheduleRequest scheduleRequest, xs:string bipSessionToken, )
            suspendSchedule(xs:string jobInstanceID, xs:string userID, xs:string password, )
            suspendScheduleInSession(xs:string jobInstanceID, xs:string bipSessionToken, )
         Types (44):
            AccessDeniedException
            ArrayOfEMailDeliveryOption
            ArrayOfFTPDeliveryOption
            ArrayOfFaxDeliveryOption
            ArrayOfJobInfo
            ArrayOfJobOutput
            ArrayOfJobOutputDelivery
            ArrayOfLocalDeliveryOption
            ArrayOfMetaData
            ArrayOfParamNameValue
            ArrayOfPrintDeliveryOption
            ArrayOfString
            ArrayOfWCCDeliveryOption
            ArrayOfWebDAVDeliveryOption
            BIPDataSource
            DeliveryChannels
            DeliveryRequest
            DeliveryServiceDefinition
            EMailDeliveryOption
            FTPDeliveryOption
            FaxDeliveryOption
            FileDataSource
            InvalidParametersException
            JDBCDataSource
            JobDetail
            JobFilterProperties
            JobInfo
            JobInfosList
            JobOutput
            JobOutputDelivery
            JobOutputDeliverysList
            JobOutputsList
            JobStatus
            LocalDeliveryOption
            MetaData
            MetaDataList
            OperationFailedException
            ParamNameValue
            ParamNameValues
            PrintDeliveryOption
            ReportRequest
            ScheduleRequest
            WCCDeliveryOption
            WebDAVDeliveryOption
*/

d r
  • 3,848
  • 2
  • 4
  • 15