Actions in Agents - Part 1


Action link saving a report on a local drive upon successful completion of Agent

Build a very simple report and an agent on it. As we are going to test it right away, make sure that the report returns TRUE value so that Agent will succeed for sure.
Here I have created an agent.













Open a notepad and add the javascript code and save the file with .js extension
ex- AB.js









In the above code , our aim is to save the output of the report inside the folder OBIEE in C drive.

Now put javascript AB.js inside - 

C:\OBIEE\instances\instance1\bifoundation\OracleBISchedulerComponent\coreapplication_obisch1\scripts\common











Now open the Actions tab of Agent and select "Invoke Server Script"















Language : JavaScript

Script path

C:\OBIEE\instances\instance1\bifoundation\OracleBISchedulerComponent\coreapplication_obisch1\scripts\common\AB.js

Define Parameters:

1> First Row:
     Name : 0
     Prompt : Parameter(0):
     Value : Delivery Content

2> Second Row:
     Name : 1
     Prompt : Parameter(1):
     Value : SAMPLE.pdf

Note : SAMPLE.pdf is the delivery content or the report; we are saving it in pdf format.You can change the format if you want to.

Now save the Agent and execute it manually.









Now let us go and search SAMPLE.pdf inside C:\OBIEE folder.
This is delivery report in pdf format.








Hurray !!!

13 comments:

test said...

Ive tied this in 10g, Thanks for this Nachiket..

Anonymous said...

Hello it is working in Windows server only.Make it work in Linux server.Detail information should be given while having the blog articles

Nachiket said...

Valid point my friend;I have never got a chance to work on OBIEE+Linux platform.But i am sure if you post it on OTN - we will definitely have an answer for this from someone who has tried this approach in Linux setup.Thank you.

Anonymous said...

Thanks for the reply.I have posted it on OTN also but what they have confirmed is that it wont work in linux enviroment JScript engine is not support. I found that they have put for enhancement.SO for the particular task to do is there any other method to do ? If so please help with details of it

Nachiket said...

Ok thank you. Sure I will let you know as and when I have the details of it.I am not sure that can be done in Linux as i have no prior experience working on Linux setup so I can't comment :-)

Unknown said...

Hi,
Can you call this Agent from Dashboard? if so how ?
Regards
Sriram

Nachiket said...

Hi Sriram,
At the moment i do not have a precise solution to your question - I will definitely work on this idea and do some research and hopefully would come up with some solution. For now this link may give you some pointers.
http://oraclebizint.wordpress.com/2008/03/17/oracle-bi-ee-101332-executing-ibots-from-dashboardsanswers-sending-emails-to-administrators/

Thanks & Regards
Nachiket

Anonymous said...

Hi Nachiket,

I am getting following error in OBIEE 11.1.1.5 while implementing the same.
[nQSError: 66013] [Line:2 Column:1]
[nQSError: 66039] The job script has an invalid number of parameters. The error occurs when trying to access parameter number 1 when only 1 parameters are available

Can you share your mail id to discuss the same?

Chandresh said...

Hi,

To implement the same in LInux environment we need to use 'Invoke Java method' in Actions.
Following blog might be helpful.

http://www.rittmanmead.com/2010/09/oracle-bi-ee-11g-action-framework-java-ejbs-and-pdf-watermarks/

Regards,
Chandresh

Anonymous said...

Hi is there any post to implement this in linux

Anonymous said...

Hi Nachiket Mehendale ,

is there a way to implement this in linux,can you please share your thoughts on this..

Nachiket said...

Hello

I am sorry,have no idea about the code in Linux environment

Unknown said...

Hello..Thanx for posting this article .It really helped me.Sir but now i want to save the dashboard page according to the prompt values.I.e i have store names in my prompt and it should automatically do the selection of stores and be saved wih the respective data in the created folder of that store.I want to achieve this with one dashbaord page rather tahn creating multiple dashboard page.Pls help me