Languages: Java, .NET
Objects: Procedures
Interface: Web
As from GeneXus 9.0 procedures can now call web panels and web transactions.
If the procedure has been called from a Web Panel or Web transaction or via HTTP (i.e. property Call Protocol is HTTP), it can also call or link to a HTTP URL (i.e. call a web panel or a web transaction).
Note that the call will not be executed sinchronously. It will be exectuted as a redirect to the called object at the end of the web execution.
pprc01:
call(hwbp01)
for each
A=B
endfor
pproc02:
call(hwbp01)
..
call(hwbp02)
Event 'one'
pprc01.call()
EndEvent
Result: hwbp01 will be executed before the "endevent", after the for each
Event 'two'
pprc02.call()
EndEvent
Result: hwbp02 will be executed before the "endevent"
Event 'three'
pprc02.call
hwbp03.call()
EndEvent
Result: hwbp03 will be executed before the "endevent"
Why does it work that way? Internally, at each call statement an internal variable is set with the object name to which, at the end of the execution in the server, the redirect goes.
A procedure called via command line, for example, cannot call a web panel. But it could do an opendocument() function to open a URL in the browser.