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 ObjectsList objects restricted by type - (List all External WinC functions)
 Search Large PropertiesFind model objects that contain a text string within their large property
 Launch App From Obj NarrativeStore 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 PropertiesExport 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 PropertyExport a selected object's large property as a text file.
 Edit Large PropertyView selected object's large property in a text editor. Useful for finding Panel problems
 Implemented ObjectsQuery 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 ObjectYou 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
 TriplesForObjectDisplay 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 TypeNumber of LP SearchedNumber of LP returned by SafearrayAverage Response Time
Message9825982527 secs
Message8170982524 secs
Source Code4140414011 secs
Source Code160141406 secs
Panel3101403237minutes
Function (No Websydian)24,82733,34944minutes

Function (approx 8000 Websydian)33,15236,7181hr 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.

Look And Feel


Release History

Date Release Type Description
May 2012 2.5.0 New Document Object an alternative to object narrative
May 2012 2.5.0 New More Bells and Whistles..Ballon Tips...Button Icons... App Icons...
Aug-
Oct 2011
2.0.0 Fun Various Bells and Whistles..Cue Banners...Flash Task Bar...
Aug-
Oct 2011
2.0.0 Enhancement
Request
ObjectBrowser+ to run as Top Applications (but no Menu Bar) and to regain focus during sessions
Aug-
Oct 2011
2.0.0 New "Super Size Me" option to very large local models (eg over 100mb) to use the tools as EnumSafearrayObjects Method is not fit for purpose
Aug-
Oct 2011
2.0.0 CA Fix 20390819-1: GETFIRSTOBJ FAILS ON VIRTUALS
Aug-
Oct 2011
2.0.0 CA Fix 1818: Plex API Methods over large models (>500MB) Mem Usuage
Aug-
Oct 2011
2.0.0 CA Fix 1832: FAILED TO LOAD BITMAP IN CASE OF PUSH-LIKE PROPERTY
Aug-
Oct 2011
2.0.0 CA Fix 1835: MODEL API FINDOBJ FAILS ON NON REAL OBJECTS
Aug-
Oct 2011
2.0.0 CA Fix 1836: MODEL API GETOBJNAME RETURNS MODELNAME PREFIXED OBJECT NAME
Aug-
Oct 2011
2.0.0 CA Fix 1737: GETOBJFULLNAME API DOESN'T SHOW GROUP MODEL NAME FOR VIRTUAL
Aug-
Oct 2011
2.0.0 CA Fix 1742: PLEX API MEMORY USAGE ISSUE (COM IMPORT)
Aug-
Oct 2011
2.0.0 CA Fix 1743: PLEX API MEMORY USAGE ISSUE (method FindObj)
Aug-
Oct 2011
2.0.0 CA Fix 1755: MULTISELECT LIST BOX DOESN'T RETURN CORRECT SELECTED ITEMS
Aug-
Oct 2011
2.0.0 CA Fix 1791: PLEX MODEL API GETOBJLASTCHANGEDATE DOESN'T RETURN DATESTAMP
Aug-
Oct 2011
2.0.0 CA Fix 20405236-1: RUNTIME ERROR WITH OB600LC.DLL related to fix 1742 (variant
field handling in the COM import runtime)
Aug-
Oct 2011
2.0.0 CA Fix 20453564-1: PLEX API NOT CLOSING PLEX.EXE - Error in API Sample Model
29 May 2011 1.2.0 Enhancement
Request
Added Modified Date cut off option to Export Large Properties
1.2.0 New Added Support for $AllRefs addin macro so multiple selection of objects during Export Selected Large Property launches only one instance of the exe
25 May 2011 1.1.2 Enhancement
Request
Created "Export Large Property of Selected Object" A Object/Dependency browser integrated Addin that allows the developer to select object(s) and export the objects large property to file.
24 May 2011 1.1.1 Fix Export Large Properties made a Top Application from Dialog
23 May 2011 1.1.0 Enhancement
Request
Added Local Modifications Option to Export Large Properties
24 May 2011 1.1.1 CA Fix 1706: PLEX GPF WITH ADD-INS SUPPORT WITH DEPENDECY BROWSER
12 May 2011 1.0.0 Launch