Focal Point
Calling stand alone application's Java API from fex.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2031075132

June 08, 2007, 12:10 AM
Fazlina
Calling stand alone application's Java API from fex.
We have a functionality of scheduling a report on different frequency basis like daily, weekly , monthly etc. We use ReportCaster for scheduling purpose. We now face an entitlement issue.

Issue :
A User with userid "ABC" is entitled for a report "XYZ" is scheduling that report to run for 5 days from Jul 1st to Jul 5th. Reportcaster will start creating the report from Jul 1st. Say on Jul 2nd his entitlement to that report is revoked, in such case from Jul 2nd onwards the report should not get generated. But as ReportCaster is not aware of it, the report gets generated now. So pre-processing has to be done before every instance of generation of the report.

we have an API in our own java application using which we can check the entitlement of that user. This API takes the user id as the input and returns as true or false. Kindly let me know how can we call that Java API from the preprocessing fex.
June 08, 2007, 11:54 AM
Terry Whitmore
What is the operating system for your reporting server? Operating system commands (including JAVA) can be run from within a focexec.

The link to documentation on how to execute OS commands from a 71x environment (and probably most other releases) is http://documentation.informationbuilders.com/masterinde...g/dm_ctrl_proc10.htm

On UNIX, you can use something like this:

-UNIX java -cp class_path class_name
or
!UNIX java -cp...

On Windows, you can use this syntax:

-DOS java -cp ...

Hope this helps!
June 08, 2007, 01:07 PM
Dan Kenny
Understand that operating system commands is a security risk for any installation allowing the default adhoc fex facilty to remain exposed (https://server/ibi_html/homepage/adhoc.htm or linked from https://server/ibi_apps/homepage.jsp). It is also problematic from MRE users who have advanced analytical setting, as they can edit source.

The risk: basically, anyone with adhoc fex capability can poke around in the operating system, delete fexes authored by others, fill up the disk, zip up your application directories and expose them for download using FILEDEF, and a whole lot more painful stuff like that.

So be very careful about who all can run WF code on your installation when you allow OS CMDS to be available.

Regards,

-- Dan

University of Nebraska at Omaha
WF 7.1.6 Linux -- Test: WF 7.6.1 Linux
June 10, 2007, 02:05 PM
Terry Whitmore
That's a great point Dan! Thanks for filling in that hole.

Also, the ability to execute operating system commands from within focexecs can be disabled by using the following statement in a profile (edasprof.prf, user.prf, a service profile, etc.):

SET OPSYSCMD=OFF