I used both
But none of them worked as expected. MODE=OVERWRITE assigned a new ID each time we import a report and MODE=PRESERVEID doesn't work for reports, only data objects.
Any idea if is there a path to preserve id in reports when exporting/importing?
1. In ORABAM Schema, all the Report details are stored in Tables like SysIterReport, SysIterDataset, SysIterParameter, SysIterParameterValue.
2. Most important Table is SysIterReport. It has "SysIterName" which is Report full name with full path like "/public/Report/MyXyzApp/MyXyzReport1" and "SysIterID". This SysIterID is the Report ID.
3. So simple Query above table to get all the SysIterIDs for the matching SysIterName. From returned rows, simple extract last part of the name which is like unique Report name. Now you have a mapping of Report Name versus the Report Id from that OraBAM Schema in that Environment like Qc, UAT or production.
Select SysIterID, SysIterName from SysIterReport where SysIterName like '%MyXyzApp%'.
4. I would recommend to create like separate folders for separate bpm projects deployed on same domain. And put that application specific data objects and reports in that folder itself.
From Java side very simple. On BPM Domain with Oracle BAM configuration, you already have a DataSource that connects to ORABAM Schema by name "BAMDataSource-jdbc.xml" under config/jdbc folder. This XML File has all orabam schema details and also JNDI Name like "jdbc/oracle/bam/adc". Write a simple Java Program. Do JNDI lookup using this datasource name. And from that get connection object. Run above query and get rows back. Build a simple WebPage, and build a dynamic URL as shown below. BamServer host and BamServer Port can be put in a properties file to make it more dynamic. And each environment will have .properties file with those details. Or simple put the below URL as it is which is different for each environment.
In the Java code, simple get above url and append the ReportId. And on UI for each URL, show the Report Name. Simple speaking, once you get Rows from SysIterReport table, on java side create a HashMap with ReportName and ReportLink (generated as shown above). And on UI, loop through this Map and show name and link.
One final thing. If the Java code is deployed to SOA_Server, make sure that the BAMDatasource is deployed to SOA Server also. By default BAMDataSource is targetted only to BAM Server. But java code or ui code is on Soa server. So simple target bam data source to soa source also from Weblogic Console.
This will WORK and I have already done this. Users will see more user friendly Links on my Task Details page. And clicking on them takes them to the BAM Reports.