Consultor Eletrônico



Kbase P50538: Example of how to run an internal procedure within another PERSISTENT procedure in WebSpeed?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   24/02/2010
Status: Verified

GOAL:

Example of how to run an internal procedure within another PERSISTENT procedure in WebSpeed?

FIX:

Define the handle within a startup procedure for the agents. ( my-web-disp.p ).

Something like:
/* my-web-disp.p - begin */
DEF NEW SHARED VAR initH AS HANDLE.
RUN init.p PERSISTENT SET initH.
RUN web/objects/web-disp.p.
/* my-web-disp.p - end */

The WS Application code must have something like:
DEF SHARED VAR initH AS HANDLE.
RUN ip IN initH ( vars ).

Once the handle is defined as NEW SHARED VAR at startup, then all other procedures can use it and share from it.

If you do not define the handle at startup, then you must define a new global variable; DEF NEW GLOBAL SHARED VAR
This way, all other procedures can share it globally