Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     triggering report fex from a java pgm in a online java application

Read-Only Read-Only Topic
Go
Search
Notify
Tools
triggering report fex from a java pgm in a online java application
 Login/Join
 
Platinum Member
posted
we hava an online Java application. We want to call a report fex; say rpt.fex,
directly from a java pgm in the application. How would that java pgm formulate the http url, along with the parms required in the fex? And how do the report fex get the parms in the url?

If this report fex is configured to be launched from a BID view, then what would the url be?

An additional question: they want to pass the parms in a session variable instead of the url if the report fex is able to get to that session variable.
Is that possible? If so, how would the report fex get to that session variable?


wf 7.6.11
unix aix
active reports, HTML, Excel, Text and PDF formats
 
Posts: 102 | Registered: April 20, 2004Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by mike:
we hava an online Java application. We want to call a report fex; say rpt.fex,
directly from a java pgm in the application. How would that java pgm formulate the http url, along with the parms required in the fex? And how do the report fex get the parms in the url?

Standard form based submission stuff here. action is
http://server:port/ibi_apps/WFServlet
. Parms are all passed as standard key=value parings.

quote:
If this report fex is configured to be launched from a BID view, then what would the url be?

Depends! They are configured to be launched from BID ... are the reports built in MRE or as reporting server reports that are called in bid?

quote:
An additional question: they want to pass the parms in a session variable instead of the url if the report fex is able to get to that session variable.
Is that possible? If so, how would the report fex get to that session variable?

Yes, so long as the web focus web application is running on the same application server as your java application, AND the can share the same session object. Read the security manual for the specific syntax for retrieving the values. Search for CopySessionVarToWFVar.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Platinum Member
posted Hide Post
quote:


