In this project of mine where I am trying to model existing systems written in the Progress ABL, legacy code not being OO, I am a little unsure of the way I should be using packages.
For an example, let's take a program A, which runs A1 and A2 and includes I1 and I2. A1 and A2 are run persistently and contain a number of internal procedure entry points that are run directly from A. A also includes a number of internal procedures which are run from the main body of A. A also runs a utility program U1.
We have decided to model each internal procedure as its own class in order to show the linkages, both between code segments and data elements. Thus, A1 and A2 may contain no actual code if all of the code in them is contained within internal procedures.
It seems logical to me to create one level of package which corresponds to the compile unit. Thus, one package would consist of all of the internal procedures of A1 along with A1 itself and another would consist of A2 and all of its internal procedures. Correspondingly, one would expect to have a compile unit package for A which consisted of the main body, its internal procedures, and the two include files. But, suppose that the include files are not exclusive to A, but rather are common include files used in many many programs. In that case it seems appropriate to me to put I1 and I2 into another package, but to include them in the diagram for the A compile unit package and, of course, to include links from A to the includes.
What has me a little puzzled about this is that when I mock up something like this and export the package, the include files do show up in the XMI, but I don't see anywhere except the diagram where they are visible within EA, except as links in the A class. Am I missing a way in which they would be visible?
Also, I am thinking of creating a second level of package which corresponds to a functional unit such as a menu item. E.g., suppose these programs were all a part of customer maintenance, I might have a structure like:
AccountsReceivable
CustomerMaintenance
CM_Diagram
A
A_Diagram
AIP1
AIP2
<seems like the includes should be visible here>
<also U1>
A1
A1IP1
A1IP2
A2
A2IP1
A2IP2
So, in A_Diagram I want to show three packages, one containing A, AIP1, and AIP2; one containing U1, and one containing I1 and I2. In CM_Diagram, I would like to show three (or five) packages, one each for A, A1, and A2 (possibly ones for the Is and Us). I have mocked up the diagrams, but I'm not seeing properties corresponding to the associations other than the links. Am I missing something?
I hope this is clear ... it seems harder to describe than the underlying reality, it just is a bit awkward mapping it onto the structures of UML because it isn't OO.