PHANTOM command (OpenInsight 32-Bit)
At 13 MAR 2008 02:14:38AM Martin Drenovac wrote:
Just a quick Q - on the Prime Information systems (way back when), we had a PHANTOM command, which would shunt work off into the background - and now that OI is introducing the OESERVER concept - do we forsee a PHANTOM like facility?
TIA
At 13 MAR 2008 08:55AM Colin Rule wrote:
Martin, that would be a fantastic facility.
If REvelation could to that I would be very interested.
It would have to launch facilities that process only, and dont interact with the user. And then close when finished.
Colin
At 13 MAR 2008 11:10AM Bob Carten wrote:
pre.code {
background-color: #E5E5E5;border: 1px solid #000000;width: 640px;padding: 5px;font-family: courier, verdana, arial, serif;margin: 0px 10px auto;}
1. CTO has a PHANTOM facility. You can call it from OI. It will not run graphical Programs.
2. A really simple way to launch independent tasks is to run an interal web server and OECGI2, call MSXML2.XMLHTTP in Asynch mode to launch your program.
3. A more complicated way is to run the socketserver, create a script to tell it to launch a task, have that task launch a separate OpenInsight to execute the background task in event context.
An example of calling the socketserver:
[url"http://docs.google.com/Doc?docid=dhh9ztnx_11g72kxc&hl=en]Oe_SocketServer_Example[/url]An example of launching an independent OpenInsight:
handle=GetEngineWindow() filename= drive():'\oinsight.exe' params=/ap= : @appid<1> params := ' /un=OTTO' ; * My special user params := ' /task_id ' : task_id working_dir=drive() Call ShellExecute(handle, 'Open':\00\, filename:\00\, params:\00\, working_dir:\00\, 0) Call Sleepery(.1)Getting that independent Openinsight to run your task:
Configure your application to parse the command line.
You need a SYSPROCS record named MYNAMESPACE_DLL_KERNEL32
KERNEL32 LPSTR STDCALL GetCommandLineA(VOID) As GetCommandLine]
Run Declare_fcns 'MYNAMESPACE_DLL_KERNEL32'
Add an Autoexec Script to your application, triggered when it sees a special user
Add a username of OTTO or some other token to indicate autoexec.
Call the script from the create event of the application startup window
OpenInsight should start, run your task, shut down.
If @username=OTTO' Then * get task id work=GetCommandLine() token=/task_id" task_id=' pos=indexc(work, token,1) if pos then work1,pos+Len(token)=' task_id=work1,' ' If Num(task_id) Then call task_manager('EXECUTE', task_id) end end end Call Send_Event(@WINDOW, 'CLOSE') return 0]
AFAIK we have no plans to add this complex approach to OpenInsight.
- Bob
At 13 MAR 2008 11:47AM DSig wrote:
I am surprised that the usual "we have something like that" hasn't been posted.
This is one of those things that i think RTI really should put into their system. Everyone rolling their own (mini server farm) doesn't make sense.
i would really like to see Phantom added to the process.
just my 45 cents work
At 13 MAR 2008 04:20PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
*cough* ;)
World leaders in all things RevSoft