how would the report fex be indicated? and the parms? would it be like:
[URL=http://serverRazzerort/ibi_apps/WFServlet?fex=reportfex&parm1=val1&parm2=val2]


quote:
If this report fex is configured to be launched from a BID view, then what would the url be?

Depends! They are configured to be launched from BID ... are the reports built in MRE or as reporting server reports that are called in bid?


The report is build in MRE; but in BID, I have a view with a content block that launches this report. I was hoping that when this java pgm triggers the url for this report fex. It will open the view with that content block, which launches and runs the report fex. Otherwise, I will have to live with a different look and feel from the rest of the reports.


wf 7.6.11
unix aix
active reports, HTML, Excel, Text and PDF formats
 
Posts: 102 | Registered: April 20, 2004Report This Post
Virtuoso
posted Hide Post
For non-MRE reports:
http://server:port/ibi_apps/WFServlet?IBIF_ex=reportfex&parm1=val1&parm2=val2
etc.

However, for MRE report you have to account for the domain and folders. You will also have to perform a login action to ensure that the appropriate cookies are generated so that you can directly call the MRE reports in question.

You will not be able to use the content block .... well, not very easily anyway.

My advise would be to have you java application call a valid logon action to generate the required mre cookies. You could do this a via an ajax call, or as the source of a hidden iframe. That way when you call the mre fex, all the required credentials for requesting that mre resource will be in order.

Logon with:
http://localhost:8080/ibi_apps/WFServlet?IBIMR_action=MR_SIGNON&IBIWF_language=en&IBIMR_user=mreuserid&IBIMR_pass=password&SIGNON_CORRECT=/approot/dummy.htm&SIGNON_CORRECT_ADMIN=/approot/dummy.htm&SIGNON_CRT_DOM_ADMIN=/approot/dummy.htm


Make a dummy html page called dummy.htm in the ibi/apps directory. This will be returned if the logon was successful. Once that is done, then the appropriate cookies etc. will be created and you can then call the report without worry.

The url for calling an MRE report (sample):
http://localhost:8080/ibi_apps/WFServlet?IBIMR_action=MR_RUN_FEX&IBIMR_sub_action=MR_STD_REPORT&IBIMR_fex=app%2fshowparm%2efex&IBIMR_folder=%23miscqrpki8wi&IBIMR_domain=untitled%2funtitled%2ehtm&IBIMR_Random=7%2b%2d3841647531770751449&parm1=val1&parm2=val2


Where:
IBIMR_action=MR_RUN_FEX (required)
IBIMR_sub_action=MR_STD_REPORT (required: tells WF this is a standard report in mre)
IBIMR_fex=app/actual_fex_name.fex (the properly encoded name of the report fex)
IBIMR_folder=??? (the name of the MRE folder the fex is located in)
IBIMR_domain=??? (the directory and name of the htm file with the domain info in it)

Hope this helps


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Platinum Member
posted Hide Post
thank you. I think that helps a lot. There is still one question remaining: once the report fex is triggered, how does the report access the url info for the passsed parms and values?


wf 7.6.11
unix aix
active reports, HTML, Excel, Text and PDF formats
 
Posts: 102 | Registered: April 20, 2004Report This Post
Virtuoso
posted Hide Post
That's all part of the url - you make the servlet call (first part of the URL) with the fexname and then any matched pairs (&parm1=val1) are passed into the fex where &parm1 also exists in the fex code (must match exactly, including case, I believe)


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Platinum Member
posted Hide Post
I was searching for the CopySessionVarToWFVar reference and found only this. I was somewhat confused and hope you guys can clarify for me:

quote:
When the following code is added to the \ibi\client71\wfc\etc\site.wfs file, the value of IBIC_user is copied from an HTTP session to a WFS variable.

wfvar=IBIC_user
httpsession=_ibuser
CopySessionVarToWFVar(httpsession,wfvar)


am I correct to assume that _ibuser is a session cookie name? and IBIC_user is a parm within the cookie?
am I correct that the wfvar and httpsession variables are available to the report fex hence?

what happens if the value in the parm is in the format of an array?


wf 7.6.11
unix aix
active reports, HTML, Excel, Text and PDF formats
 
Posts: 102 | Registered: April 20, 2004Report This Post
Virtuoso
posted Hide Post
quote:
am I correct to assume that _ibuser is a session cookie name? and IBIC_user is a parm within the cookie?

Nope! _ibuser is the session attribute name, and serves only as an example.
quote:
am I correct that the wfvar and httpsession variables are available to the report fex hence?

Based on this example, the available variable name would be IBIC_user. You would still have to force that variable to be made available to the report fex with the following after the copysessionvartowfvar
<set> IBIC_user(pass)

quote:
what happens if the value in the parm is in the format of an array?

The above example would not work for you. What you would have to do is create your own java code to consume the session attributes and then make them available to webfocus. You - or someone in your shop - should read the WebFOCUS security documentation regarding "Developing a WebFOCUS Servlet Plug-in Activated by the WRFEXT Setting". If you follow that doc, you can develop a Java class and make it available to call your own custom method to retrieve the appropriate session attributes - in any format - and make them available to the report fex. I've built a bunch of those things, and any one for just retrieving basic session attributes can be completed for testing in about a hour.

Hope the above is clear.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Platinum Member
posted Hide Post
thank you. I now got the overall picture. However, I got one final question on the sample given in the "WebFOCUS Servlet Plug-in Activated by the WRFEXT Setting": the signature of the sample java was:
public long getKeyValue(String[] NewVars, HttpServletRequest req, String keyName, String returnValueName, String filename)

But the call in wfc script was:
getKeyValue(IBIMR_user, TRESULT, TPATH)

the signatures do not match? My java could be rusty. If you are not familiar of the sample I was referring to, that is ok. You have been a great help. Thanks again.


wf 7.6.11
unix aix
active reports, HTML, Excel, Text and PDF formats
 
Posts: 102 | Registered: April 20, 2004Report This Post
Virtuoso
posted Hide Post
That's just the way it is. The WF Action that invokes your method will change the call it to include the String[] and HttpServletRequest objects. Just follow the way it is documented and you shouldn't have any problems.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Virtuoso
posted Hide Post
Ah.....If everything would just work that way Smiler


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Platinum Member
posted Hide Post
I am told to take a step back and post this question:
is this the best way to execute a given report from a java servlet? or is there a better way to do so?
thanks.


wf 7.6.11
unix aix
active reports, HTML, Excel, Text and PDF formats
 
Posts: 102 | Registered: April 20, 2004Report This Post
Virtuoso
posted Hide Post
Nope. Well ... not in my opinion anyway.

Use the common sense approach here. If the user is actually requesting the report, and your servlet doesn't have to do anything to the request (sending or receiving), then use an HTML FORM. If your servlet has to consume the report on behalf of the user before the request can be sent back to the user, then use either the WebFOCUS Java API (that way you can incorporate the entire call within your web app) or, have your servlet consume a WebFOCUS web service to get the report document.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Platinum Member
posted Hide Post
we can't use the wfc web services because we do not have the web services adapter.

The java servlet is in a different app and it is to collect parameters from the user (after some local app processing) and forward those parameters to the wfc report fex. We want to find out the best way to forward these parameters to the wfc report fex. We can't string it on the url because it can be extremely long.


wf 7.6.11
unix aix
active reports, HTML, Excel, Text and PDF formats
 
Posts: 102 | Registered: April 20, 2004Report This Post
Virtuoso
posted Hide Post
If there are too many bytes to be passed in a URL, I would expect problems with trying to run the fex anyway. We use this method with some pretty significant parameter strings and it has worked out great for us. I give the java programmers the string to execute the report, telling them which parameters to formulate values for and they plug it into an object in the app. Kind of isolates the WF piece from the java piece. no consuming services, etc. - just expects back a response of type x (excel, pdf, etc.)


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
I cannot find any documentation regarding SIGNON_CORRECT_ADMIN and SIGNON_CRT_DOM_ADMIN.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Francis ... look harder! First one I found

The next time we go for a pint, why don't we just take the afternoon off? I'm on a bit of a short leash these days. I have less time, but I'm just as thirsty.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Expert
posted Hide Post
dhagen,

Searching from

http://documentation.informationbuilders.com/topics_fp.asp

produced no results. It seems these two parameters are not documented in the online documentation.

Searching Technical Support does indeed provide a few documents, so, thank you much for pointing me there.

By the way, who's holding the leash?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
quote:
By the way, who's holding the leash?


Actually, Me! The wife is on a gig that will take her until the end of the year ... and you know her hours when she's working. I just have to get home at normal times to let the boy out.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Expert
posted Hide Post
Just thought it might be the DOG that has you on the leash!


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
<Jim Thorstad - WF Product Mgt.>
posted
We are adding two new settings in WebFOCUS 7.6.4, MR_ANONYMOUS_RUN_ACCESS=YES|NO and MR_AUTOSIGNON=YES|NO.

By default, the first will be set to YES to preserve old behavior that allows launch pages outside of MR that have IBIMR_drill=RUNNID on them to run MR reports even though the user is not logged onto MR. This was a "feature" we created 10 years ago for some customers.

If you set the first one to NO, users that run those launch pages will now get the "Error -- Please log on to MR" message... *unless* ... you also set MR_AUTOSIGNON to YES. In this case, the user will get the MR logon page and after logging on their report will be run for them. They will have a regular MR session at that point so the next report link they run it will just run for them.

We are doing this so that customers who have a third-party app can issue a HTTP 302 redirect to their users which calls an MR report. Then we will handle the signon prompting and you will have less to figure out. In scenarios where mr is configured trusted (like behind SiteMinder or with Kerberos) the user won't see the logon happen.

Generally speaking you should use this approach. Customers who try to have their application make an HTTP request directly to WebFOCUS and then return the report to the user run into many problems, such as MIME typing, cookie domain problems, and binary/ascii translation issues. Send the user an HTTP 302 redirect from your app and make it easier if you can.
 
Report This Post
Virtuoso
posted Hide Post
Jim,

I just want to see if I understand what you are saying here. You are recommending using a HTTP 302 redirect if the target user is not consuming the WebFOCUS resource directly? This allows the initial URL to be part of the existing application, and the redirect will then point the user's browser to the correct URL.

If I am on track here, what is the advantage to this over consuming the WF resource directly? If I am not correct, please help me understand where I am going wrong.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     triggering report fex from a java pgm in a online java application

Copyright © 1996-2020 Information Builders