Model API Tools Overview
At a utopist CA Plex site there would have been a perfect OO approach and finely tuned inheritance but understandably in reality most CA Plex sites have had a varied history using the tool. Development and maintenance therefore involves careful picking through the model, searching for impact and trying not to reinvent the wheel which is hoped these tools can help speed up the process and reduce the amount of duplication in time spent and number of objects.
List Objects | List objects restricted by type - (List all External WinC functions) |
Search Large Properties | Find model objects that contain a text string within their large property |
Launch App From Obj Narrative | Store relevant URL/doc link to a model object's narrative and be able to navigate to link by right button click. For example store a link to a function's external documentation OR intranet link to pattern implementation notes |
Export Large Properties | Export model large properties as text files where they can be utilized for source control and impact analysis. Twice as fast as 'Full Action Diagram Export' ! And not restricted to just action diagrams.. |
Export Selected Large Property | Export a selected object's large property as a text file. |
Edit Large Property | View selected object's large property in a text editor. Useful for finding Panel problems |
Implemented Objects | Query what DLLs are in a windows directory or Objects in an AS400 Library, once this is known a comparison is made with what currently exists in your current local model. |
Document Object | You want to add descriptive text (record notes and explanations for yourself and other developers) about any CA Plex object but have found the native object narrative facility too limiting |
TriplesForObject | Display all triples having the same source
object Or same target object |
ObjectBrowser+ | Create your own object browser! |
If as a CA Plex developer you have found the following tasks a little difficult to achieve then it is hoped these model api tools can help:
- You want to add descriptive text (record notes and explanations for yourself and other developers) about any CA Plex object but have found the native object narrative facility to limiting see Document Object
- You can't find a particular source code / message in your models so you end up creating the source code / message again, only to find the object weeks latter scoped to a function buried under 4 levels of scoping. You now have two or many… versions to maintain. See Search Large Properties
- You want to alter a field’s STATE but how can you tell which action diagrams could be impacted by a change? See Export Large Properties and Create List from Exported Large Properties
- A specific line of action diagram logic is wrong but is used across your model(s) but not inherited, how do you track down the changes? See Export Large Properties and Create List from Exported Large Properties
- You want to use text based change management tool to track changes. See Export Large Properties
- The need to record and communicate which CA Plex objects have changed during development cycles but don’t want to manually input the details See Object Browser+
- When conducting impact analysis using dependencies it is often difficult to see what the break down of the objects are which language or indeed implemented See Object Browser+ which allows you to use Plex Design Object Management (List) Technology (introduced in Plex 5.0)
- Upgrading and or simply been a while since you rebuilt your applications DLL (WINC) and or AS400 objects but don't trust your models and would rather build all the programs found in your installation directories/libraries then See Implemented Programs
- Model house keeping by comparing what DLL (WINC) and or AS400 objects are in your installation directories/libraries compared with what your model is configured to. You want to see what implementation names do not exist in your model or model objects that are set to implement No but are still in your installation directories/libraries.See Implemented Programs
- Want to compare an action diagram between Versions/Levels. See Edit Large Property
- Driven mad trying to remove local modifications from a panel while trying to understand a particular panel elements runtime behavior. See Edit Large Property to view a panels large property.
- Want to export a few large properties and not a whole model worth. See Export Selected Large Property
Prerequisites / Limitations
These client application tools are based on the COM-based API methods version 3.0 version which do have certain limitations:
CA Plex 6.1 (Build 43.035) is mandatory
- These tools can only be run against CA Plex r6.1 (Tested with r6.1 Build 43.35) or later. The Model API will fail if it is run against earlier releases of CA Plex and if run against earlier BUILDS as there were quite a few Model API bugs which will crash the apps. There is genuine regret with not incorporating model api Version 2.0 to allow earlier CA Plex releases to use these tools but thankfully looks like the majority of us have upgraded.
- These tools use ACTIVE library (namely Tree, Progress, FileOpen ActiveX, Calender ) which can be distributed without separate licensing but must be registered (Register the following ocx files: comctl32.ocx, comdlg32.ocx, Mscal.ocx) on your PC. See Plex help: Deploying an ActiveX Control with Your Application
- A typical installation of CA Plex includes the necessary components but for 5250 sites Unlicensed ActiveX controls such as comctl32.ocx, comdlg32.ocx, Mscal.ocx are used by the CA Plex pattern libraries. These ActiveX controls are not shipped with operating systems such as Windows Vista and Windows Server 2008.
- A local model must be open for calls to the Model API to work successfully
- If multiple instances of CA Plex are open, each with a local model, the Model API methods can only work against the first instance and therefore not necessarily the one from which the application was launched.
- If in the unlikely event… of an application error occurs (API is called with an invalid pointer or is used to attempt an invalid operation) then CA Plex will throw an exception. CA Plex should be exited and Task Manager used to ensure that the CA Plex process is shutdown, before restarting CA Plex and reloading the model.
- These tools have been used by developers authorized to all verb groups but as you still have read-only access to the verbs if unauthorized, the tools should work.
- Performance Issues to search 50,000 functions (including a library of Websydian Developer patterns!) at the time of writing takes 2.5 hours which is not great but you are no better off than you were before, you can run the search in the back ground while working in another CA Plex session. But maybe a better balance is to search action diagrams, values, label as Exported text files and then import the results as Plex lists
Performance
Search Large Properties performance using a PC with CPU 3.30GHz, 8GB RAM, 64-Bit Windows7
Search Object Type | Number of LP Searched | Number of LP returned by Safearray | Average Response Time |
Message | 9825 | 9825 | 27 secs |
Message | 8170 | 9825 | 24 secs |
Source Code | 4140 | 4140 | 11 secs |
Source Code | 1601 | 4140 | 6 secs |
Panel | 3101 | 4032 | 37minutes |
Function (No Websydian) | 24,827 | 33,349 | 44minutes
|
Function (approx 8000 Websydian) | 33,152 | 36,718 | 1hr 32mins
|
CA have worked hard since release 5.0 to improve the performance.
"Increase the efficiency of processing API data so that the overhead of
repeated calls to the API is avoided. This is achieved through the use of
SAFEARRAY data types." Release Notes 6.1
Secondly as other sites have found the use of internals have surprisingly quick performance and so this architecture was used in developing the tools.
CA Plex was used to develop the tools, and no doubt using native .NET would have resulted in a quicker application but fortunately I use CA Plex because I don’t want to know other languages ;) if CA Plex generates them for me.
CA have also recently worked hard to plug some memory and resource leaks that had made these tools GPF
Model API Architecture
In a preemptive move I shall say "What Plex build are you currently running" as I have a hunch this will
be the majority of the problems. Unlike standard application implementations where you are able
to control runtimes by controlling what dlls are in your application installation directory, model API calls
will still use some of the CA Plex IDE installation objects.
Here is an extract from an email exchange I had with CA regarding these matters:
"As to whether supplying one build with Stella Tools will stabilize your
product or not - that's going to depend on where a bug actually resides.
For example, the fix for this issue is in the Plex tool repository engine.
As such, it is loaded by the Plex.exe and thus has to be in the Plex root
directory. There isn't really any way that you can have the repository DLL
in your install directory and have the Plex.exe load that version.
However, there ARE issues which we are resolving in the WinC runtime, and
once resolved, I think you can limit the potential impact of PTF upgrades
by shipping a known version of the runtime with Stella Tools. Examples of
some of the bugs we have been working on in this area are the crash in
ob600lc.dll (issue 20422660-1), which we are discovering is due to variant
field handling in the COM import runtime (I will update you on our progress
on that issue in a separate posting against that issue)." Robert Layzell, Software Architect 2011-08-05
So the best advice is to use r6.1 Build 43.035 which is the most stable model api release so far, this is not to mean
Stella Tools has been coded badly pre this build just that it relies on the stability of the model api provided by CA.