Subscribe and Publish statements

Posted by bferencz on 03-Mar-2008 14:49

I am new to PROGRESS DYNAMICS and have been thrown into a fairly complex tax system.

Lately, I have seen a lot of statements similar to these:

**SUBSCRIBE PROCEDURE TARGET-PROCEDURE TO 'initializeLookup':U IN

TARGET-PROCEDURE.

**PUBLISH "initializeLookup":U FROM hContainer (INPUT TARGET-PROCEDURE).

What exactly is going on here? What tasks to "subscribe and publish" perfrom?

How is the TARGET-PROCEDURE determined? What is the ":U" label?

Any help is greatly appreciated. Thanks

All Replies

Posted by Håvard Danielsen on 04-Mar-2008 09:45

I suggest you read the 10.1C OpenEdge Development: ABL Handbook, by John Sadd http://www.psdn.com/library/entry.jspa?externalID=4818

The "Defining Functions and Building Super Procedures" section explains the TARGET-PROCEDURE reference and the next section "PUBLISH and SUBSCRIBE statements" explains how these loosely coupled messaging statements work.

The ADM2 framework, which is the foundation of Dynamics, is implemented with super-procedures and the linking mechanism is implemented with publish/subscribe. (Note that the "initializeLookup" example you refer to is not an example of ADM2's standard link mechanism.)

The :U tells the compiler that the string is untranslatable. This is part of the ABL's built in internationalization support. The initial section of 10.1B Translation Manager manual http://www.psdn.com/library/entry!default.jspa?externalID=1935 gives an explanation on the intended usage.

There are many ways to manage internationalization and there are probably more general papers or presentations that give a better overview on this subject on PSDN.

Dynamics stores messages and labels in the Repository and allows these to be translated without relying on the native translation support.

Posted by bferencz on 06-Mar-2008 14:25

Hey thank you for the information. I used the first handbook to resolve a couple issues within the company system. Very informative.

This thread is closed