infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Cloverleaf
Invoking Java from Tcl??
Jim Kosloskey
Has anybody invoked Java modules from inside a TPS Type proc?
Based on some really primitive search of the internet, this seems like it could be possible to do.
I am thinking of invoking Java to do some GUI type work from within a TPS Type proc.
An argument set would need to be provided to the Java Code and the Java Code would need to return an argument set.
I know very little about Java but at this point I just want to know if this is even worth considering.
Find more posts tagged with
Clovertech
Comments
Jeff Dinsmore
How about Tcl's graphic toolkit Tk?
I'm curious to know what kind of GUI app you're planning to call from within a TPS proc.
Jim Kosloskey
Well as I consider the challenge more closely, I realize the TPS proc would not be the appropriate place.
The appropriate place would be in the NetConfig when gathering arguments for a TPS proc. But there is no point I know of at which to grab control.
At one time, when the GUI was TK based, there was a plan to allow an IE to specify code to be executed within the NetConfig where the arguments for a TPS proc is specified. That code would then return the arguments to be used by the TPS proc. I think that plan was abandoned when the engine GUI was written in Java.
So please ignore this post - it is not really relevant to what I was investigating.
Just not thinking clearly today.
dirkengels
Jim,
doing this in a tcl proc is a bad idea, because you would block your whole process. That's why the javadriver proc was developed. The reason is how Cloverleaf actually call a java class. As the engine cannot call the java class directly, the engine calls the tcl interpreter which will call a tps proc. This tps proc calls a java runtime and that will run the java class. If you configure a java class in the gui, you can see, that there will a a tcl proc called. Look at $HCIROOT/tclprocs/tclIndex. You see some entries starting with clj... referring to $HCIROOT/tcl/lib/tfc/cloverleafJava.tcl. That's how the engine executes a java class.
As long as your java proc is running, the thread and therefore the whole process is blocked.
But if you like to do it anyway, put that thread in a separate process. I would suggest to use two procs. First call the java class and do whatever you want. The proc should give a message back which you then may process in a tcl proc afterwards. You can mix up tcl and java in a tps.