on 09-10-2015 5:38 PM
We are trying to create a Java event that runs after a report is scheduled (or published).
I'm basing a few assumptions from articles, so I would like some feedback on the feasibility of the approach. I can create a Program File like discussed here:
I can create a custom Event based on a Program File, like discussed here:
I'm assuming that the program file will receive the DocID as a parameter, based on the example of IProgramBaseEx here:
(see thisPOInfoObject)
So, user creates a webi document of reports, schedules the document to run nightly, adds the custom event, and in the java code, we get access to the docID for processing. Is this possible?
This is BO 4.1 sp6.
Yes, you can create schedule events which can trigger other objects on success, failure. The object in your case would be your java program object(program file).
I did not get your last question though, can you please elaborate.
So, user creates a webi document of reports, schedules the document to run nightly, adds the custom event, and in the java code, we get access to the docID for processing. Is this possible?
Which docID you want, are you referring to the schedule report instance id?
The java program file can take any number of parameters as an argument. The arguments are passed from the Program file properties in CMC.
Thanks,
Prithvi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Prithvi,
Thank you for the response. I think I see how it is supposed to work.
I create a new event "ReportFinished," and that to the "Events to trigger on completion:" of the document schedule. Then I add the same event to my Program File object in the "Events to wait for:." That makes sense!
However, my question still remains regarding the DocID. In the program file, you have the following function:
public void run(IEnterpriseSession boSession, IInfoStore infoStore,
IInfoObject thisPOInfoObject, String thisPOInstanceID,
String[] args)
So, when the event fires, will it pass the ID of the document that triggered the event? Or possibly the Event ID, so I can trace back to the document?
Thanks again,
Darin
You don't have to provide a doc id in the run method. The method takes below parameters
void run(IEnterpriseSession enterpriseSession, IInfoStore infoStore, java.lang.String[] args) throws SDKException
This method gets called by the backend to run the Java program.
enterpriseSession
- A valid IEnterpriseSession
object. infoStore
- A valid IInfoStore
object. args
- A String[]
array specifying any relevant arguments that need have been set for this program to run. SDKException
- Throws an exception if the process is unsuccessful.The same can be found from the api reference guide available at
http://help.sap.com/businessobject/product_guides/sbo41/en/sbo41sp6_bipjava_apiRef_en.zip
Thanks,
Prithvi
I understand that I could add the docID to the arguments section of the Program File. However, I have hundreds of documents which run at different frequencies. We would like to run a process after each document executes which updates a database with the DocID that has completed. As far as I can tell, the only way to do this is to create a program file for each document, with the DocID specified? This isn't a scalable solution, as we have new reports every week. We would have much preferred being able to determine the lineage to the doc - program file instance (passed by thisPOInfoObject) -> program file -> event -> documentID. Is this possible?
Without some way to get back to the docID, the only thing I can think of is to use auditing, as I also have the sessionID, but I am not sure about the feasibility of this approach.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.