Save the file and přestartujte service BI Java Host. 2nd CUSTOM JAVA CLASS STORAGE report to a file to create a simple program for storing reports in a file I used DeliveryManager API that is part of Oracle BI Publisher and Scheduler API. The APIs are contained in three files *. jar to be to pack into its own *. jar file with the program.They are as follows: xdocore.jar, versioninfo.jar andschedulerrpccalls.jar . I created a file named okdeliver.jar . To use a custom class, place the file okdeliver.jar the BI server on the path that you set in the previous step as DefaultUserJarFilePath.Class itself is called cz.oksystem.mis.delivery.Deliver . The full name should be indicated at its use (see below). The source code of the class is given at the end of article. 3rd PRESENTATION SERVICES AND AUTHORIZATION TO WORK WITH DELIVERY After installing Oracle BI Presentation Services does not have no permission to work with iBoty and Delivery. It should be added. Log on as a user because of the Administrators group - such as the Web Interface Administrator of Presentation Services, and select Settings - Managing in the top right of the window. The window for administering Prezentation Services: You choose the first link-Administration - User groups and catalog presentation. Select Edit the Presentation Server Administrators group, then Add a new member - Show users and groups, and finally click on Add user SchedulerAdmin.button twice to confirm the operation completed. Continue by clicking the Manage permissions and roll to part with the privileges Delivers:Click on the link "not allowed" on each line in the Delivers and add permissions for the group Presentation Server Administrators.Confirm Finished button. Once you have granted privileges, as shown in the picture above, press the action button Finished in the top of the window and finally click Close window. IMPORTANT NOTE: If BI is set authentication against external sources, may not be the user who creates and iBoty starts simultaneously in the metadata repository. If this happens, it will not be starting iBotů (error: [nQSError: 10018] Access for the Requested connection is refused. [NQSError: 13024] Successful completion of init block 'AUTH_IB' is required).. In a test environment was based user iBoter only LDAP included in the Administrators group. Below this member to be once subscribe and unsubscribe to produce a record in the Presentation Services Catalog.Then log in as Administrator and add it to the Presentation Server Administrators group as described above. All other steps in creating and managing user iBotů perform as iBoter. User SchedulerAdmin, which is the superuser for the Oracle BI Scheduler must be included in the Presentation Server Administrators in any case! (Otherwise occur when implementing iBotu error: [nQSError: 77006] Oracle BI Presentation Server Error: Access denied).. 4th CREATING AND SETTING IBOTU ITS DELIVERY TO YOUR CLASS in the web interface, choose Services Presentation Products - Delivers. Next, click Create a new agent iBot. The following figure shows a window with tabs for creating and configuring iBotů: The first tab, you will modify (if required), Plan (configuration for the Scheduler). Here's the default one-time immediate execution iBota. Adjust plan as needed. Further Addresses tab, leave the marked "I" (must be at least one addressee iBota otherwise iBot not return any data). On the Content tab, select the delivery report to be performed iBotem (Select content ...) and then pop-up menu, select "Send content as" the appropriate format (eg, Attachment (PDF)). Tested as functional as PDF, CSV, XLS (Excel and Excel 2000). The Objectives tab uncheck all the checked box and select only the Oracle BI Server cache System Services section. The most important part of configuration iBotu done on the Advanced tab.Click the Add button at the first event and choose "custom Java program." In the name of the class fillcz.oksystem.mis.delivery.Deliver . In the Path box, type classesokdeliver.jar . Switch radibuton results to "Pass the Java content delivery" and add two other parameters. The first shows a file path, including its name, without end and the second indicates the extension (type) file. Terminal must match the selected format sent content (see content as the Send tab content delivery). In the picture below, note especially the double backslashes in the path mentioned:Deliver adds class to the file name still timestamp format _rrrr-MM-dd-hh-mm-ss and saves the file in the appropriate format to the specified path (directory path must exist ).cz.oksystem.mis.delivery.Deliver class source code package cz.oksystem.mis.delivery;com.siebel.analytics.scheduler.javahostrpccalls.SchedulerJavaExtension import, import com.siebel.analytics.scheduler.javahostrpccalls.SchedulerJobException; import com.siebel.analytics.scheduler.javahostrpccalls.SchedulerJobInfo; import java.io.FileInputStream; import java.sql.Timestamp; import java.util.Date; import java.util.StringTokenizer; import oracle.apps.xdo.delivery.DeliveryManager ;oracle.apps.xdo.delivery.DeliveryRequest import, import oracle.apps.xdo.delivery.local.LocalPropertyDefinitions; public class implements Deliver SchedulerJavaExtension { public Deliver () { } public void run (SchedulerJobInfo jobInfo) throws SchedulerJobException { try { String filename = "c: \ \ mis-import \ \ assembly";String of extension = "pdf" if (jobInfo.parameterCount ()> 0) { filename = jobInfo.parameter (0); of extension = jobInfo.parameter (1) ; } Date today = new Date ();Timestamp timestamp = new Timestamp (dnes.getTime ()); String stamp = timestamp.toString (); = replaceAllWords stamp (stamp, "", "-"); replaceAllWords stamp = ( ,":", "-"); stamp stamp razitko.substring = (0, razitko.length () -4); String path = filename + "_" + stamp + "." + Of extension; FileInputStream fileInputStr = new FileInputStream (jobInfo.getResultSetFile ()); DeliveryManager delMan DeliveryManager = new ();DeliveryRequest delReq = path); delReq.setDocument (fileInputStr) delReq.submit ();delReq.close (); } catch (Exception ex) { throw new SchedulerJobException (1, 1, ex.getMessage ()); } } public void cancel ( ) { } private String replaceAllWords (String original, String find, String replacement) { StringBuilder result = new StringBuilder (original.length ()); String delimiters = "$+-*/(),.: " StringTokenizer st = new StringTokenizer (original, delimiters, true); Returning String = null; while (st.hasMoreTokens ()) { String w = st.nextToken (); if (w.equals (find)) { result.append (replacement); } else { result.append (w); } } return of result.toString = (); return return; } }
As with BI Delivers BI Answers reports stored in files
This article describes how to customize with components Delivers BI can generate reports created in BI Answers directly to files on the filesystem. Operation condition is launching the Oracle BI Scheduler - please refer here . 1st SERVICES SET FOR JAVAHOST IBOTŮ SEND TO OWN JAVA CLASSES JavaHost service configuration file is on the way [OracleBI] \ web \ javahost \ config \ config.xml. This file must be set in an "Scheduler" value "Enabled" to "True" and add or uncomment tag "DefaultUserJarFilePath". The entire tag looks like this: It is necessary to increase the default values for PDF and InputStream (change or add anywhere in the config.xml):
Save the file and přestartujte service BI Java Host. 2nd CUSTOM JAVA CLASS STORAGE report to a file to create a simple program for storing reports in a file I used DeliveryManager API that is part of Oracle BI Publisher and Scheduler API. The APIs are contained in three files *. jar to be to pack into its own *. jar file with the program.They are as follows: xdocore.jar, versioninfo.jar andschedulerrpccalls.jar . I created a file named okdeliver.jar . To use a custom class, place the file okdeliver.jar the BI server on the path that you set in the previous step as DefaultUserJarFilePath.Class itself is called cz.oksystem.mis.delivery.Deliver . The full name should be indicated at its use (see below). The source code of the class is given at the end of article. 3rd PRESENTATION SERVICES AND AUTHORIZATION TO WORK WITH DELIVERY After installing Oracle BI Presentation Services does not have no permission to work with iBoty and Delivery. It should be added. Log on as a user because of the Administrators group - such as the Web Interface Administrator of Presentation Services, and select Settings - Managing in the top right of the window. The window for administering Prezentation Services: You choose the first link-Administration - User groups and catalog presentation. Select Edit the Presentation Server Administrators group, then Add a new member - Show users and groups, and finally click on Add user SchedulerAdmin.button twice to confirm the operation completed. Continue by clicking the Manage permissions and roll to part with the privileges Delivers:Click on the link "not allowed" on each line in the Delivers and add permissions for the group Presentation Server Administrators.Confirm Finished button. Once you have granted privileges, as shown in the picture above, press the action button Finished in the top of the window and finally click Close window. IMPORTANT NOTE: If BI is set authentication against external sources, may not be the user who creates and iBoty starts simultaneously in the metadata repository. If this happens, it will not be starting iBotů (error: [nQSError: 10018] Access for the Requested connection is refused. [NQSError: 13024] Successful completion of init block 'AUTH_IB' is required).. In a test environment was based user iBoter only LDAP included in the Administrators group. Below this member to be once subscribe and unsubscribe to produce a record in the Presentation Services Catalog.Then log in as Administrator and add it to the Presentation Server Administrators group as described above. All other steps in creating and managing user iBotů perform as iBoter. User SchedulerAdmin, which is the superuser for the Oracle BI Scheduler must be included in the Presentation Server Administrators in any case! (Otherwise occur when implementing iBotu error: [nQSError: 77006] Oracle BI Presentation Server Error: Access denied).. 4th CREATING AND SETTING IBOTU ITS DELIVERY TO YOUR CLASS in the web interface, choose Services Presentation Products - Delivers. Next, click Create a new agent iBot. The following figure shows a window with tabs for creating and configuring iBotů: The first tab, you will modify (if required), Plan (configuration for the Scheduler). Here's the default one-time immediate execution iBota. Adjust plan as needed. Further Addresses tab, leave the marked "I" (must be at least one addressee iBota otherwise iBot not return any data). On the Content tab, select the delivery report to be performed iBotem (Select content ...) and then pop-up menu, select "Send content as" the appropriate format (eg, Attachment (PDF)). Tested as functional as PDF, CSV, XLS (Excel and Excel 2000). The Objectives tab uncheck all the checked box and select only the Oracle BI Server cache System Services section. The most important part of configuration iBotu done on the Advanced tab.Click the Add button at the first event and choose "custom Java program." In the name of the class fillcz.oksystem.mis.delivery.Deliver . In the Path box, type classesokdeliver.jar . Switch radibuton results to "Pass the Java content delivery" and add two other parameters. The first shows a file path, including its name, without end and the second indicates the extension (type) file. Terminal must match the selected format sent content (see content as the Send tab content delivery). In the picture below, note especially the double backslashes in the path mentioned:Deliver adds class to the file name still timestamp format _rrrr-MM-dd-hh-mm-ss and saves the file in the appropriate format to the specified path (directory path must exist ).cz.oksystem.mis.delivery.Deliver class source code package cz.oksystem.mis.delivery;com.siebel.analytics.scheduler.javahostrpccalls.SchedulerJavaExtension import, import com.siebel.analytics.scheduler.javahostrpccalls.SchedulerJobException; import com.siebel.analytics.scheduler.javahostrpccalls.SchedulerJobInfo; import java.io.FileInputStream; import java.sql.Timestamp; import java.util.Date; import java.util.StringTokenizer; import oracle.apps.xdo.delivery.DeliveryManager ;oracle.apps.xdo.delivery.DeliveryRequest import, import oracle.apps.xdo.delivery.local.LocalPropertyDefinitions; public class implements Deliver SchedulerJavaExtension { public Deliver () { } public void run (SchedulerJobInfo jobInfo) throws SchedulerJobException { try { String filename = "c: \ \ mis-import \ \ assembly";String of extension = "pdf" if (jobInfo.parameterCount ()> 0) { filename = jobInfo.parameter (0); of extension = jobInfo.parameter (1) ; } Date today = new Date ();Timestamp timestamp = new Timestamp (dnes.getTime ()); String stamp = timestamp.toString (); = replaceAllWords stamp (stamp, "", "-"); replaceAllWords stamp = ( ,":", "-"); stamp stamp razitko.substring = (0, razitko.length () -4); String path = filename + "_" + stamp + "." + Of extension; FileInputStream fileInputStr = new FileInputStream (jobInfo.getResultSetFile ()); DeliveryManager delMan DeliveryManager = new ();DeliveryRequest delReq = path); delReq.setDocument (fileInputStr) delReq.submit ();delReq.close (); } catch (Exception ex) { throw new SchedulerJobException (1, 1, ex.getMessage ()); } } public void cancel ( ) { } private String replaceAllWords (String original, String find, String replacement) { StringBuilder result = new StringBuilder (original.length ()); String delimiters = "$+-*/(),.: " StringTokenizer st = new StringTokenizer (original, delimiters, true); Returning String = null; while (st.hasMoreTokens ()) { String w = st.nextToken (); if (w.equals (find)) { result.append (replacement); } else { result.append (w); } } return of result.toString = (); return return; } }
Save the file and přestartujte service BI Java Host. 2nd CUSTOM JAVA CLASS STORAGE report to a file to create a simple program for storing reports in a file I used DeliveryManager API that is part of Oracle BI Publisher and Scheduler API. The APIs are contained in three files *. jar to be to pack into its own *. jar file with the program.They are as follows: xdocore.jar, versioninfo.jar andschedulerrpccalls.jar . I created a file named okdeliver.jar . To use a custom class, place the file okdeliver.jar the BI server on the path that you set in the previous step as DefaultUserJarFilePath.Class itself is called cz.oksystem.mis.delivery.Deliver . The full name should be indicated at its use (see below). The source code of the class is given at the end of article. 3rd PRESENTATION SERVICES AND AUTHORIZATION TO WORK WITH DELIVERY After installing Oracle BI Presentation Services does not have no permission to work with iBoty and Delivery. It should be added. Log on as a user because of the Administrators group - such as the Web Interface Administrator of Presentation Services, and select Settings - Managing in the top right of the window. The window for administering Prezentation Services: You choose the first link-Administration - User groups and catalog presentation. Select Edit the Presentation Server Administrators group, then Add a new member - Show users and groups, and finally click on Add user SchedulerAdmin.button twice to confirm the operation completed. Continue by clicking the Manage permissions and roll to part with the privileges Delivers:Click on the link "not allowed" on each line in the Delivers and add permissions for the group Presentation Server Administrators.Confirm Finished button. Once you have granted privileges, as shown in the picture above, press the action button Finished in the top of the window and finally click Close window. IMPORTANT NOTE: If BI is set authentication against external sources, may not be the user who creates and iBoty starts simultaneously in the metadata repository. If this happens, it will not be starting iBotů (error: [nQSError: 10018] Access for the Requested connection is refused. [NQSError: 13024] Successful completion of init block 'AUTH_IB' is required).. In a test environment was based user iBoter only LDAP included in the Administrators group. Below this member to be once subscribe and unsubscribe to produce a record in the Presentation Services Catalog.Then log in as Administrator and add it to the Presentation Server Administrators group as described above. All other steps in creating and managing user iBotů perform as iBoter. User SchedulerAdmin, which is the superuser for the Oracle BI Scheduler must be included in the Presentation Server Administrators in any case! (Otherwise occur when implementing iBotu error: [nQSError: 77006] Oracle BI Presentation Server Error: Access denied).. 4th CREATING AND SETTING IBOTU ITS DELIVERY TO YOUR CLASS in the web interface, choose Services Presentation Products - Delivers. Next, click Create a new agent iBot. The following figure shows a window with tabs for creating and configuring iBotů: The first tab, you will modify (if required), Plan (configuration for the Scheduler). Here's the default one-time immediate execution iBota. Adjust plan as needed. Further Addresses tab, leave the marked "I" (must be at least one addressee iBota otherwise iBot not return any data). On the Content tab, select the delivery report to be performed iBotem (Select content ...) and then pop-up menu, select "Send content as" the appropriate format (eg, Attachment (PDF)). Tested as functional as PDF, CSV, XLS (Excel and Excel 2000). The Objectives tab uncheck all the checked box and select only the Oracle BI Server cache System Services section. The most important part of configuration iBotu done on the Advanced tab.Click the Add button at the first event and choose "custom Java program." In the name of the class fillcz.oksystem.mis.delivery.Deliver . In the Path box, type classesokdeliver.jar . Switch radibuton results to "Pass the Java content delivery" and add two other parameters. The first shows a file path, including its name, without end and the second indicates the extension (type) file. Terminal must match the selected format sent content (see content as the Send tab content delivery). In the picture below, note especially the double backslashes in the path mentioned:Deliver adds class to the file name still timestamp format _rrrr-MM-dd-hh-mm-ss and saves the file in the appropriate format to the specified path (directory path must exist ).cz.oksystem.mis.delivery.Deliver class source code package cz.oksystem.mis.delivery;com.siebel.analytics.scheduler.javahostrpccalls.SchedulerJavaExtension import, import com.siebel.analytics.scheduler.javahostrpccalls.SchedulerJobException; import com.siebel.analytics.scheduler.javahostrpccalls.SchedulerJobInfo; import java.io.FileInputStream; import java.sql.Timestamp; import java.util.Date; import java.util.StringTokenizer; import oracle.apps.xdo.delivery.DeliveryManager ;oracle.apps.xdo.delivery.DeliveryRequest import, import oracle.apps.xdo.delivery.local.LocalPropertyDefinitions; public class implements Deliver SchedulerJavaExtension { public Deliver () { } public void run (SchedulerJobInfo jobInfo) throws SchedulerJobException { try { String filename = "c: \ \ mis-import \ \ assembly";String of extension = "pdf" if (jobInfo.parameterCount ()> 0) { filename = jobInfo.parameter (0); of extension = jobInfo.parameter (1) ; } Date today = new Date ();Timestamp timestamp = new Timestamp (dnes.getTime ()); String stamp = timestamp.toString (); = replaceAllWords stamp (stamp, "", "-"); replaceAllWords stamp = ( ,":", "-"); stamp stamp razitko.substring = (0, razitko.length () -4); String path = filename + "_" + stamp + "." + Of extension; FileInputStream fileInputStr = new FileInputStream (jobInfo.getResultSetFile ()); DeliveryManager delMan DeliveryManager = new ();DeliveryRequest delReq = path); delReq.setDocument (fileInputStr) delReq.submit ();delReq.close (); } catch (Exception ex) { throw new SchedulerJobException (1, 1, ex.getMessage ()); } } public void cancel ( ) { } private String replaceAllWords (String original, String find, String replacement) { StringBuilder result = new StringBuilder (original.length ()); String delimiters = "$+-*/(),.: " StringTokenizer st = new StringTokenizer (original, delimiters, true); Returning String = null; while (st.hasMoreTokens ()) { String w = st.nextToken (); if (w.equals (find)) { result.append (replacement); } else { result.append (w); } } return of result.toString = (); return return; } }