通过 Web 服务和重复间隔进行 BIP 调度
BIP Scheduling through Web services and Repeat Interval
我正在尝试通过 Web 服务在 BI Publisher 中安排报告。我希望我的报告每月自动安排一次。
我正在使用重复间隔来传递我的频率。但问题是它接受以毫秒为单位的值。所以对于月子来说,这么大的值我是传不过去的。还有其他办法解决吗?
有人可以提前帮我解决it.Thanks。我在下面附上了我的代码。
package BIP;
import BIPschedule.ArrayOfEMailDeliveryOption;
import BIPschedule.DeliveryChannels;
import BIPschedule.EMailDeliveryOption;
import BIPschedule.ReportRequest;
import BIPschedule.ScheduleRequest;
public class ScheduleServiceClient
{
public static void main(String [] args) throws Exception
{
try
{
ScheduleService_Service scheduleService_Service = new ScheduleService_Service();
ScheduleService scheduleService = scheduleService_Service.getScheduleService();
// Testing runReport
System.out.println("Testing runReport Service");
ReportRequest req = new ReportRequest();
req.setAttributeCalendar("Gregorian");
req.setAttributeTimezone("GMT+5:30");
req.setAttributeFormat("pdf"); //type of the report
req.setAttributeLocale("en-US"); //Language
req.setAttributeTemplate("Simple"); //Template type
req.setReportAbsolutePath("/~weblogic/Customer Details.xdo"); //Absolute path of the report from BIP Catalog.
req.setSizeOfDataChunkDownload(-1); //to download all
ScheduleRequest sreq = new ScheduleRequest();
sreq.setReportRequest(req); //Set ReportRequest
sreq.setSaveDataOption(true);
sreq.setDataModelUrl("/~weblogic/Customer_details.xdm");
sreq.setBookBindingOutputOption(false);
sreq.setJobTZ("GMT+5:30");
sreq.setStartDate("2017-12-18T14:01:00");
sreq.setEndDate("2017-12-18T14:30:01");
sreq.setSaveOutputOption(true);
sreq.setMergeOutputOption(true);
sreq.setNotifyWhenFailed(false);
sreq.setNotifyWhenSuccess(false);
sreq.setNotifyWhenWarning(false);
sreq.setRepeatCount(5);
sreq.setUseUTF8Option(true);
sreq.setScheduleBurstringOption(false);
sreq.setSchedulePublicOption(true);
sreq.setUserJobName("Month");
sreq.setRepeatInterval("3600000");
String job_id = scheduleService.scheduleReport(sreq,"weblogic","weblogic123");
System.out.println("job_id:"+ job_id);
}catch (Exception ex){
ex.printStackTrace();
}
}
}
循环表达式是用cron表达式写的。如果您有支持标识符,Oracle 会提供带有示例的支持文档。 Oracle 支持文档 1537293.1(如何使用 BI Publisher Web 服务 ScheduleService WSDL 安排重复作业)
另请参阅:https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm
我正在尝试通过 Web 服务在 BI Publisher 中安排报告。我希望我的报告每月自动安排一次。 我正在使用重复间隔来传递我的频率。但问题是它接受以毫秒为单位的值。所以对于月子来说,这么大的值我是传不过去的。还有其他办法解决吗?
有人可以提前帮我解决it.Thanks。我在下面附上了我的代码。
package BIP;
import BIPschedule.ArrayOfEMailDeliveryOption;
import BIPschedule.DeliveryChannels;
import BIPschedule.EMailDeliveryOption;
import BIPschedule.ReportRequest;
import BIPschedule.ScheduleRequest;
public class ScheduleServiceClient
{
public static void main(String [] args) throws Exception
{
try
{
ScheduleService_Service scheduleService_Service = new ScheduleService_Service();
ScheduleService scheduleService = scheduleService_Service.getScheduleService();
// Testing runReport
System.out.println("Testing runReport Service");
ReportRequest req = new ReportRequest();
req.setAttributeCalendar("Gregorian");
req.setAttributeTimezone("GMT+5:30");
req.setAttributeFormat("pdf"); //type of the report
req.setAttributeLocale("en-US"); //Language
req.setAttributeTemplate("Simple"); //Template type
req.setReportAbsolutePath("/~weblogic/Customer Details.xdo"); //Absolute path of the report from BIP Catalog.
req.setSizeOfDataChunkDownload(-1); //to download all
ScheduleRequest sreq = new ScheduleRequest();
sreq.setReportRequest(req); //Set ReportRequest
sreq.setSaveDataOption(true);
sreq.setDataModelUrl("/~weblogic/Customer_details.xdm");
sreq.setBookBindingOutputOption(false);
sreq.setJobTZ("GMT+5:30");
sreq.setStartDate("2017-12-18T14:01:00");
sreq.setEndDate("2017-12-18T14:30:01");
sreq.setSaveOutputOption(true);
sreq.setMergeOutputOption(true);
sreq.setNotifyWhenFailed(false);
sreq.setNotifyWhenSuccess(false);
sreq.setNotifyWhenWarning(false);
sreq.setRepeatCount(5);
sreq.setUseUTF8Option(true);
sreq.setScheduleBurstringOption(false);
sreq.setSchedulePublicOption(true);
sreq.setUserJobName("Month");
sreq.setRepeatInterval("3600000");
String job_id = scheduleService.scheduleReport(sreq,"weblogic","weblogic123");
System.out.println("job_id:"+ job_id);
}catch (Exception ex){
ex.printStackTrace();
}
}
}
循环表达式是用cron表达式写的。如果您有支持标识符,Oracle 会提供带有示例的支持文档。 Oracle 支持文档 1537293.1(如何使用 BI Publisher Web 服务 ScheduleService WSDL 安排重复作业)
另请参阅:https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm