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     [WORKAROUND] -INCLUDE of an MRE Fex from an MRE Fex Fails

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[WORKAROUND] -INCLUDE of an MRE Fex from an MRE Fex Fails
 Login/Join
 
Gold member
posted
I am trying to create a generic launch FEX for all my reports so that they can pick a report from a dropdown list and the fex runs it.

And we want to keep the code in MRE because it is in a secured DOMAIN. So I used the -INCLUDE which works great when if the INCLUDED Fex is on the server. But when it is MRE, executed I receive:

(FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND: app/rpt900ds_Sec_Roles



 -SET &ECHO=ALL;
-DEFAULTH &P_REPORT_FEX = 'rpt900ds_sec_roles.fex';
-SET &REPORT_INCLUDE = '-INCLUDE app/' | &P_REPORT_FEX;
-TYPE &REPORT_INCLUDE
&REPORT_INCLUDE.EVAL
 


I have read dozens of posts on this topic and still cannot get this to work.

Here is what I have tried so far:

I have added and removed MRNOEDIT. I have added and removed "app/". I have added mydomain/app. I have added and removed ".fex". I have moved the include to "other".

Nothing works. Please help!

This message has been edited. Last edited by: knegrotto,


WebFOCUS 769
Windows
all
 
Posts: 53 | Registered: April 29, 2009Report This Post
Virtuoso
posted Hide Post
So does this generic launch fex also exist within MRE or is it just a server procedure accessed from an HTML page externally from somewhere? If it's the latter, there are several parameters that need to be passed, telling WF that the procedure exists within the MRE structure and allowing it to be run outside of MRE. That being said, I do not think that your approach will work. You can't just -INCLUDE code from any old MRE domain from server procedure and expect WF to find it somewhere in MRE. The -INCLUDE only works if the calling fex and the -INCLUDED fes exists in the same domain, OR you specify the domain using the app/ AND the MRE user ALSO has access to that domain.

Try publishing a procedure that exists within MRE and then look at the generated HTML. This will show you all of the information that is necessary to get this to work. You'll also need to add IBIMR_drill=RUNNID to access the procedure from outside of MRE.


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
Gold member
posted Hide Post
Yes. As I stated in the subject title I am trying to access an MRE Fex from another MRE Fex.

And they are in the same domain which should work.

I already tried specifying the DOMAIN/app along with many other variations. I have read many posts on the subject and tried all the suggestions.

I did get it to work by moving the target code outside of MRE. But that was discouraged because the code needs to be secured in the MRE DOMAIN.

This message has been edited. Last edited by: knegrotto,


WebFOCUS 769
Windows
all
 
Posts: 53 | Registered: April 29, 2009Report This Post
Expert
posted Hide Post
knegrotto,

We drill to another MRE fex to kickoff a security fex in site.wfs this way:

  
TYPE=DATA,
COLUMN=N2,
 FOCEXEC=app/MRE_FEX.fex( \
-* Needed to Drill to MRE
    IBIMR_action     = 'MR_RUN_FEX' \
    IBIMR_sub_action = 'MR_STD_REPORT' \
    IBIMR_domain     = &DOMAIN_NAME.QUOTEDSTRING \
    IBIMR_folder     = &FOLDER_NAME.QUOTEDSTRING  \
    IBIC_server      = 'EDASERVE' \
    IBIMR_fex        = &MR_FEX_NAME.QUOTEDSTRING \
    IBIF_ex          = &MR_FEX_NAME.QUOTEDSTRING \
    IBIMR_random     = '' \
    IBIF_webapp      = '' \
    IBIMR_drill      = 'RUNNID' \
-* Parameters to Pass
    CUSTKEY          = &CUSTKEY.QUOTEDSTRING \
    FROMDATE         = &FROMDATE.QUOTEDSTRING \
    TODATE           = &TODATE.QUOTEDSTRING \
    DRILLRPT         = 1 \
    RANDOM           = &RANDOM \
    HAX              = &HAX \
    VAX              = &VAX \
    KPI_NUM          = &KPI_NUM \
    DATETYPE         = &DATETYPE.QUOTEDSTRING \
    TMTYPE           = TMTYPE),
 TARGET = '_BLANK',
$


Basically, you need all of the above amperes beginning with IBI which will be included in the drill URL...

hth

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Virtuoso
posted Hide Post
If all of the procedures are in the same domain, just pre-populate IBIMR_domain, IBIMR_action, IBIMR_sub_action, and IBIMR_folder. Then use your drop-down box to populate IBIMR_fex (and javascript to populate OBIF_ex with the same value) instead of your &P_REPORT_FEX parm. No need to pass anything to a separate procedure. Clicking on submit will execute the selected procedure.


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
Virtuoso
posted Hide Post
Here's an example of something I use. It uses a radio list as opposed to a drop-down, but demonstrates what I'm talking about.

the section of the HTML page with the controls:
<tr>
<td style="FONT-SIZE: 10pt; FONT-STYLE: normal; FONT-FAMILY: Arial; FONT-WEIGHT: 700;">
<input type="radio" name="RPTFEX" value="rpt1" checked><b>Report 1</b><br></td>
</tr>
<tr>
<td style="FONT-SIZE: 10pt; FONT-STYLE: normal; FONT-FAMILY: Arial; FONT-WEIGHT: 700;">
<input type="radio" name="RPTFEX" value="rpt2"><b>Report 2</b></td>


The parameters and submit button:

<input type='hidden' name='IBIMR_domain' value="claims00/claims00.htm">
<input type='hidden' name='IBIMR_action' value="MR_RUN_FEX">
<input type='hidden' name='IBIMR_sub_action' value="MR_STD_REPORT">
<input type='hidden' name='IBIMR_fex' >
<input type='hidden' name='IBIF_ex' >
<input type='hidden' name='IBIMR_drill' value="RUNNID">
<input type='hidden' name='IBIMR_flags' value="">
<input type='hidden' name='IBIMR_folder' value="#clm000000000">
<input type='hidden' name='IBIMR_random' value=''>
<tr><td align=center>
<INPUT TYPE='submit' NAME='Submit' VALUE='Submit' onClick="RptSelect()"
style="Z-INDEX: 16; LEFT: 15px; WIDTH: 100px; COLOR: rgb(255,255,255); FONT-STYLE: normal; FONT-FAMILY: Tahoma; FONT-WEIGHT: 700; FONT-SIZE: 9pt; BACKGROUND-COLOR: rgb(0,0,64); TEXT-DECORATION: none">
</tr>
<tr>


and the Javascript that sets the intial and then selected values for the fex:

function init()
{
document.clmstats.IBIMR_fex.value="app/rpt1.fex";
document.clmstats.IBIF_ex.value="app/rpt1.fex";
}

function RptSelect() {
if (document.clmstats.RPTFEX(0).checked)
 {  document.clmstats.IBIMR_fex.value="app/rpt1.fex"
    document.clmstats.IBIF_ex.value="app/rpt1.fex"
 }
else
if (document.clmstats.RPTFEX(1).checked)
 {	document.clmstats.IBIMR_fex.value="app/rpt2.fex"
    document.clmstats.IBIF_ex.value="app/rpt2.fex"
 }
 }


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
quote:
INCLUDE of an MRE Fex from an MRE Fex Fails


It just does not work, because, according to this ancient posting, -INCLUDE &RPT_NAME, "the MRE Dialogue Manager processing is NOT the FULL D.M., but only provides variable substitution."

So, you could try this instead. It's tedious if you have a lot of programs and the program name must be 12 characters or less.

-SET &ECHO=ALL;

-TYPE HELLO FROM PROGRAM testing_program_1.fex - start of report

-DEFAULT &P_REPORT_FEX = 'test23';

-GOTO &P_REPORT_FEX.EVAL

-testaa
-INCLUDE testaa
-GOTO END_REP

-test23
-INCLUDE test23
-GOTO END_REP

-testpgm2
-INCLUDE testpgm2
-GOTO END_REP

-END_REP
-TYPE HELLO FROM PROGRAM testing_program_1.fex - End of report


If you program names are more than 12 characters, pass a short name as the GOTO label name and put the long name in the INCLUDE statement.

Very tedious, but it works.


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
We use this technique as well for some batch processing where procedures are "queued" in a processing file and run nightly. The main job reads the values of the fex names in as parameters and then -INCLUDES the appropriate fex using separate labeled sections as demonstrated by Francis.


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
Gold member
posted Hide Post
Thanks everyone. I have abandoned trying to INCLUDE an MR FEX. But I did find some simple code from BlueZone that does just what I wanted on the forum at the following link.
[SOLVED] Executing an MRE fex from an external HTML page

 function runMRProcedure()
 {
	var url  = "/ibi_apps/WFServlet?";
       url += "&IBIMR_random=" + Math.random();
       url += "&IBIMR_domain=adminuti/adminuti.htm";
       url += "&IBIMR_action=MR_RUN_FEX&IBIMR_sub_action=MR_STD_REPORT";
       url += "&IBIMR_fex=app/" + document.getElementById("CBO_REPORT").value;
       url += "&IBIF_ex=app/" + document.getElementById("CBO_REPORT").value;
       url += "&IBIMR_flags=&IBIMR_drill=RUNNID";
       url += "&IBIMR_folder=#generaliq2ig";
       location.href = url;
 } 


One thing I did find that gave me fits was the way tha MRE handles (or doesn't handle) uppercase characters in object names. You can create a new FEX with upper case in the name and it will display in upper case. But if you look at the file name (preceeded by app/) it has only lower case. Once I cleaned that up by using only lower case, everything worked like a dream.


UPDATE: I found that the code was opening a new window and closing my original HTML page. I resolved this by
replacing
 location.href = url; 
with
 window.open(url,'_blank'); 


Now the user can close the new window and run another repoer from the menu.

This message has been edited. Last edited by: knegrotto,


WebFOCUS 769
Windows
all
 
Posts: 53 | Registered: April 29, 2009Report 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     [WORKAROUND] -INCLUDE of an MRE Fex from an MRE Fex Fails

Copyright © 1996-2020 Information Builders