Subscribing to OpenEdge Architect events

Each time a Progress Developer Studio for OpenEdge operations takes place, a named event, oeide_event, is published. This enables you to develop procedures that use the ABL SUBSCRIBE statement to capture and respond to Progress Developer Studio for OpenEdge events.

Output parameters for oeide_event

The following output parameters are published:

Event Name Output Parameters
eventName One of the following values:
  • Open-file
  • Close-file
  • Before-save
  • After-save
  • Before-compile
  • After-compile
  • Before-run
  • After-run
  • Before-debug
  • After-debug
  • Project-startup
  • Project-shutdown
  • Get-focus
projectName The name of the project in which the event occurs.
programName The file name of the resource operated on, if applicable.
eventData (Not currently used.)
Note: In certain circumstances, event publishing is suppressed so as not to interfere with a running process. For example, opening or closing a file while running the Progress Developer Studio for OpenEdge Debugger does not trigger publication of an event. Also, note that the Before-compile and After-compile notifications do not apply to Tools for Business Logic, as models are only saved and not compiled.

AppBuilder events

When AppBuilder runs in Progress Developer Studio for OpenEdge, most of its events are published by both OpenEdge Studio and Progress Developer Studio for OpenEdge. Whenever possible, it is recommended that you use the Progress Developer Studio for OpenEdge events, rather than the corresponding OpenEdge Studio events. However, the following OpenEdge studio events do not have Progress Developer Studio for OpenEdge counterparts:

Note: The AppBuilder in Progress Developer Studio for OpenEdge does not have a Compile option. If the ABL Editor is opened for an AppBuilder file, then the compile notifications will be sent only if the file is saved under OpenEdge Projects.

Named event publishing for AppServers in Progress Developer Studio for OpenEdge

Progress Developer Studio for OpenEdge currently publishes events on the AVM for certain events, such as starting a project, stopping a project, and compiling.

The following events are new in this release:

Event Name Description
before-server-publish Sent to all OpenEdge projects that contribute one or more modules to a server.

This event is published when the server starts to publish.

after-server-publish Sent to all OpenEdge projects that contribute one or more modules to a server.

This event is published when the server finishes publishing.

before-module-publish Sent to all OpenEdge projects that contribute one or more modules to a server.

This event is published when the server begins to publish a specific module.

after-module-publish Sent to all OpenEdge projects that contribute a specific module to a server.

This event is published after the server publishes a specific module.

server-starting Sent when an OpenEdge server is known to be starting (typically when the launch for a particular server has started).

This event is published only to projects that contribute one or more modules to the server.

server-started Sent when an OpenEdge server is known to have started from within a Progress Developer Studio for OpenEdge launch configuration. This event is published from both the launch configuration (after it detects that the server has started) and from the server process that monitors the server state.

This event is published only to projects that contribute one or more modules to the server.

server-stopping Sent when an OpenEdge server is stopping.

This event is published:

  • Only to projects that contribute one or more modules to the stopped server
  • Whenever the framework detects that the server is stopping
server-stopped Sent when an OpenEdge server is stopped. This event is published:
  • Only to projects that contribute one or more modules to the server
  • Whenever the framework detects that the server has stopped

This event is called from both the stop process job and the server process that monitors the state of the server.

Each event is published in the AVM with four parameters. The following table shows the value of each parameter for each event:

Event Project name

Program name

Event data

before-server-publish Project name of module owner

<blank>

Server name

after-server-publish Project name of module owner

<blank>

Server name

before-module-publish Project name of module owner

Module name

Server name

after-module-publish Project name of module owner

Module name

Server name

server-starting Project name of module owner

<blank>

Server name

server-started Project name of module owner

<blank>

Server name

server-stopping Project name of module owner

<blank>

Server name

server-stopped Project name of module owner

<blank>

Server name

Sample event-subscription startup routine

The following example shows a startup file, _idestartup.p, that subscribes to Progress Developer Studio for OpenEdge events and runs event_alert.p as a persistent procedure:

/*------------------------------------------------------------------------
    File        : _idestartup.p
    Purpose     : Subscribe to Progress Developer Studio for 
                  OpenEdge events, call event_alert.p
  ----------------------------------------------------------------------*/
DEFINE VARIABLE mySubscribehandle AS HANDLE  NO-UNDO.
RUN event_alert.p PERSISTENT SET mySubscribeHandle.
SUBSCRIBE PROCEDURE mySubscribeHandle TO "oeide_event" ANYWHERE.

Each time an event occurs, event_alert.p displays an alert with the values of the three oeide_event parameters:

/*------------------------------------------------------------------------
  File        : event_alert.p
  Purpose     : Display alerts for Progress Developer Studio for 
                OpenEdge events
  ----------------------------------------------------------------------*/
PROCEDURE oeide_event.
DEFINE INPUT PARAMETER eventName AS CHARACTER.
DEFINE INPUT PARAMETER projectName AS CHARACTER.
DEFINE INPUT PARAMETER programName AS CHARACTER.
DEFINE INPUT PARAMETER eventData AS CHARACTER.
MESSAGE "Event name: "     eventName SKIP
   "Project name: "  projectName SKIP
   "Program name: "  programName SKIP
VIEW-AS ALERT-BOX.
END PROCEDURE.