0% found this document useful (0 votes)
47 views

CA Plex 7 2 1 Source

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

CA Plex 7 2 1 Source

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 302

CA Plex 7.2.

1
CA Plex 7.2.1

Table of Contents
Cumulative Patches............................................................................................................................. 6
Features and Enhancements.......................................................................................................................................... 6
Published PTF Builds - Fix List................................................................................................................................... 14
Release Information........................................................................................................................... 22
New and Updated Features...........................................................................................................................................22
Upgrading from Earlier Releases................................................................................................................................. 24
Published Fixes.............................................................................................................................................................. 37
Fixes Included in this Release..................................................................................................................................... 37
Known Issues................................................................................................................................................................. 42
Third Party Acknowledgments..................................................................................................................................... 43
International Support..................................................................................................................................................... 55
Documentation................................................................................................................................................................56
Getting Started................................................................................................................................... 57
Installing.............................................................................................................................................. 61
System Requirements....................................................................................................................................................61
How to Install and Configure CA Plex.........................................................................................................................63
Install the Base Product............................................................................................................................................67
Install Components....................................................................................................................................................72
Enter the CA License Key........................................................................................................................................ 73
How to Install Pattern Libraries....................................................................................................................................74
How to Install and Configure System i Components.................................................................................................74
How to Configure CA Plex TCP/IP Environment in CA Plex................................................................................... 77
How to Configure the Windows C++ Server Components for CA Plex....................................................................81
How to Install and Configure the Java Components for CA Plex............................................................................ 83
How to Install the Application Integrator.................................................................................................................... 86
Using.................................................................................................................................................... 88
Create a Project Management Application..................................................................................................................88
Open the Tutorial Model................................................................................................................................................ 89
Display the Model Editor and Panel Designer............................................................................................................ 89
Use Inheritance to Define Field Properties................................................................................................................. 90
Use Continuation Triples to Make Fields Optional.....................................................................................................93
Display the Object Browser.......................................................................................................................................... 94
How to Set Up Generate and Build Options............................................................................................................... 94
How to Define, Generate, and Build a Project Entity...............................................................................................100
Specify the Attributes for a Project Entity...............................................................................................................101
Define Field Properties........................................................................................................................................... 103

2
CA Plex 7.2.1

Define the Project Entity Using Inheritance............................................................................................................105


Generate and Build the Project Entity.................................................................................................................... 106
Using Your Generated Application..........................................................................................................................107
Modify the User Interface............................................................................................................................................ 110
How to Integrate Your Generated Application........................................................................................................ 114
Testing Your Generated Application................................................................................................................ 115
How to Define Entity Relationships Using Diagrammer.......................................................................................... 116
Understand the Diagrammer...................................................................................................................................118
Create a Diagram....................................................................................................................................................120
Define Entities with the Diagrammer...................................................................................................................... 122
Define Attributes with the Diagrammer...................................................................................................................123
Define Relationships Between Entities................................................................................................................... 124
Define Employee and Its Attributes........................................................................................................................ 126
Modify the Panel - Hide Fields on the Panel......................................................................................................... 128
Generate and Build the Employee Entity............................................................................................................... 130
Test the Application.................................................................................................................................................130
How to Define the Task Entity and Process Enabling............................................................................................. 133
Test Your Fully Functional Application....................................................................................................................142
Add Functionality to the Project Entity..................................................................................................................... 144
How to Create a Wizard to Add a Project................................................................................................................. 147
Define the Wizard................................................................................................................................................... 148
Modify the Wizard Parent Panel.............................................................................................................................151
Modify the First Part of the Wizard........................................................................................................................ 152
Modify the Second Part of the Wizard................................................................................................................... 156
Add Commit and Rollback Processing................................................................................................................... 158
Generate and Build Project Wizard........................................................................................................................ 159
Test Your Wizard..................................................................................................................................................... 160
Create a Property Sheet.............................................................................................................................................. 161
Define the Property Sheet...................................................................................................................................... 163
Create a Function to Work with Projects and Tasks.............................................................................................. 163
Modify the Parent Panel......................................................................................................................................... 169
Set the Tab Text......................................................................................................................................................170
Set the Caption....................................................................................................................................................... 171
Generate and Build Functions................................................................................................................................ 171
Test Your Property Sheet........................................................................................................................................172
How to Use Group Model and Local Model Licensing in CA Plex......................................................................... 173
How to Make a Floppy Disk License Transfer....................................................................................................... 175
How to Create, Import, and Use Windows Communication Foundation Services in CA Plex............................. 177
How to Deploy .NET ClickOnce in CA Plex...............................................................................................................200
How to Import and Use Web Services in CA Plex................................................................................................... 207

3
CA Plex 7.2.1

How to Use ActiveX Controls in WinC and C# Client Applications....................................................................... 222


Auto Deploy CA Plex WCF Services to Internet Information Services.................................................................. 227
Auto Publish CA Plex WCF Services into a CA API Gateway................................................................................ 239
Tutorials......................................................................................................................................................................... 244
Tutorial for Java...................................................................................................................................................... 245
Tutorial for System i................................................................................................................................................245
Tutorial for Windows............................................................................................................................................... 245
Running............................................................................................................................................. 246
How to Restore the Product Libraries Under a Different Name............................................................................. 246
How to Use The Tutorial Reference Model............................................................................................................... 246
Generate, Build and Run Tutorial Reference Model.............................................................................................. 247
How to Integrate the Application for the Tutorial Reference Model....................................................................... 248
Troubleshooting................................................................................................................................255
BLD9081 Warning Messages...................................................................................................................................... 255
Check for Errors...........................................................................................................................................................255
Check for Java Build Errors....................................................................................................................................... 256
Delete Objects You Unintentionally Created............................................................................................................. 257
Manage Triples..............................................................................................................................................................257
Rename Objects Whose Names You Mistyped.........................................................................................................258
Troubleshoot When Calling a Web Service...............................................................................................................258
Reference.......................................................................................................................................... 262
CA Plex Components...................................................................................................................................................262
Objects and the Object Browser.............................................................................................................................265
Library Objects........................................................................................................................................................ 267
Property Sheets.......................................................................................................................................................267
Field Inheritance......................................................................................................................................................269
Project Entity and Triples........................................................................................................................................269
Continuation Triples.................................................................................................................................................270
Patterns and Inheritance.........................................................................................................................................270
Scoped Objects....................................................................................................................................................... 271
The Panel Designer................................................................................................................................................ 271
Entity Relationships.................................................................................................................................................272
Add Prompt Processing................................................................................................................................... 273
Entity-Relationship Diagrams.................................................................................................................................. 273
Code Library............................................................................................................................................................274
Inheritance............................................................................................................................................................... 275
CA Plex Features..........................................................................................................................................................275
Native Platform Implementation.............................................................................................................................. 276
Default Panel Layouts.............................................................................................................................................276

4
CA Plex 7.2.1

Visual Development................................................................................................................................................ 276


Dynamic Diagrams.................................................................................................................................................. 276
Automatic Selector Functions................................................................................................................................. 277
Action Diagrammer..................................................................................................................................................277
More About Variables and Fields........................................................................................................................... 278
Global Data Storage and the SharedData Variable............................................................................................... 279
Pre, Edit, and Post Points...................................................................................................................................... 279
Function to Show Projects and Tasks.................................................................................................................... 280
Plex Java runtime properties.................................................................................................................................. 280
System i Components................................................................................................................................................. 281
Introduce the Action Diagrammer........................................................................................................................... 281
Basic Concepts....................................................................................................................................................... 281
Owned By Relationships.........................................................................................................................................282
Owned By Relationships and OBASE/Child...........................................................................................................283
System i Product Libraries......................................................................................................................................284
The Tutorial Reference Model................................................................................................................................ 284
Frequently Asked Questions...................................................................................................................................... 291
FAQ on CA Licensing (ALP)...................................................................................................................................291
FAQ on Tutorials and CA Plex Components..........................................................................................................293
Additional Resources...................................................................................................................... 299
Japanese Documentation................................................................................................................300
Documentation Legal Notice.......................................................................................................... 301

5
CA Plex 7.2.1

Cumulative Patches
This article describes the enhancements, fixed issues, certifications and deprecated items addressed in CA Plex 7.2.1 and
above cumulative patches. The cumulative patches must be installed on top of CA Plex 7.2.1 GA release.

Features and Enhancements


This article describes the deliverables and enhancements that are part of the cumulative patch:

CA Plex r7.2.1 (Build 24.005) Enhancements


CA Plex r7.2.1 (Build 24.005) is built on top of CA Plex r7.2.1 (Build 24.004) and it comprises of all the fixes that are
part of r7.2.1 (Build 004). The following new enhancements are added with CA Plex r7.2.1 (Build 24.005).For more
information about fixed issues in Build 005, see Build 24.005 Fixes.

1. Action Diagram - Navigate to previous cursor position


Enhancement to improve the following usability aspects of PLEX IDE within Action Diagram (AD):
• Swift navigation between subroutine definition and subroutine caller within large Action Diagram (AD). Double clicking
on sub routine call statement in AD takes focus to the definition of sub routine and there is no easy way to go back to
subroutine definition other than manual scrolling.
By using ‘CTRL+B’ key combination, focus is back to subroutine caller statement from subroutine definition.
• Saves developer time while navigating between subroutine definition and its caller.

2. Type through list in Object browser


This improves the usability of Plex IDE and provides the following improvements:
• User can quickly search a word by simply typing text in Object Browser list items.
• Instead of single character search, enabled to search quick text search, that is, E v/s EMP.
• Saves developer time.

3. Save Local Model configurations


This improves the usability of Plex IDE and provides following improvements. This helps developers to save local model
configurations and switch between them quickly.
NOTE
Users must open a local model first to Save/Load configuration. In case of creating a new local model from the
Group model, users must not Save configuration at this point as there is no local model opened/created.
• Helps developers to save the local model’s currently loaded configuration.
• Helps developers to switch between different saved configurations quickly.
Following new controls are added to the Model Configuration (File, Configuration…) window.

6
CA Plex 7.2.1

How to Save Local Model Configuration?


Perform the following steps to save a local configuration:
• Open any Plex local model.
• Navigate to File, Configuration….

• Once configuration window is loaded, change the configuration grid as per requirement, if needed.
• Enter a configuration name in editable ‘ComboBox’ at the right bottom.
• Click on Save Current Config button. This saves the current configuration loaded in library grid with the name user
has provided in ComboBox.
IMPORTANT
Plex creates ‘ModelSavedConfigs’ source code object to save local model configurations. User should not
update this object manually.
Once the new configuration changes are saved at a Higher Version/Level, the configuration changes made to
the Lower Version/Level are not reflected in the Higher Verion/Level.

7
CA Plex 7.2.1

IMPORTANT
In case if you are changing or adding a new level/version to the model, the existing saved model configurations
will no longer work as expected. Due to this limitation, it is recommended that you save the existing
configurations again as the old saved configurations will not work as expected.
In the upcoming Release/PTF build, this feature will be extended to support the newly added Version/Level.

How to load local model’s saved configuration?


Perform the following steps:
1. Open any Plex local model.
2. Navigate to File, Configuration….
3. On loading Configuration window, all saved configuration are loaded in ComboBox.
4. If there are no saved configurations, the ‘Load Config’ button is disabled.
5. Select any specific model configuration from ComboBox and click the ‘Load Config’ button.
6. On clicking Load Config button, process reads selected saved configuration details and updates the library grid with
selected saved configuration.
7. This process reads the selected saved configuration details and updates the same in configuration’s library grid.

4. Local Model House Keeping


This improves the tool’s ability to report unused objects within the Action Diagram. The scope of this feature is limited to
report unused fields and subroutines within the Action Diagram, and provides the following improvements.
1. Reports unused fields in Action Diagram.
2. Reports unused Subroutines in Action Diagram.
3. Enable user to skip generating code for unused fields in Action Diagram.
NOTE
The field(s) used as default parameter in Function call will be reported as unused, due to dynamic nature of
default parameter mapping.
Report Unused Fields and subroutines
Report unused fields and subroutines in message log window while opening the Action Diagram.
By default this functionality is enabled, follow the instruction below to disable this functionality. Update the Plex.INI file with
‘Report Action Diagram Unused fields=0‘ within ‘Options’ section.

[Options]

Report Action Diagram Unused fields=0


By enabling this functionality, similar messages as shown below appear in the Message Log window.

SKIP generating code for unused fields

8
CA Plex 7.2.1

By default this functionality is disabled, to enable update the following entry in Plex.INI file.

[Options]

Generate Code for Unused AD Fields=0


Setting the ‘Generate Code for Unused AD Fields=0’ in Plex.INI file stops generating the code for unused AD fields only
and informational generation message will be reported for such fields in Message Log window.

What's Deprecated in CA Plex r7.2.1 (Build 24.005)?

Changes have been carried out to remove license checks for CA Plex family of products. These changes are applied after
installing CA Plex r7.2.1 Build 24.005. If you have an existing license of CA Plex installed in your environment, you will
see no impact from licensing side except that the license check will not happen at the backend.
NOTE
The license check is only removed to make it easier for customers to use CA Plex. CA Plex has not been made
open source.

Refresh Packs
Refresh Pack Deliverables contains all new functionalities and is the part of the continues delivery model.To distinguish
between cumulative update (PTF) and Refresh Pack, the product’s about screen displays ‘Refresh Pack’ at the end of
product build version. For example, r7.2.1 (Build 24.004) Refresh Pack.Refresh Pack and deliverables.

Refresh Pack #1
The Refresh Pack #1 is based on Plex r7.2.1 PTF Build 24.003 and is named as "r7.2.1 (Build 24.004) Refresh
Pack".The Refresh Pack #1 comes with following deliverables:

Deliverable #1
This functionality resolves the known limitation of removing the ‘calls FNC ’
triple manually after deleting the respective function call from Action Diagram.

9
CA Plex 7.2.1

Now, ‘calls FNC ’ triple(s) gets removed as and when respective function call(s) gets deleted in Action Diagram.

10
CA Plex 7.2.1

Deliverable #2

This functionality enhances the tool’s ability to select the entire text in source code editor with ‘CTRL+A’ keys.

Deliverable #3
This functionality resolves the known limitation of commenting & uncommenting only single Action Diagram block within
a single operation.Now, tool extends the functionality to comment & uncomment multiple selected Action Diagram blocks
within a single operation.

11
CA Plex 7.2.1

Deliverable #4
Provision to set customized search filter pattern for Object Browser default search pattern. So far this is set to star (*)
that takes long time to list out all objects of selected object type while opening large models.Set the Plex.INI option
for the customized search pattern. Search pattern string supports up to 64 characters length. [Object Browser] Object
Browser Default Search Pattern=* For instance, setting ‘Object Browser Default Search Pattern’ to ‘UserDefinedFilter’
value – Plex IDE initializes Object Browser filter pattern to ‘UserDefinedFilter’ that intern filters selected object type
accordingly.

12
CA Plex 7.2.1

Deliverable #5
Provision to mark the required object(s) as your favorite object(s). This creates a list object type first time with the name ‘<
ModelUserName >_favList’ having no expiry date.
For quick access, a new icon

has
been added in the Object Browser window which takes the user directly to a favorite list.The ‘Add to Favorites…’ option
is available from,
• Object’s context menu
• Object tool menu
For instance,If the local model user name is ‘Admin’ – ‘Admin_favList’ list object will be created if does not exist, and all
favorite object(s) will be added in ‘Admin_favList’ list object.

Select desired object(s), and then use right context menu “Object->Add to Favorites…” to add the object(s) to favorite list.

13
CA Plex 7.2.1

Favorite icon

has been added to the Object Browser window to quickly access the favorite objects.

Published PTF Builds - Fix List


The following table includes the fixed issues, enhancemnets, certifications, and deprecations that are part of the published
builds. Click the individual fixed issue number to view the problem document.

14
CA Plex 7.2.1

Problem / Issue Number Description Tool

25.005 - Hiper Fix


14898 - Fix to avoid generating code for only unused AD fields in few √ √
circumstances. This requires regeneration of Plex objects.
- Fix to handle navigation to previously processed subroutine caller, in
case of not fully expanded AD blocks.
- Fix to adjust AD Toolbar buttons along with newly added subroutine
navigation toolbar button. Added a new Toolbar button for subroutine
callers navigation.
- Fix to save model configurations properly in multi-level/version
configurations.
- Added missing jar for Securing database Password in Java properties
file.
- Fix to handle Java event execution with CheckBox.
024.005 Enhancements For more information, see CA Plex - Build 24.005 Enhancements.
Navigate to previous cursor Navigate to previous cursor position √
position This functionality extends the ability to track the Action Diagram
(AD) subroutine’s caller position. Once user clicks on subroutine call
statement in AD, which in turn jumps to subroutine definition. Now, user
can go back to subroutine call statement using ‘CTRL+B’.
Type through list in Object This functionality improves the object browser searching capability by √
Browser directly typing keys in object browser’s list items. Instead of locating
object with single character, ability to search for quickly typed words e.g.
E v/s EMP.
Save Local Model This functionality extends the tool’s ability to save the current local model √
Configurations configuration and can load the saved configuration any time later.
Local Model House Keeping As part of this feature: √
• Unused Sub Routine, fields within Action Diagram will be reported to
user.
• User can opt to not generate code for unused fields in Action
Diagram.
024.005 Certifications
Oracle 19c
Windows Server 2019
Microsoft SQL Server 2019
024.005 Deprecated Items Product License Removal
024.005 Bug Fixes
2495 Fix to handle manual Grid sorting to refresh the current grid selection. √
2533 Fix to handle duplicate field’s edit and level control on panel. √
2556 Fix to handle C++ build error 'msb3491'. √
2557 Fix to avoid Plex IDE GPF while saving Action Diagram changes. √
2558 Fix to handle marking multiple comments and uncomments blocks in √
Action Diagram.
2559 Fix to handle oracle database error ORA-00920.
2561 Fix to handle event sync in focus gain and focus lost events.

15
CA Plex 7.2.1

Problem / Issue Number Description Tool

2563 Fix to handle C++ generator to avoid compilation error C4010. The error √ √
occurs if there is a comment line ending with single ‘\’ within the source
code object, which makes it continuation of comment line with generated
C++ code.
2564 Fix to handle Meta Operation ‘++ If Input Capable’ for invisible checkbox.
2565 Fix to handle disabled button with image appearance correctly within √
inactive state.
2566 Fix to handle the following: √
• Favorite object filter pattern while moving across multiple object types
in the Object Browser.
• Toggle favorite object button to show only favorite list or all list
objects.
2567 Fix to generate correct NULL values for "STE may be EQ VAL" triple. √
2568 Fix to handle edit masks for fixed decimal number to avoid keeping √
negative sign at the end of the number.
2569 Fix to remove ‘calls FNC’ triple only for selected function in model editor. √
2570 Fix to avoid nag license screen for VSFLEXGRID v8.0 ActiveX control. √
2571 Fix to handle field prompt processing correctly.
2572 Fix to avoid garbled characters while deleting any character in edit √
control. This is specific to Japanese locale.
2573 Fix to handle Grid scrolling until end of the grid.
2574 Fix to handle Plex IDE control sizes when using DPI larger than 100%. √
2575 Fix to handle avoid marking inherited action diagram block (Function call √
& API call) changed without making any AD changes.
2576 Fix to avoid Plex IDE GPF while opening Inheritance Path. √
2577 Fix to avoid Java application while loading panel resources in few
circumstances.
2578 Fix to delete ‘calls FNC’ triple in case of parent deleted in Action √
Diagram.
2579 Fix to handle Java Blob error ‘java.sql.SQLException: Missing IN or OUT
parameter at index:: #’ while inserting record into database.
2580 Fix to handle MFC Spin Control in case of setting Max/Min value. Refer √
problem record for more details.
2581 Fix to handle WinWidget control processing for decimal point input. This √
occurs in few circumstances.
2582 Fix to update the Object Browser search history across multiple object √
types, in case Object Browser has customized search filter string.
2583 Fix to avoid logical event trigger on WPF grid’s scrollbar double click.
2584 Fix to trigger update event on field’s content deletion. This is specific to √
SingleLineEdit control with WinWidget.
2585 Fix to handle DPI issue with built application launched with √ √
Ob721RC.EXE.
2586 Fix to load Image in Grid with long path. √
2587 Fix to handle ‘If Focus’ with Java structure field.

16
CA Plex 7.2.1

Problem / Issue Number Description Tool

2589 Fix to handle WPF edit control to allow decimal point. Refer problem
record for more details.
2590 Fix to handle single quote while preparing SQL statement in Java
variant.
2592 Fix to handle event processing while launching multiple dialog windows √
via Top Windows.
2593 Fix to avoid Plex IDE GPF while saving Action Diagram. √
2594 Fix to handle ‘If Focus’ within WinC Grid. √
2595 Fix to handle field prompt processing in few circumstances. √
2596 Enhancement to encrypt the database password in Java properties files. √
2597 Fix to avoid Plex Java generator GPF wherein EXTERNAL_NAME √
operator used without view variable. Plex reports warning in such
scenarios.
2598 Fix avoid Java dispatcher hang by spurious calls from unknown client
like Telnet etc.
2599 Fix to avoid launching multiple prompt functions for single prompt
request in WPF.
2600 Fix to handle duplicate row with misaligned data in WPF grid.
2601 Fix to show status bar information correctly in Java variant.
2602 Fix to handle Set State Grid and Append Grid statement to work
correctly.
2603 Fix to handle Selected Grid row with Refresh Grid processing.
2604 Fix to handle WCF exception ‘System.Data.DuplicateNameException’.
2605 Enhancement to enable Java SSL client authentication. Refer problem
record for more details.
2606 Fix to handle long values in application INI entry ‘DLL directory path' & √
'PNL directory path'.
2607 License removed for all licensed components of CA Plex. √ √
2609 Fix to handle Tabbing focus for CheckBox in few circumstances. √
2610 Fix to handle function call mapping in inherited functions in few √
circumstances.
(024.004) Refresh Pack #1
2555 For Refresh Pack deliverables, see Refresh Packs. √
(024.003)
2528 Fix to handle Java generator to avoid generating unreachable code √
which leads into compilation error - “unreachable statement”.
2529 Fix to save Action Diagram (AD) statement permanently while √
deleting AD statement like Call/Comment within multi-level & version
environment.
2531 Fix to handle WinC application error 'The Parameter is incorrect' followed √
by application crash if using IBM-I profile name with length of 10.
2533 Fix to handle duplicate field label and edit control in inherited function. √
2534 Fix to avoid Plex IDE crash while accessing ActiveX properties. √

17
CA Plex 7.2.1

Problem / Issue Number Description Tool

2535 Fix to avoid memory build-up while casting between fixed decimal & √
double.
2536 Fix to avoid IBM-I dispatcher error – ‘spawn() failed. Storage allocation
request failed.
2537 Fix to clear ComboBox with ‘++set empty’ meta code, if ComboBox
selected item gets re-selected.
2538 Fix to handle data exchange properly within WinC runtime and ActiveX √
control. This is being controlled by application INI.
2539 Fix to invoke correct WinC selector function. √
2540 Fix to handle Java Grid’s vertical/horizontal scrolling properly.
2541 Fix to handle tabbing within ActiveX control hosted on a panel. √
2542 Fix to store correct value in database with SQL field as Numeric & C √
Format Fixed_Decimal.
2543 Fix to save Action Diagram parameter overriding in higher level/version. √
2544 Fix to avoid WinC application crash with Home, Delete, or arrow keys. √
2545 Fix to handle Panel layout generation correctly irrespective of panel √ √
loading at design time before generation. This occurs in a few
circumstances.
2546 Fix to refresh Java grid header for horizontal scroll.
2547 Fix to show full text for static control on Java panel. If static text starting
with letter ‘W’ having font ‘MS Sans Serif’ & size ‘8’ – left side of
character ‘W’ gets partially visible.
2548 Fix to launch WinC function from Plex IDE without creating EXE. √
2549 Fix to include Server function(s) within Server package while running √
packager tool.
2550 Fix to keep backward compatibility for WinC application DPI awareness √ √
compared to an earlier release of Plex. Plex r7.2 WinC application works
fine with 150% DPI but Plex r7.2.1 built application fails. This requires to
re-create EXE for required function.
2551 Fix to handle RPGIV generator to generate compiler directives correctly √
defined as part of the custom source code object. For more details, refer
problem record.
2552 Fix to handle Java runtime exceptions correctly to avoid resource leaks.
For more details, refer problem record.
(024.002)
2476 Fix to handle Grid save placement changes, when there is a change in
grid design, for example, new column added to the grid.
2479 Fix to handle date input with MFC Native control. For more details, refer √
problem record.
2490 Fix to handle Tabbing while moving focus to child panel. √

2491 Fix to handle programmatic sort with WinC editable grid. √

2492 Plex template Build file (PLEX.BLD) updated with an entry for EJB √
interface type selection.
2493 Fix to avoid throwing an exception in EJB within remove method. √

18
CA Plex 7.2.1

Problem / Issue Number Description Tool

2494 Fix to improve performance with Code library wizard. √

2495 Fix to raise record switch event for manual grid sorting. √

2496 Fix to save WinC Build option - “Header Directories” under “Pre-Build C+ √
+ Libraries” section in the model build file.
2497 Enhance DDS generator to avoid generating a field with Exist property √
set to No.
2499 Enhancement to define higher precedence of triple FNC located on NME √
over PKG located on NME. For more details, refer problem record.
2500 Fix to handle WinC application GPF in Win Widget control with cursor √
keys.
2501 Fix to show correct field edit mask color for both single instance and grid
region in Java.
2502 Fix to avoid compiler error “C2181: illegal else without matching if √ √
‘Generate for Action Diagram debugging’ is enabled.
2503 Fix to handle tabbing within child panel. √

2504 Enhance Java exception reporting for ObApplication.handleException


method.
2505 Fix to handle meta variable replacement correctly. √

2506 Fix to report warning message when using numeric field with decimal √
places with a Use statement.
2507 Fix to handle RPG generator crash while generating a function with large √
call graph.
2508 Fix to address the C++ COM connector build failure. √ √

2509 Fix to handle tabbing issue with editable Grid combo box. √

2510 Fix to handle Tabbing issue with FrameChild functions with property “Tab √
From Parent" is set to "Yes".
2511 Fix to handle Plex Java generator GPF with a function which has moved √
to a new package structure.
2512 Fix to handle CheckedTimeISO field to insert user-defined date into
database, e.g., source code object. For more details, refer problem
record.
2513 Fix to handle Fixed decimal parameter casting within WinNTC ExecSQL
statement. For more details, refer problem record.
2514 Fix to improve parameter mapping's for function Call, API CALL, √
Message, and so on, in multi level/version environment.
2515 Fix to not loose field local property in multi level/version environment √
while saving the changes. For more details, refer problem record.
2516 Fix to resolve inherited attribute property correctly. √

2517 Fix to handle scrolling properly to show located row in a grid.

2518 Fix to validate the input before converting a large scientific number into a
string.
2519 Fix to process grid manual sorting to update the grid’s internal states
properly.

19
CA Plex 7.2.1

Problem / Issue Number Description Tool

2520 Fix to avoid application freezing in few circumstances when closing the
Dialog window using a close button.
2521 Fix to show objects from the main package and when there is sub √
package.
2522 Fix to handle Long Double assignment to Fixed decimal in a few √
circumstances.
2523 Fix to handle Java Grid page down/up events to scroll grid rows properly.
2524 Fix to improve performance while trimming the space within a string field.

2525 Fix to improve memory footprint within CodeJock ActiveX control usage. √

2526 Fix to improve CodeJock active control handling within WinC runtime. √

(024.001)
2448 Fix to highlight the MFC checkbox control on set focus. √

2463 Fix to handle date field input validation.

2464 Fix to handle Plex GPF in a model editor with space bar key. √

2465 Fix to avoid Plex C++ generator crash in few circumstances with a √
conditional block.
2466 Fix to avoid firing select event in Grid Reload. √

2467 Fix to handle casting (numeric-char) correctly with a different locale.

2468 Fix to suppress the import informational message XIE59844. √

2469 Fix to terminate EJB properly after execution completes.

2470 Fix to C# runtime to avoid showing window in a minimized state.

2471 Fix to provide AllowDefaultWindowLoadOrder C# configuration


(<app>.exe.config) property to change the load order of windows to
avoid application loading exceptions.
2472 Fix to save Panel element (fields) positions correctly in a few √
circumstances.
2473 Fix to provide Plex.INI option to control EJB Local v/s Remote interface √
generation. For more details, refer problem record.
2475 Fix to avoid NullPointerExcetion exception while logging errors.

2477 Fix to avoid WCF Service Generator import problem. For more details, √
refer problem record.
2478 Fix to avoid Plex C++ generator GPF in few circumstances. √

2480 Fix to avoid generating junk characters for C# function of type OBASE/ √
Check status.
2481 Fix to generate Post-build events correctly for C++ functions. √

2482 Fix to enable Trigraph support with C++ functions. By default, Trigraph √
support is no enabled with Visual Studio 2013.
2483 Fix to assign date value through C# source code object.

20
CA Plex 7.2.1

Problem / Issue Number Description Tool

2484 Fix to avoid Panel freeze after returning immediately after selecting a
date from date picker.
2485 Fix to avoid Plex IDE GPF while expanding C# package object. √

2486 Fix to improve group model extract/update performance. √

2487 Fix to improve the performance of Action Diagram copy/paste, drag/drop √


operations.
2488 Fix to update 'FIELDS/WizardCaption' message object in Fields Pattern √
library to have similar message text across all language variants.
2489 Fix to avoid Plex GPF in dragging Java function (having implementation √
name more than 30 characters) into Gen & Build window.

21
CA Plex 7.2.1

Release Information
This section discusses the new and updated features, information to upgrade the product from previous releases, and
published fixes.
More Information
• New and Updated Features
• Upgrading from Earlier Releases
• Published Fixes
• Fixes Included in this Release
• Known Issues
• Third Party Acknowledgments
• International Support
• Documentation

New and Updated Features


This section documents the new and updated features for the current release of CA Plex:

Visual Studio 2013 Upgrade - Plex IDE, WinC and WinNTC


Plex IDE and WinC, WinNTC runtimes has upgraded/built with Visual Studio 2013.
As this is huge compiler upgrade, it was not possible to maintain backward compatibility due to huge difference in C run-
time across compilers used.
Considering this upgrade:
• No WinC/WinNTC run-time backward compatibility.
• Run-time version string has changed to 721 from 600. E.g. Plex binary Ob600lc.dll is now named as Ob721lc.dll.
• Need regen/rebuild for WinC/WinNTC objects.
Plex WinC/WinNTC variant have the following as prerequisites:
• Visual Studio 2013 Professional with Update 5
• Multibyte MFC Library for Visual Studio 2013

Note: For C++ application deployment – refer Product local help system (CHM files) topic ‘ Deploying Windows C++
Clients ’ along with following considerations.
• Plex run-time version string changed to 721 from 600, make sure to consider the binary name as per new version
string – e.g. Ob600lc.dll becomes Ob721lc.dll, and so on.
• Install Visual Studio 2013 redistributable package for Microsoft Visual C++ libraries.

EJB 3.x support


CA Plex now provides support for the most current release of EJB. As part of this release we dropped support for EJB 1.x
and 2.x as they are deprecated.
Generated EAR file from Plex can be deployed on any application server that supports EJB 3.x.
Plex EJB connector must have the following as prerequisite:

22
CA Plex 7.2.1

• Reference implementation of EJB 3.x (GlassFish) must be available to compile the generated sources.
• J2EE application server that supports EJB 3.x for deployment.

There is a new property "EJB Remote Interface" introduced in BLD file to control the EJB interface type generation.
Following property needs to be added/updated in local model build configuration file (.bld) accordingly.
If EJB Remote Interface property is set to 0 then EJB interface would be of type Local and if the option is set to 1 then
EJB interface would be of type Remote.

[Options]
EJB Remote Interface=0 | 1

Java Client Testing tool support


With this release Testing tool support has been extended to Java variant. Now this feature is available with WinC, C# and
Java variants.
QA automation tool such as HP QTP can work with Plex generated Java client functions and can also run recorded
project/scripts repeatedly using unique name (name) property against controls.

.Net framework upgrade to 4.6


CA Plex .Net run-time have been upgraded to .Net framework 4.6. All Plex generated .Net applications will be based
on .Net 4.6.
The application includes .Net client/server, WCF generator, Packager tool, Code Library Wizard, Management Console
etc.
To run Plex r7.2.1 generated .Net application the prerequisite would be:
• .Net Framework 4.6 along with Targetting pack
Note:
• Windows 10 comes with .Net Framework 4.6.1 as a default. This will prevent .Net Framework 4,6 installation as higher
version is already installed.
• On Windows 10, we may get warnings related to the processor architecture as Plex .Net runtime is based on .Net 4.6
and the machine has 4.6.1. We can ignore these warnings.
• To debug Plex C# generated application with visual Studio 2013 where .Net Framework 4.6.1 is installed, make sure
you have appropriate .Net Framework targeting pack installed.

Support for SQL Server 2014


CA Plex now provides support for the most current release of SQL Server Database. For more information about the
supported versions of SQL Server Database, see the CA Plex Support Compatibility Matrix.

Java 1.8 support


CA Plex now supports Java 1.8. The installation has updated version of Apache ANT 1.9.4 which is based on Java 1.8.

Windows 10 support
CA Plex now provides support for the most current release of Windows Operating system. For more information see the
CA Plex Support Compatibility Matrix.
Note: As per the Microsoft compatibility matrix, Windows 10 is not certified Operating System for Visual Studio 2013.
CA Plex is certified with Windows 10 with Visual Studio 2013 Professional (Update 5).

23
CA Plex 7.2.1

Following internal testing in CA QA labs, there were no installation issues with Visual Studio 2013 Professional
(Update 5) and Plex QA regression suite was successful.

Features Removed from CA Plex r7.2.1


The following feature has been removed from this release:
• EJB 1.x and 2.x support
• Bookshelf is no more being shipped as part of the product. This CA Plex Documentation site displays the most current
information.

Upgrading from Earlier Releases


It is possible to upgrade a local model from an earlier release simply by opening it with the later release. This is often
useful for testing purposes, however as described above this is not the recommended approach for a formal release
upgrade.
This section includes the following topics:

Before You Begin


Before upgrading, seeBroadcom Support for additional information or fixes that may have been made available after this
content was published.
Multiple releases of CA Plex and its generated applications can be installed on the same machine. For example, CA Plex
r7.2.1, r7.2, r7.1, r7.0, and r6.1 can be installed and run on the same machine.

Group and Local Model Upgrade


It is a good practice to update local models to the group model regularly. Therefore, we recommend that you update the
group model and make offline backups of all group and local models before you start the upgrade. Then create new local
models (and build files) after upgrading the group model to the new release.
All group models and associated library models must be upgraded at the same time.
Logging in to a group model causes it to be upgraded to CA Plex r7.2.1. Thereafter, once you save the group model, you
will not be able to access the model with a previous release. For this reason, it is necessary for all developers in your
work group to upgrade to the new release of CA Plex at the same time. Two developers cannot work on the same model
simultaneously if they are using different releases of CA Plex.

Local Model Upgrade


It is possible to upgrade a local model from an earlier release simply by opening it with the later release. This is often
useful for testing purposes, however as described above this is not the recommended approach for a formal release
upgrade.

Upgrading from CA Plex r6.0, r6.1, r7.0, r7.1 and r7.2


This section explains upgrade requirements related to upgrading from r6.0, r6.1, r7.0, r7.1 and r7.2.

Windows C++ Functions Upgrade Requirements


When upgrading from CA Plex r6.0, r6.1, r7.0, r7.1, r7.2 to CA Plex r7.2.1 you do need to regenerate and recompile
existing C++ functions.

24
CA Plex 7.2.1

New Runtime .INI Search Path


To better support Windows Vista security requirements and multi-user deployments, the algorithm that the WinC runtime
uses to locate and create runtime .INI files has been changed.
Review these changes carefully, especially, if you have developed custom .INI file handling or deploy CA Plex applications
in server-based multi-user environments.

Typical Example
In a typical end-user environment, your applications are installed in the Program Files folder including an .ini file. The files
in Program Files are read‑only for standard users.
When the Plex WinC application starts, it searches for a writeable .INI file. If the file is not found, a new .INI file is created
in the end-user’s personal folder (My Documents on Windows XP, or Documents on Windows Vista). The .INI file is
located in a sub-folder with the same name as the executable. For example, MyApp.exe would have the .INI file "My
Documents\Myapp\Myapp.ini"
Therefore, in this example, each standard user who runs the application will have their own copy of the application’s .INI
file.

.INI File Algorithm


The full set of rules is set out below and provides flexibility for other deployment scenarios dependent on the access rights
of the user who runs the application:
If a Plex generated executable is called app.exe, then the respective .ini file will be app.ini.
At run time, an application app.exe searches for an app.ini file as follows:
1. In the same directory where the executable (app.exe) is located. If app.ini file is found there and has read/write (RW)
access then the executable app.exe uses it.
2. Otherwise, the app.exe searches in the local user \Documents\app\ directory (where app is the name of the
executable). If the file app.ini is found there and has RW access, then the executable app.exe uses it.
3. Otherwise, the executable uses the PATH statement to locate an app.ini file that has RW access.
4. If such an app.ini file is still not found, then the executable app.exe creates a new app.ini file inside the local user
\Documents\app directory with RW access. This new app.ini will be a copy of the first read-only app.ini found, or, If not
found, a blank app.ini is created.

Java, C# and RPG Function Upgrade Requirements


When upgrading to CA Plex r7.2.1, it's not mandatory to regenerate or rebuild existing Java, C# or RPG functions.
Notes:
Considering Java 1.8 support - you can use 1.8 compiler to regen/rebuild the Java functions.
Considering C#, to use .Net Framework 4.6 across Plex built application and Plex runtime - require regen/rebuild.

.NET Server Runtime Upgrade Considerations


The following sections explain the NET Server Runtime upgrade considerations - Version Property.
Unless you have a specific technical reason, the Version property for the .NET listener must be left blank. The value of
600 or 610 must be deleted if it is present.
At CA Plex r7.1, if this property is empty, the default version number from the Plex .NET runtime is taken.
The Version property is provided for backwards compatibility reasons. For example, to use r6.0 WinC clients to connect to
the r7.1 version of .NET runtime, you must set this property to 600.

25
CA Plex 7.2.1

Upgrading from CA Plex r5.5


This section explains upgrade requirements related to upgrading from r5.5 (including r5.5 SP1).

Windows C++ Functions Upgrade Requirements


Windows functions (WinC and WinNTC) created with CA Plex earlier releases must be recompiled to be compatible with
the CA Plex r7.2.1 C++ run‑time system.
A single Windows application cannot contain DLLs created with different releases of CA Plex. CA Plex includes a run-time
version check whenever a generated DLL calls another. A run-time error occurs if you attempt to make a call between
DLLs created with incompatible releases. In your development environment, you need to rebuild all of your application
DLLs when you move from CA Plex r5.5 or earlier up to CA Plex r7.2.
For more information about run-time applications, see the Running Applications Created with Different Versions of CA
Plex in the online help.

COM Import Upgrade Considerations


If you have used the COM Component Import feature, CA recommends that you reimport and regenerate the imported
COM packages as part of the release upgrade process. This is due to fixes and improvements to the COM import and
wrapper generation processes at this release. You may need to revise the wrapper attributes of the package before it
compiles. Note the following:
• The COM Component Import wizard provides an option Do not overwrite existing package. However, clearing this
option is not appropriate for upgrading previously imported COM packages.
• An alternative is to delete the COM package object before running COM Component Import. However, this
will invalidate existing action diagram statements that reference the COM package.
To avoid these limitations, the following upgrade procedure is recommended:
1. Create a new group model and attach the COMPONENT library.
2. Extract a new local model and use the COM Component Wizard to import a new COM package for component you
need to upgrade.
3. In Object Browser, right-click the COM package and select XML Import from the Tools menu. Export the package to a
named XML file.
4. Open a local model containing the COM package that you need to upgrade.
5. From the Tools menu, select Import and then XML Import. Select the Clear option and then import the XML file you
created earlier.
The above procedure will upgrade the COM package while preserving existing action diagram code.

Java Functions Upgrade Requirements


This section discusses the upgrade requirements for Java functions.

Upgrading from CA Plex r5.5 SP1


You do not need to regenerate existing Java functions if you are upgrading from r5.5 SP1 (Build 5.5.93).
The CA Plex r7.2.1 Java run time (obrun.jar) is backwards compatible with earlier releases. You can use the new runtime
with functions created at r5.5 and previous releases. This enables you to take advantage of fixes and improvements in the
new runtime without necessarily upgrading to the full CA Plex r7.2.1.

26
CA Plex 7.2.1

Upgrading from CA Plex r5.5


If you regenerate a Java function at CA Plex r7.2.1, then you must also regenerate all other 5.5-generated functions
in the call graph of that Function. This is due to changes in the parameter formats at CA Plex r5.5 SP1 and later. We
recommend a full regeneration and recompilation of all Java functions when upgrading from CA Plex r5.5 (Build 5.5.63) or
previous releases. This reduces the number of generated classes and identifies any source code objects that need to be
modified for compatibility with the new format of generated Java code.
NOTE
This Java regeneration and rebuild requirement is only required when upgrading from CA Plex r5.5 and
earlier. CA does not anticipate that future releases of the Java generator will have this requirement. No such
requirement exists if you are upgrading from r5.5 SP1.
If you want to use the CA Plex r7.2.1 Java run time (obrun.jar) with a CA Plex r5.5 Java application, you need to have
these settings in your ob600xxx.properties file:
Version=721
SPVersion=0

Java and C# Exec SQL Action Diagram Source Code


In CA Plex r7.2.1, r7.2, r7.1, r7.0, r6.1, and r6.0, the Java and C# generators generate all Exec SQL statements as
prepared statements by default. The SRC SQL statement type SYS triple can be used to indicate source code objects that
must not be generated with prepared statements.
Generating prepared statements may improve performance and scalability in cases where the same SQL statement is
executed repeatedly. However, the results may also depend on application and DBMS-specific factors. CA recommends
benchmarking with different values for SRC SQL statement type SYS for determining the optimum setting in each case.
Also, generating prepared statements assumes that all parameters to the Exec SQL statement correspond to columns
in a table. This assumption is not always true because the Exec SQL statement can be used to implement a wide variety
of SQL code. The SRC SQL statement type SYS triple can be used to indicate source code objects that should not be
generated with prepared statements. When upgrading Java applications from r5.5 or earlier, it may be necessary to add
such triples to some source code objects to avoid errors.
This change does not affect Exec SQL usage with C++.

Java and Oracle varchar null support


Java applications that target the Oracle database and use optional varchar fields may behave differently after upgrading
from r5.5 or earlier. Depending on how the varchar is modeled in Plex, unexpected optimistic locking errors may occur
after upgrade. For example:
"Instance of .... changed by another user"
The typical solution is to add FLD null VAL triples to the varchar field where the target value is empty. For more
information, search the CA Support Online web site for problem CPLEX 1296.

Java Source Code When Upgrading from CA Plex r5.5


The Java source code you entered into source code objects in your model may need to be modified. This is because of
the changes in the structure of the Java classes created by the generator at CA Plex r5.5 SP1. The source code objects
supplied in CA’s pattern libraries (such as the JAVAAPI library) are already modified. Re-extract from the shipped JAVAAPI
library before regenerating and compiling with CA Plex r7.2.1.
Problems in Java source code result in an unexpected type error at compile time. For example:
C:\GENJAVA\MyFunction_ObFnc.java:line number: unexpected type

27
CA Plex 7.2.1

required: variable
found : value

To fix such problems use the assign method instead of the = operator.
Prior to r5.5 SP1, you could use the operator = to assign the return value of a method to an output parameter of your
source code API. For example:
&(4:) = anyMethod(&(1:), &(2:), &(3:));

From r5.5 SP1 onwards, the code in the previous example needs to be modified to include the assign method instead of
the = operator, as follows:
&(4:).assign(anyMethod(&(1:), &(2:), &(3:)));

Windows Application Server Environment Settings


The registry keys for the CA Plex Windows Application Server environment settings have changed because of the
rebranding from Advantage to AllFusion.
The CA Plex r7.2.1 installation program automatically copies pre-existing environment settings to the new key values.
However, if you do not see the copied settings in the CA Plex Windows Application Environment Manager, execute the
migration2.exe program (in the AppServer\Bin folder).
Note: No parameters are required to execute the migration program.

RPG Functions Upgrade Requirements


You do not need to regenerate or rebuild existing RPG functions when upgrading to CA Plex r7.2.1.

Build (.BLD) File Compatibility


As discussed earlier, it is recommended that you create new local models, and therefore new build files as part of the
upgrade process. If you use an old BLD file with CA Plex r7.2.1, CA Plex sends an error message (E-BLD-1777) each
time you open the Generate and Build window. If you want to continue using the old BLD, review your Generate and Build
Options to ensure they are compatible with CA Plex r7.2.1.
Pre 7.0 build files will cause the Build Directories section of the Generate and Build Options to be displayed using the
AS/400 brand name instead of System i.
To prevent the error message being displayed you can add the following entry to the BLD file:
[Options]
Release=721

Long File Names Not Truncated By Default


The Name Allocation option called Truncate Long File Names at Generation is no longer switched on by default. This
means that the file names longer than 8 characters will no longer be truncated unless you explicitly select this option. This
may have an upgrade impact if your model contains names that were truncated at previous releases.

Upgrading from CA Plex r5.1


The following sections provides the upgrade requirements related to upgrading from r5.1

Inheritance Resolution Changes in CA Plex r5.5


At r5.0 of CA Plex, the inheritance engine was changed to address limitations and bugs in inheritance behavior. Additional
changes were also made to support the new Dependency Browser in r5.0. For some customers, these changes caused

28
CA Plex 7.2.1

significant problems when the time came to upgrade to the new release. CA Plex r5.1 included some fixes for these
problems, but some significant problems remained.
CA Plex r5.5 resolves the known bugs in the inheritance engine. No changes were made to the inheritance engine
between r5.5 and r5.5 SP1. There are differences in inheritance engine behavior compared to earlier releases that will
impact some customers. In the following sections three different cases are described.

Case 1: Multiple Inheritance Call Resolution


In some cases inherited function calls may be resolved differently in the action diagram with the result that a different call
is created in the generated code. In a typical model, this only affects a very small percentage of functions (if any). These
cases can be identified through testing of the generated application, comparisons of generated source, or comparisons of
action diagram code. If you require further assistance in identifying such problems, contact CA Technical Support.
You can resolve these problems by adding the appropriate replacement triples to return the function to its required
behavior. Ideally such triples can be entered in your standards layer model, thus minimizing the amount of changes
required.

Background
CA Plex r3.5 introduced support for multiple function inheritance by changing the behavior of the FNC is a FNC verb.
As a result, even existing CA Plex functions could inherit from more than one function without keying any extra triples.
Another consequence of this was to allow two or more different inherited Calls triples to be Visible in the Object Properties
corresponding to the same original action diagram call. Only one call is appropriate in any inheriting action diagram and
CA Plex determines which of the available functions should actually be called when it is loaded.
Prior to r5.0, CA Plex did not explicitly handle such action diagram calls. As a result, the resolution of the call did not
always follow the usual rules of the inheritance engine. At r5.0 and later a mechanism was put in place to handle such
calls. This mechanism has been refined a number of times, most recently at r5.5.
Example 1: The Filter Pattern
A common example of multiple inherited action diagram call can be seen in instances of the Filter.FilteredGrid function.
Consider these triples:
EditDetailFilter is a ENT STORAGE/RelationalTable
EditDetailFilter is a ENT FOUNDATI/EditDetail
EditDetailFilter is a ENT FOUNDATI/Filter
EditDetailFilter.Edit replaces FNC UIBASIC/Grid
...by FNC EditDetailFilter.FilteredGrid

When you look at the calls for the EditDetailFilter.Edit you will see calls to two different BlockFetch functions:

Note that both calls are visible (the Vis column is checked). You can see this same behavior in r5.0 and r5.1. So which
BlockFetch is actually called in the action diagram? This determination is made at action diagram load time. The result
is sensitive to changes in the inheritance engine in recent CA Plex releases. The intention is that the Filter.BlockFetch
should be called. To get this result at r5.5, CA has entered an additional replacement triple on the FOUNDATION pattern
library:
FOUNDATI/Filter.FilteredGrid replaces FNC UIBASIC/UIBasic.Grid.BlockFetch
....by FNC FOUNDATI/Filter.Filter.BlockFetch

29
CA Plex 7.2.1

Previously, the BlockFetch function was not explicitly replaced. Instead the replacement was made only on the scoping
view:
FOUNDATI/Filter.FilteredGrid replaces VW UIBASIC/UIBasic.Grid
...by VW FOUNDATI/Filter.Filter

With the revised algorithm used in CA Plex r5.5, this was not sufficient to force the required function replacement to occur.
By adding an additional, explicit replacement on the BlockFetch itself, CA has been able to retain the required behavior in
r5.5. Similar actions may be necessary in your own functions that exhibit this behavior.
Example 2: Diamond Inheritance
Consider the following set of triples:

This type of scenario is known as diamond inheritance due to the shape of the resulting inheritance hierarchy as follows.

The inheritance hierarchy starts at An Entity, diverges, and then the two branches are brought back together at Our
Entity. This situation is quite complex but the examples in real customer models are often even more complex with further
branches and layers of inheritance involved.
NOTE
If you view the Object Properties for the function Our Entity.Our Function then you can see the two calls triples,
both visible. There are two important points to note:

30
CA Plex 7.2.1

• There is only one actual action diagram Call explicitly entered in this set of functions but two possible calls were
resolved in Object Properties
• This scenario can be reproduced in any CA Plex release from 3.5 onwards

The only way to determine which function is actually called is to examine the action diagram code. This example again
shows the changes in the inheritance engine over recent releases: At r5.0, Our Entity.Your Validation Function is actually
called, but in all other releases including r5.5 it is Our Entity.Our Validation.

Case 2: Changes to Sequence of Parameters


In some cases the sequence of inherited parameters on a generated function call may change compared to earlier
releases. In many cases, such changes have no negative consequences since all functions concerned are regenerated in
the course of upgrading to the new release. However, there are cases where such changes may be significant:
• If you are exploiting the backwards compatibility of existing RPG and Java functions, then this change may require that
additional functions be regenerated
• If you have hand-coded programs that integrate with programs generated by CA Plex, then those hand-coded
programs may be modified to take account of the revised parameter interface
These cases can be identified by testing the generated application, comparisons of generated source, or comparisons of
action diagram code. If you require further assistance in identifying such problems, contact CA Technical Support.

Case 3: Changes to the Sequence of Events, Subroutines and Collection Points


The sequence of inherited Event constructs and Subroutines can be altered compared to previous releases. Changes to
the sequence of Subroutines have no negative consequences for the generated application. In general, this is also true
for Event constructs. However, the sequence of Events may be significant if you referenced the same logical event on
multiple Event constructs or used an unqualified Event construct. For example:
Events Handler
Event
//unqualified event triggered for every event
Go Sub Generic Event Processing
Event Delete
Go Sub Delete Processing
Event Delete
Go Sub More Delete Processing

If the previous sequence of Event constructs is different, then the behavior of the generated application will change. In
practice, this functionality is rarely exploited and it is even rarer for the inheritance engine changes to cause significant
differences in the sequence. As in other cases, such problems can be identified through testing of the generated
application, comparisons of generated source or comparisons of action diagram code.
In principle, similar considerations apply to the sequence of inherited code blocks in Collection Points (Pre and Post
Points). Testing by CA has not revealed examples of such results but you should be aware that the possibility exists.

31
CA Plex 7.2.1

Upgrading from CA Plex r5.0


In addition to the upgrade requirements documented in the earlier sections, review the following sections when you are
upgrading from r5.0.

MFC Native Controls in Windows Clients


In r5.0 and later, CA Plex supports two sets of GUI controls in Windows clients. By default, WinC applications use MFC
controls for all types of controls, except the grid. The alternative set of GUI controls is called Winwidgets, which was the
default before r5.0.
There are advantages and disadvantages associated with each set of controls. Winwidgets controls have been used in all
releases of CA Plex since 1.0. Consequently, they represent a mature technology that has been implemented successfully
for many years by many CA Plex customers. When upgrading from an earlier release of CA Plex, it is often simpler to use
the Winwidgets controls since this is likely to minimize any backwards compatibility problems.
MFC controls provide a range of advantages including:
• Compatibility with third-party testing tools
• Windows standard look and feel
• Access to the MFC API for low-level control

Backwards Compatibility Options


With some exceptions (see the following section), all the functionality previously available with Winwidgets controls should
also be available with the MFC controls. However, to safeguard against unexpected upgrade issues, run-time options are
available that enable you to revert to the Winwidgets controls.
A separate option is available for each type of control:
[NativeControls]
;GUI controls either display as MFC controls (1) or Winwidgets (0).
;These settings have no effect on the WinC grid which is always Winwidgets
ListBox=1
SpinButton=1
SingleLineEdit=1
SingleLineEditNumeric=1
MultiLineEdit=1
ComboBox=1
RadioButton=1
CheckBox=1
PushButton=1
Statics=1

Set the required option to 0 if you want to revert the control concerned to Winwidgets. The MultilineEdit setting is an
exception -- Setting this value to 0 invokes an earlier implementation of the native control as Winwidgets do not provide a
multi-line edit control.
NOTE
Report any undocumented upgrade issues to CA Technical Support.

Upgrade Issues with MFC Controls


Known upgrade issues are listed below. Report any undocumented upgrade issues to CA Technical Support if they cause
a problem in your application.

32
CA Plex 7.2.1

• Disabled text color. When MFC controls are disabled, the text displays in the Windows standard color (typically,
light gray). The Text Color property is ignored when controls are disabled. Note that for edit controls you can use the
combination of properties
Mode=Read-only
and
Disabled=No
to define a read-only edit control that does support the Text Color property.
• Combo box size. Unlike other control types, the size of the edit control portion of a combo box cannot be changed
directly; it is determined by the font size of the text within the control. You can change the size of the edit portion at
design time but it is ignored at run time. Instead, changing the size of the edit portion at design time, changes the size
of the drop-down list at run time.
• Transparency. MFC controls do not fully support transparency. This may change the appearance of panels in cases
where controls overlap.
• z-order. The z-order of MFC controls is reversed compared to the default z-order of Winwidgets controls. This may
impact some panel designs that rely upon overlapping controls.
NOTE
To allow the z-order of design time controls to more closely match the run time, set the Clip Control property to
Yes for each control concerned. This is useful when working with overlapping controls such as a frame within a
frame.

Calling Java Functions


As of CA Plex r4.5, when calling Java functions from the command line or from hand-coded Java, the function name must
be prefixed with its package (package.func).
Note that at CA Plex r5.0 Service Pack 1 and later, there is a PackageList .properties file entry that can be used to provide
a list of packages that are searched if no package is specified within the call. Typically, a function’s package is generated
directly into the code for each function call. However, this may not be the case in a dynamic partitioning scenario. For
example, at generation time the target of a function call could be a Windows function (in which case no package will be
included in the generated call). At run time, if the target function is switched to Java then the PackageList can be used to
locate the function.

Upgrading from CA Plex r4.5


This section explains upgrade requirements related to r4.5.

Inheritance and Property Resolution Changes


CA Plex r5.0 and later includes enhancements to the inheritance engine that may change the properties of inherited
objects in some circumstances.

Replacing the Target of an Inheritance Triple


Consider the following example:
A is a B
B is a C
A replaces C by D
When B is a C arrives on A, A no longer inherits from C, as B did, but it now inherits from D.
In previous releases, anything inherited from D, which is in contention with that inherited from B, defers to the version
inherited from B. In r5.0, anything contentious inherited from D takes precedence over things from B which arose from its

33
CA Plex 7.2.1

inheritance from C. In other words A is a D takes precedence over A is a B and B is a C. This result is now consistent
with the general rules of inheritance, where later triples take precedence over earlier triples.

Triples for the Same Property That Have Been Entered at More Than One Level
It is possible to duplicate triples for an object by entering a triple, changing configuration to an earlier level and entering
the same property. For example:
A type Character (Level 3)
A type Numeric (Level 1)
With the configuration set to the later level (Level 3 in the example) both triples would show in the Model Editor prior
to r5.0 and are passed on to the inheritance engine. The last triple in sequence (as seen in the Model Editor) takes
precedence. So in the previous example, A would be Numeric.
In CA Plex r5.0, the later hides earlier principle is applied to the levels and only A type Character is seen in the Model
Editor and passed on for inheritance.

Meta-Variables in RPG Internal Functions and OBASE/Set Current Date and Time
At r5.0, a fix was added so that internal RPG functions now have their own meta-variable space, and no longer share the
meta-variable space of their calling functions. This change is in accordance with the published functionality regarding the
scope of meta-variables (which states that a meta-variable’s state only persists on calls to functions of type Meta) and is
consistent with other generators.
This fix highlighted a place within the class libraries where meta-variable state information was expected to pass from
an external function to an internal function. It was calling the OBASE/Set current date and time function in the OBASE
variants AS400 5250 and Windows/AS400.
NOTE
OBASE/Server Set current date and time is a new function used with RPG400. It is recommended that you call
this function instead of the OBASE/Set current date and time function with OBASE set in the Windows/AS400
variant and OBDATE set in the Windows client variant. This is exemplified in the call change in OBASE/Audited
entity.Set audit fields.
To assist customers in tackling any upgrade issues associated with this fix, the following Plex.ini file option can be used in
CA Plex r5.1:
[RPG Generator]
Share Meta-Variables With Internal Functions=1

An entry of 1 reverts to pre-r5.0 behavior. If no entry is present, the default setting of 0 is used, providing the same
behavior as r5.0.

Use of Single Quote Character in Java Messages and Source Code


The Java Generator at CA Plex r4.5 and earlier required two single quote characters ('') to be used in messages and
source code and required a single quote to be used at run time. For example, this was required when embedding
parameters in the source code for use with the Exec SQL statement. This behavior was inconsistent with other
generators.
This problem was corrected in CA Plex r5.0. Now only a single quote character (') is required. However, any existing
messages or source code that used the previous workaround need to be edited when upgrading to r5.0.

Use of Backslash Character in Values for Java


The Java Generator at CA Plex r4.5 and earlier required that two backslash characters (\\) be used in values whenever
you required a single backslash character to be used at run time. This behavior was inconsistent with other generators.

34
CA Plex 7.2.1

This problem was corrected in CA Plex r5.0. Now only a single backslash character (\) is required. However, any existing
values using the previous workaround will need to be edited when upgrading to r5.0.

Upgrading from CA Plex r4.0


This section explains upgrade requirements related to r4.0.

Replacement and Scoped Objects


CA Plex r4.5 introduced a change to the resolution of replacement triples attached to scoping objects to provide better
control over replacement and performance improvements. This fix is not enabled by default. It requires a setting to be
added to the Plex.ini file because it can cause significant backwards compatibility issues when it is enabled. For a full
discussion, search the online help for the topic Replacement and scoped objects.

Upgrading from CA Plex r3.5


In addition to the instructions in Upgrading from CA Plex r4.0, review the following sections.

Change of Behavior with For Update Option


In r4.0, the behavior of the For Update option on Position and Fetch action diagram statements was changed to support
pessimistic concurrency. It is possible that these changes may significantly change the behavior of ODBC-based
applications (including NT BackOffice applications). For more information about backwards compatibility options, see the
topic Row Locking in SQL Implementations in the online help.

Change in CONCAT Operator in C++ Code


The documented behavior of the CONCAT operator is that trailing blanks are removed from field values. In practice, it
was possible to retain trailing blanks in C++ functions in cases where the values concerned were not displayed on panels.
This inconsistency was corrected in CA Plex r4.0 in that trailing blanks are now removed in all cases. The recommended
technique for including blanks in concatenated strings is to use the Format Message statement with the blanks embedded
in the message.

Avoiding Run-Time Level Checks When Accessing the System i Field Values File
The YOBDDL program resides within the CA Plex library on the System i. When building the System i Field Values File
within CA Plex, a copy of the YOBDDL program is created in the System i Object Library. This copy is called YOBVALSV.
A copy is not made if YOBVALSV already exists.
The YOBDDL program was modified for r4.0 of CA Plex. For this reason, the old versions of YOBVALSV need to be
deleted from each of your System i Object Libraries. Enter the following command on the System i:
DLTPGM PGM(Object-Library/YOBVALSV)

The new version of YOBVALSV needs to be placed in to each of the System i Object Libraries. This can be done by
either:
• Rebuilding the System i Field Values File
• Creating a duplicate object by entering the following command on the System i:CRTDUPOBJ OBJ(YOBDDL)
FROMLIB(PLEX) OBJTYPE(*PGM) TOLIB(Object-Library) NEWOBJ(YOBVALSV)
Failure to perform these steps results in a level-check at run time when attempting to access the field values selection list.

35
CA Plex 7.2.1

Dynamic Application Partitioning APIs


If you have used the GetLocationInformation and SetLocationInformation APIs, note that the structure ObLocationInfo was
changed for CA Plex r4.0. If you have created source code objects that implement these APIs, you must edit the code to
avoid compile errors.
The following three fields are removed:
ObLongFld m_fDataConv
ObLongFld m_fObTran
ObCharFld m_ObTranDLL

and replaced with the following single field:


ObLongFld m_iDataConv

See the Odap.mdl sample model for examples of the required source code.

Linker Options in Upgraded Local Models


CA Plex r4.0 introduced a new feature called custom C++ build options. The linker option /OPT:NOWIN98 is used by
default. Without this option the size of compiled DLLs is significantly increased. If your local model was created before r4.0
of CA Plex, this option does not appear by default and should be added manually. For more information, see the online
help topic Customizing C++ Builds.

Loading the Run-Time Property DLL


The source code required to load the run-time property DLL was changed in CA Plex r4.0. If your application uses the
SetProperty API, change the source code that loads the run-time property DLL, as follows:
#ifdef _DEBUG
ObPropertyAPI::SetValue(Ob600Prpd.dll,
OB_ATOM_ATOM_INSTALL, 0, 0)
#else
ObPropertyAPI::SetValue(Ob600Prp.dll,
OB_ATOM_ATOM_INSTALL, 0, 0)
#endif

User Data (in BSUPPORT) and Business Contacts (in BCONTACT) Patterns
The functions with panels were moved from the container Services to the container UI in CA Plex r4.0. If you have
previously used one of these patterns in CA Plex r3.5, you must rescope some of these functions inherited from that
pattern. After extracting from the new version of the library, you can see your existing panel functions in the Object
Browser under Services as real (in yellow), and new functions with the same names under UI (not yet real, in gray).
Rescope the existing panel functions by dragging them from the Services function and dropping them onto the UI function.
(Note that the UI function must be made real before doing this.)

Upgrading from CA Plex r3.1 and r3.0


In addition to the instructions in Upgrading from CA Plex r4.0 and Upgrading from CA Plex r3.5, note that CA Plex r3.1
was the last release of CA Plex that supported the creation of 16-bit Windows applications.

36
CA Plex 7.2.1

Upgrading from CA Plex 2.51 and Earlier


You cannot upgrade CA Plex 2.51 or earlier without first upgrading to CA Plex r3.0. Follow the upgrade instructions
published with CA Plex r3.0.

Published Fixes
You can find a complete list of published fixes for this release on Broadcom Support.
Note: To navigate to the Published Solutions section, click Download Center and then select Published Solutions.

Fixes Included in this Release


CA Plex r7.2.1 includes PTF fixes from previous releases. For a complete list of published bugs fixed in each PTF, see the
PTF solutions published on the Broadcom support site.

This section includes the following topics:

Fixes Included from earlier releases

Problem/ Description Tool WinC Win NTC Java .NET IBMi Gen?
IssueNumber
2417 Fix to resolve √
the problem
of multiple
selection
events with
Grid.
2420 Fix to √
resolve focus
problem with
multi line
field.
2405 Fix to disable √
events under
protected
state.
2407 Fix to resolve √
decimal field
edit mask
issue.
2408 Fix to resolve √
Combo
box with
CLEAR and
APPEND.
2410 Fix to make √
Java home
lookup work
for 64 bit
machines.

37
CA Plex 7.2.1

2411 Fix to stop √


overriding
text in Java
Grid cell.
2412 Fix to make √
event linked
with delete
key work for
Java Grid.
2415 Fix to handle √ √
CTDATA
array type
data contains
6th char as P
then skipped
that data.
2418 Fix to √
close child
functions
properly.
2419 Fix to set √
the modified
state property
properly for
Java Grid.
2421 Fix to resolve √
problem with
package
name with
spaces.
Problem/ Description Tool WinC Win NTC Java .NET IBMi Gen?
IssueNumber
2423 Fix to set √
CURSOR
position
properly
when INI
option
"MULTILINE
MARKED
TEXT" is
FALSE.
2424 Fix to √
FindOrAddRealObj
API to find
the specified
object with
provided
scope.

38
CA Plex 7.2.1

2425 Fix to show √


currency
value
correctly.
Please refer
problem
record for
more details.
2426 Fix to make √
check box
in Grid to
fire mapped
events
properly.
2428 Fix to make √
default
generation
package for
in and out
classes.
2430 Fix to make √
grid selection
work properly
with shift key.
2431 Fix to make √
top app
and dialog
windows not
to block.
2433 Fix to resolve √
empty
timestamp
update.
2434 Fix to √
set busy
indicator that
indicates
processing
for WPF
panel.
2437 Fix to √
make initial
selection
work properly
with WPF
Grid.
2438 Fix to make √
DB access
work properly
with internal
functions.
2439 Fix to commit √
cell data with
Up/Down
arrow.

39
CA Plex 7.2.1

2441 Fix to refer √


DATE
EMPTY
value as per
ODBC-DSN
entry.
Problem/ Description Tool WinC Win NTC Java .NET IBMi Gen?
IssueNumber
2444 Fix to make √
packager tool
includes new
objects for
packaging.
2446 Fix to make √
the length
restriction
work with
number field.
2447 Fix to make √
trap control
event work.
2449 Fix to resolve √
scrolling
issue with
WPF Grid.
2450 Fix to copy √
unicode data
from Grid
with (Ctrl+C).
2452 Fix to resolve √
GPF with
CJ Grid
GroupRow.
2432 Fix to handle √
AD Debugger
crash.
2435 Fix to set √
Grid state
correctly.
2440 Fix to √
make Java
Dispatcher
Admin work
as expected
from Web
interface.
2443 Fix to √
make .Net
stored
procedure
work with
SQL Client
interface.

40
CA Plex 7.2.1

2451 Fix to √
avoid Plex
generator
GPF on
generating
control
states.
2453 Fix to √
resolve focus
problem with
Java button.
Problem/ Description Tool WinC Win NTC Java .NET IBMi Gen?
IssueNumber
2454 Fix to make √
commit
control work
properly with
SQL Client.
2455 Fix to work √
Selector
function with
F4 keycode.
2456 Fix to copy √
data from
excel sheet
and paste
into WPF
grid.
2458 Fix to set √
the modified
state properly
for Java Grid
2459 Fix to honor √
grid positions
accordingly
to current
panel
size, while
switching grid
from invisible
to visible
state.
2460 Fix to resolve √
crash with
AD debug.
2391 Fix to avoid √
to lost focus
event twice
in case of
combo box
is the first
control on
panel.

41
CA Plex 7.2.1

2413 Fix to avoid √


metacode
copy failure.
2416 Fix to handle √
CAST
operation
- Fixed
Decimal to
Character.
2457 Fix to √
properly align
the Icons on
push buttons.
2461 Fix to resolve √
generator
crash with
fixed control
ID.

Known Issues
This section describes known issues, workarounds, and solutions for this release of CA Plex. For additional information,
search the Knowledge Base on CA Support Online at http://ca.com/support.

Modification of Internal Tables


Although it is possible to edit internal tables in CA Plex internal tables to add your own object types and verbs, this
feature is undocumented and unsupported. We do not guarantee to support models that have been modified in this way.
We strongly recommended that you do not modify the internal tables in CA Plex in any way.
Similarly, manual editing of any group model table files is also not supported. These table files include the lib.tab file that
contains sensitive data that controls aliasing of group model IDs.

‘Set State’ statement with ‘Site’ control


A site is a region on a panel that displays other panels at runtime. The site is a rectangular frame that exists only as a
location for loading child panels.
To convert a region to Site on a panel, set region Type property to Site. CA Plex sets the Static property of a site to Frame.
Setting the property ensures that the site is visible at design time. The static frame is not generated and it does not appear
at runtime.
Due to this design constraint, Site does not respond to ‘Set State’ change at runtime, for example, resizing the Site.
Therefore, decide the size of the Site at design time to ensure that the child panels fit properly within Site size.

Plex WinC client and Codejock ActiveX control


In few cases, the WinC application hosting Codejock ActiveX Control may not work as expected.
As part of PTF build 002, improved Codejock ActiveX handling within WinC runtime.

Plex COM connector


While using PTF build 002 or earlier, you may have faced problems while building COM connectors. Upgrade to PTF build
002 or higher to avoid COM connectors build problem.

42
CA Plex 7.2.1

WINAPI/TrapPanelEvent
In case of Grid hosted on WinC Panel and there is a Get statement associated with ANY event within Panel Handler,
the current message that is being handled as part of TrapPanelEvent will be overridden by HGRM_GETDATA
(1406/0x57E).This situation forces to never execute the TrapPanelEvent message as GetCurrentMessage API retrieves
HGRM_GETDATA message. As a circumvention, avoid using Get statement for grid region(s) within the Panel Handler
ANY event.

Field Values in Action Diagram (AD) without referencing the Field object
In case of entering literal value in Action Diagram Edit line, Plex searched the entered value across model repository and
resolve with the object value of the field, if found.
For example, Entering 100 into AD edit line i.e. without defining 100 as a value object, Plex automatically changes
the entered value 100 into Int.100 without the field FIELDS/Int having to be present on an AD's local variable but only
because FIELDS/Int has 100 as a defined value.
So, in this scenario only Value Int.100 will be referenced from AD without adding Field/Int to AD's local variable - in this
case doing impact analysis for the value object (for example, Int.100) does not list the function which only references the
field value object, not the field.
We recommend not to use the field value/constant directly without having associated field added to function reference e.g.
field added to variable in variable palette.

Problem with registering CA JavaBeans with Java 1.7 / 1.8


As Java 1.7 onwards Oracle has dropped support for ActiveX bridge, due to this you need to register CA JavaBeans with
JRE 1.6 though Plex r7.2.1 supports Java 1.8.

Third Party Acknowledgments


This section provides the following third-party license agreements:

Apache
Portions of this product include software developed by the Apache Software Foundation. This product includes Apache
Ant 1.9.4, Apache Jakarta Commons IO 2.4, and Apache Commons CLI v.1.2, which are distributed in accordance with
the following license agreements:
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
'License' shall mean the terms and conditions for use, reproduction,and distribution as defined by Sections 1 through 9 of
this document.
'Licensor' shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
'Legal Entity' shall mean the union of the acting entity and all other entities that control, are controlled by, or are under
common control with that entity. For the purposes of this definition,

43
CA Plex 7.2.1

'control' means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract
or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such
entity.
'You' (or 'Your') shall mean an individual or Legal Entity exercising permissions granted by this License.
'Source' form shall mean the preferred form for making modifications, including but not limited to software source code,
documentation source, and configuration files.
'Object' form shall mean any form resulting from mechanical transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation, and versions to other media types.
'Work' shall mean the work of authorship, whether in Source or Object form, made available under the License, as
indicated by a copyright notice that is included in or attached to the work(an example is provided in the Appendix below).
'Derivative Works' shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and
for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work
of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or
merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
'Contribution' shall mean any work of authorship, including the original version of the Work and any modifications or
additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the
purposes of this definition, 'submitted' means any form of electronic, verbal, or written communication sent to the Licensor
or its representatives, including but not limited to communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving
the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright
owner as 'Not a Contribution.'
'Contributor' shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received
by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to
You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare
Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in
Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a
perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license
to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only
to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by
combination of their Contribution(s)with the Work to which such Contribution(s) was submitted. If You institute patent
litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution
incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You
under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or
without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark,
and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and
(d) If the Work includes a 'NOTICE' text file as part of its distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed

44
CA Plex 7.2.1

as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works;
or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The
contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own
attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the
Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms
and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion
in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or
conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you
may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product
names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions
under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or
otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall
any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages
of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to
damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or
losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose
to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights
consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your
sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each
Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting
any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't includethe brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a file or class name and description of purpose be included
on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0

45
CA Plex 7.2.1

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS
IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

decNumber 3.32
This product contains Runtime Modules of decNumber (c) Copyright IBM Corporation 2001, 2004. All Rights
Reserved.These files or modules may not be 1) used for any purpose other than to enable the application, 2) copied
(except for backup purposes), 3) reverse assembled, reverse compiled, or otherwise translated.

INTELLIJ IDEA Community Edition 11.1.2


The annotations.jar is available in the redist folder of the IntelliJ IDEA distribution. This distribution is available under both
Ultimate (paid) and Community (free) licenses and this apache licensed component is present in both. CA Owns Ultimate
Licenses.
The License for Intellij IDEA follows:
LICENSE AGREEMENT FOR INTELLIJ IDEA
(Commercial License)
Version 10, Effective as of August 23, 2014
IMPORTANT! READ CAREFULLY: THIS IS A LEGAL AGREEMENT. BY DOWNLOADING, INSTALLING, COPYING,
SAVING ON YOUR COMPUTER, OR OTHERWISE USING THIS SOFTWARE, YOU (LICENSEE, AS DEFINED BELOW)
ARE BECOMING A PARTY TO THIS AGREEMENT AND YOU ARE CONSENTING TO BE BOUND BY ALL THE TERMS
AND CONDITIONS OF THIS AGREEMENT.
IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT, YOU SHOULD NOT
DOWNLOAD, INSTALL AND USE THE SOFTWARE.
1. PARTIES
(a) "Licensor" means JetBrains s.r.o., having its principal place of business at Na hrebenech II 1718/10, Prague, 14700,
Czech Republic, registered with Commercial Register kept by the Municipal Court of Prague, Section C, file 86211, ID.Nr.:
265 02 275.
(b) "Licensee" means the sole proprietor or legal entity specified in the License Certificate. For legal entities, "Licensee"
includes any entity which controls, is controlled by, or is under common control with Licensee. For purposes of this
definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of
such entity.
2. DEFINITIONS
(a) "Software" means software program known as IntelliJ IDEA in binary form, including its documentation, upgrades
provided pursuant to Section 10 of this Agreement, and any third party software programs that are owned and licensed
pursuant to Section 7 of this Agreement by parties other than Licensor and that are either integrated with or made part of
IntelliJ IDEA (collectively, "Third Party Software").
(b) "Authorized User" means any employee, independent contractor or other temporary worker authorized by Licensee to
use Software while performing duties within the scope of their employment or assignment.
(c) "Client" means a computer device used by Authorized User for running Software.
(d) "JetBrains Account" means profile record on https://account.jetbrains.com, which identifies Authorized User and
licenses for Software provided to the Authorized User by Licensee. Sharing credentials for a JetBrains Account among
multiple Authorized Users is not permitted.
(e) "License Certificate" means evidence of a license provided by Licensor to Licensee in electronic or printed form.

46
CA Plex 7.2.1

(f) "License Key" means a unique key-code that enables a single Authorized User to use Software at a time. Only Licensor
and/or its representatives are permitted to produce License Keys for Software.
(g) "License Server" means a server application designed to store License Keys and to enable access to Software from
Clients within Licensee's local area network ("Licensee's LAN"). License Server may be optionally provided by Licensor to
Licensee.
3. OWNERSHIP
(a) Software is the property of Licensor or its suppliers. Software is licensed, not sold. Title and copyrights to Software,
in whole and in part and all copies thereof, and all modifications, enhancements, derivatives and other alterations of
Software regardless of who made any modifications, if any, are, and will remain, the sole and exclusive property of
Licensor and its suppliers.
(b) Software is protected by United States Copyright Law and International Treaty provisions. Further, the structure,
organization, and code embodied in Software are the valuable and confidential trade secrets of Licensor and its suppliers
and are protected by intellectual property laws and treaties. Licensee agrees to abide by the copyright law and all other
applicable laws of the United States including, but not limited to, export control laws.
4. GRANT OF LICENSE
Subject to the terms, conditions, and limitations set forth in this Agreement, including any amendments thereto, Licensor
hereby grants to Licensee a limited, non-exclusive, non-transferable license to use Software as follows:
(a) Licensee may:
(i) install and use the licensed edition (if applicable) and version of Software specified in License Certificate(s) on any
number of Clients and on any operating system supported by Software, provided that a number of concurrent users of
Software never exceeds the number of Authorized Users specified in the appropriate License Certificate(s) and that the
same License Key is not used by multiple Authorized Users, on multiple Clients, or on different operating systems at a
time;
(ii) access Software from Clients via License Server if Licensee has obtained License Server from Licensor or via
JetBrains Account. Licensee may install multiple instances of License Server, provided that Licensee complies with
restrictions set forth in this Section 4; and
(iii) make one backup copy of Software solely for archival purposes.
(b) Licensee may not:
(i) sell, redistribute (except as set forth in Paragraph 5 herein), encumber, give, lend, rent, lease, sublicense, or otherwise
transfer Software, or any portions of Software, to anyone without the prior written consent of Licensor;
(ii) reverse engineer, decompile, disassemble, modify, translate, make any attempt to discover the source code of
Software, or create derivative works from Software; or
(iii) use the same License Key or JetBrains Account concurrently by multiple Authorized Users, on multiple License Server
instances, Software instances, or Clients. Software may contain a feature preventing concurrent use of the same License
Key or JetBrains Account.
5. LICENSE TO DISTRIBUTE REDISTRIBUTABLE
In addition to the license granted under Section 4 of this Agreement, Licensor grants to Licensee a non-exclusive, limited
license to use the files located in the "redist" folder in Software installation under the terms of the Apache License, Version
2.0. Licensee may obtain a copy of the Apache License at http://www.apache.org/licenses/LICENSE-2.0. Unless required
by applicable law or agreed in writing, software distributed under the Apache License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for the
specific language governing permissions and limitations under the Apache License.
6. USE OF DECOMPILER

47
CA Plex 7.2.1

(a) Software includes decompiling functionality ("JetBrains Decompiler") that enables reproducing source code from the
original binary code. Licensee acknowledges that binary code and source code might be protected by copyright and
trademark laws. Before using JetBrains Decompiler, Licensee should make sure that decompilation of binary code is not
prohibited by the applicable license agreement (except to the extent that Licensee may be expressly permitted under
applicable law) or that Licensee has obtained permission to decompile the binary code from the copyright owner.
(b) Using JetBrains Decompiler is entirely optional. Licensor neither encourages nor condones the use of JetBrains
Decompiler, and disclaims any liability for Licensee's use of JetBrains Decompiler in violation of applicable laws.
7. THIRD PARTY SOFTWARE LICENSE
(a) Licensee agrees to comply with the terms and conditions contained in Third-Party Software license agreements with
respect to the applicable Third-Party Software.
(b) Licensee agrees and acknowledges that Sections 11 and 12 of this Agreement shall also govern Licensee's use of the
Third-Party Software. Licensor will bear no responsibility with respect to any Third Party Software, and Licensee will look
solely to the licensor(s) of the Third Party Software for any remedy. Licensor claims no right in the Third Party Software,
and the same is owned exclusively by the licensor(s) of the Third Party Software.
(c) LICENSOR PROVIDES NO WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-
INFRINGEMENT, WITH RESPECT TO ANY THIRD PARTY SOFTWARE.
8. RESTRICTED USE DURING EVALUATION PERIOD
(a) Subject to the terms of this Agreement, Licensee is granted a right to use Software for evaluation purposes without
charge for a period of thirty (30) days from the date of installation of Software unless otherwise specified ("Evaluation
Period").
(b) Licensee's use of Software during Evaluation Period shall be limited to the internal evaluation of Software for the sole
purpose of determining whether Software meets Licensee's requirements and whether Licensee desires to continue using
Software.
(c) Upon expiration of Evaluation Period, Licensee must obtain License Certificate for perpetual use of Software or cease
using Software. Software contains a feature that will automatically disable Software upon expiration of Evaluation Period.
Licensee may not disable, destroy, or remove this feature of Software, and any attempt to do so will be in violation of this
Agreement and will terminate Licensee's rights to use Software.
9. LICENSE FEES AND PAYMENTS
Licensee agrees to the terms and conditions of Software purchase published on Licensor's website at www.jetbrains.com.
Licensee will pay to Licensor the license fee and other charges and expenses as set forth in an appropriate invoice or
other purchase documentation. Licensor may charge Licensee interest for any payment that is more than thirty (30) days
past due at the rate of one and one-half percent (1.5%) per month or the highest amount allowed by law, whichever is
lower.
10. UPGRADES
(a) Licensor will provide generally available new versions of Software to Licensee pursuant to the optional upgrade terms
published on Licensor's web site at www.jetbrains.com. Upon obtaining License Key for a new version of Software from
Licensor, Licensee shall destroy License Key provided by Licensor for a previous version of Software.
(b) If Licensee has obtained an upgrade subscription for Software, Licensee will qualify for free upgrades during the initial
1-year upgrade subscription term. Licensee may renew an upgrade subscription for another 1-year period by paying to
Licensor an applicable upgrade subscription renewal fee. Each subsequent upgrade subscription term will start on the
day following the expiration of a previous upgrade subscription term regardless of the actual upgrade subscription renewal
date. Upon obtaining License Key for a new upgrade subscription term from Licensor, Licensee shall destroy a License
Key provided by Licensor for a previous upgrade subscription term.

48
CA Plex 7.2.1

(c) If not agreed otherwise in writing between Licensor and Licensee, upon upgrading to new version of Software the
relationship between parties shall be governed and amended (if applicable) by the terms and conditions of License
agreement related to Software available at www.jetbrains.com on the day of upgrade purchase.
11. LIMITED WARRANTY
SOFTWARE IS PROVIDED TO LICENSEE "AS IS" AND WITHOUT WARRANTIES. LICENSOR MAKES NO
WARRANTY AS TO ITS USE OR PERFORMANCE. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE
LAW, LICENSOR AND ITS AFFILIATES, SUPPLIERS AND RESELLERS DISCLAIM ALL OTHER WARRANTIES AND
CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD
TO SOFTWARE, AND THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES.
12. DISCLAIMER OF DAMAGES
(a) TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR OR ITS
AFFILIATES, LICENSORS, SUPPLIERS OR RESELLERS BE LIABLE TO LICENSEE UNDER ANY THEORY FOR
ANY DAMAGES SUFFERED BY LICENSEE OR ANY USER OF SOFTWARE, OR FOR ANY SPECIAL, INCIDENTAL,
INDIRECT, CONSEQUENTIAL, OR SIMILAR DAMAGES (INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR LOSS
OF PROFITS OR CONFIDENTIAL OR OTHER INFORMATION, FOR BUSINESS INTERRUPTION, FOR PERSONAL
INJURY, FOR LOSS OF PRIVACY, FOR FAILURE TO MEET ANY DUTY INCLUDING OF GOOD FAITH OR OF
REASONABLE CARE, FOR NEGLIGENCE, AND FOR ANY OTHER PECUNIARY OR OTHER LOSS WHATSOEVER)
ARISING OUT OF THE USE OR INABILITY TO USE SOFTWARE, OR THE PROVISION OF OR FAILURE TO PROVIDE
SUPPORT SERVICES, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, AND
REGARDLESS OF THE LEGAL OR EQUITABLE THEORY (CONTRACT, TORT OR OTHERWISE) UPON WHICH THE
CLAIM IS BASED.
(b) IN ANY CASE, LICENSOR'S ENTIRE LIABILITY UNDER ANY PROVISION OF THIS AGREEMENT WILL BE
LIMITED TO THE AMOUNT ACTUALLY PAID BY LICENSEE FOR SOFTWARE UNDER THIS AGREEMENT.
13. EXPORT REGULATIONS
Licensee agrees and accepts that Software may be subject to import and export laws of any country, including
those of the European Union and United States (specifically the Export Administration Regulations (EAR)). Licensee
acknowledges that it is not a citizen, national, or resident of, and is not under control of the governments of Cuba, Iran,
North Korea, Sudan or Syria and is not otherwise a restricted end-user as defined by applicable export control laws.
Further, Licensee acknowledges that it will not download or otherwise export or re-export Software or any related technical
data directly or indirectly to the above-mentioned countries or to citizens, nationals, or residents of those countries, or to
any other restricted end user or for any restricted end-use.
14. TERM AND TERMINATION
(a) Except as otherwise provided in License Certificate, the license granted herein shall be perpetual.
(b) If Licensee fails to comply with the terms and conditions of this Agreement, this Agreement and Licensee's right
and license to use Software will terminate immediately. Licensee may terminate this Agreement at any time by notifying
Licensor. Upon the termination of this Agreement, Licensee must cease using Software and delete Software from its
Clients and archives.
(c) LICENSEE AGREES THAT UPON TERMINATION OF THIS AGREEMENT FOR ANY REASON, LICENSOR MAY
TAKE ACTIONS SO THAT SOFTWARE NO LONGER OPERATES.
15. MARKETING
Licensee agrees to be identified as a customer of Licensor and that Licensor may refer to Licensee by name, trade
name and trademark, if applicable, and may briefly describe Licensee's business in Licensor's marketing materials, on
Licensor's web site, in public or legal documents. Licensee hereby grants Licensor a license to use Licensee's name and
any of Licensee's trade names and trademarks solely pursuant to this marketing section.
16. GENERAL

49
CA Plex 7.2.1

(a) Licensor reserves the right at any time to cease the support of Software and to alter prices, features, specifications,
capabilities, functions, licensing terms, release dates, general availability or other characteristics of Software.
(b) This Agreement, including the Third Party Software license agreements, constitutes the entire agreement between
the parties concerning Licensee's use of Software, and supersedes any and all prior or contemporaneous oral or written
representations, communications, or advertising with respect to Software. No purchase order, other ordering document
or any hand written or typewritten text which purports to modify or supplement the printed text of this Agreement or any
schedule will add to or vary the terms of this Agreement unless signed by both Licensee and Licensor.
(c) A waiver by either party of any term or condition of this Agreement or any breach thereof, in any one instance, will not
waive such term or condition or any subsequent breach. The provisions of this Agreement which require or contemplate
performance after the expiration or termination of this Agreement will be enforceable notwithstanding said expiration or
termination.
(d) This Agreement will be governed by the laws of Czech Republic, without reference to conflict of laws principles.
Licensee agrees that any litigation relating to this Agreement may only be brought in, and will be subject to the jurisdiction
of, any Court of Czech Republic.
(e) Titles are inserted for convenience only and will not affect in any way the meaning or interpretation of this Agreement.
If any provision of this Agreement is held invalid, the remainder of this Agreement will continue in full force and effect.
Either Licensor or Licensee may assign this Agreement in the case of a merger or sale of substantially all of its respective
assets to another entity. This Agreement will be binding upon and will inure to the benefit of the parties, their successors
and assigns.
For exceptions or modifications to this Agreement, please contact Licensor at:
Address: Na hrebenech II 1718/10, Prague, 14700, Czech Republic
Fax: +420 241 722 540
E-mail: [email protected]
=====================================
The applicalbe license (apache) for the named component is:
Apache License, Version 2.0
FoundationProjectsPeopleGet InvolvedDownloadSupport ApacheHome » Licenses
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of
this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under
common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to
cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%)
or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code,
documentation source, and configuration files.

50
CA Plex 7.2.1

"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as
indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work
and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original
work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from,
or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or
additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the
purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor
or its representatives, including but not limited to communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving
the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received
by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to
You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare
Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in
Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a
perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license
to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only
to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by
combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent
litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution
incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You
under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or
without modifications, and in Source or Object form, provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of this License; and
You must cause any modified files to carry prominent notices stating that You changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works;
or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The
contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own
attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the
Work, provided that such additional attribution notices cannot be construed as modifying the License.

51
CA Plex 7.2.1

You may add Your own copyright statement to Your modifications and may provide additional or different license terms
and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion
in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms
or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license
agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product
names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions
under this License
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or
otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall
any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages
of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to
damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or
losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose
to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights
consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your
sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each
Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting
any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets
"[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the
appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose
be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS
IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

Oracle Java Runtime Environment (JRE) 1.6.0


This product is distributed with JRE v.1.6. Sun Microsystems has provided additional copyright notices and information
that may be applicable to portions of the JRE in the THIRDPARTYLICENSEREADME.txt file that accompanies the JRE
files.

52
CA Plex 7.2.1

Oracle Java Runtime Environment (JRE) 1.7.0


This Product is distributed with JRE v.1.7. Use of the Commercial Features of the JRE for any commercial or production
purpose requires a separate license from Oracle. 'Commercial Features' means those features identified Table 1-1
(Commercial Features In Java SE Product Editions) of the Software documentation accessible at http://www.oracle.com/
technetwork/java/javase/documentation/index.html.
Oracle has provided additional copyright notices and information that may be applicable to portions of the JRE in the
THIRDPARTYLICENSEREADME.txt file that accompanies the JRE files and at http://www.oracle.com/technetwork/java/
javase/documentation/index.html.

Wiseman-client 1.0
Apache License, Version 2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of
this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under
common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to
cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%)
or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code,
documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as
indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work
and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original
work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from,
or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or
additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the
purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor
or its representatives, including but not limited to communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving
the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received
by Licensor and subsequently incorporated within the Work.

53
CA Plex 7.2.1

2. Grant of Copyright License.


Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-
exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly
display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License.
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-
exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims
licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their
Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any
entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the
Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for
that Work shall terminate as of the date such litigation is filed.
4. Redistribution.
You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of this License; and
You must cause any modified files to carry prominent notices stating that You changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works;
or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The
contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own
attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the
Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms
and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions.
Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to
the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you
may have executed with Licensor regarding such Contributions.
6. Trademarks.
This License does not grant permission to use the trade names, trademarks, service marks, or product names of the
Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the
content of the NOTICE file.
7. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides
its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY,

54
CA Plex 7.2.1

or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by
applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to
You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising
as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of
goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if
such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance
of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in
accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any
other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred
by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets
"[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the
appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose
be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS
IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

International Support
An internationalized product is an English product that runs correctly on local language versions of the required operating
system and required third-party products, and supports local language data for input and output. Internationalized
products also support the ability to specify local language conventions for date, time, currency and number formats.
A translated product (sometimes referred to as a localized product) is an internationalized product that includes local
language support for the product's user interface, online help and other documentation, as well as local language default
settings for date, time, currency, and number formats.
In addition to the English release of this product, CA supports only those languages listed in the following table.

Language Internationalized Translated


Brazilian-Portuguese Yes No
Chinese (Simplified) Yes No
Chinese (Traditional) Yes No
Czech Yes No

55
CA Plex 7.2.1

Danish Yes No
Dutch Yes No
Finnish Yes No
French Yes No
German Yes No
Greek Yes No
Hungarian Yes No
Italian Yes No
Japanese Yes Yes
Korean Yes No
Norwegian Yes No
Polish Yes No
Russian Yes No
Spanish Yes No
Swedish Yes No
Turkish Yes No

Limited testing has been performed on languages other than English. This limited testing may comprise testing by CA
partners or customers or be based on historical testing of prior releases of CA Plex.
This certification means that this English release will run on the non-English operating systems on those machines. It is
not intended to mean that the product is localized for those markets and languages.

Documentation
The product help (CHM) files have been stabilized with Plex r7.2.

56
CA Plex 7.2.1

Getting Started
CA Plex automates the software development process. You can understand this as you create a sample application. The
application you create tracks projects, which consist of various tasks that are assigned to employees. In the process, it
introduces a set of editors that form the core of the CA Plex toolset:

• Object Browser
Lets you view the objects in your application.
• Model Editor
Allows you to specify design information that CA Plex uses to generate your application.
• Panel Designer
Lets you to design the user interface elements of your application.
• Diagrammer
Allows you draw design diagrams.
• Action Diagrammer
Allows you to specify the logical functionality of your application.
This article includes the following sections:

Begin Quickly
Follow the basic installation steps described in How to Install and Configure CA Plex? to begin quickly. You will then be
able to run through the introductory tutorial in Develop Your First Java Application in 20 Minutes.

Understand the Product Components


The following diagram shows the main components of CA Plex.

CA Plex includes the following:

57
CA Plex 7.2.1

• A Windows-based visual development environment, complete with GUI screen designers, a language-neutral business
logic editor, diagrammer, and impact analysis tools.
• A multi developer repository with built-in configuration management for storing design models across multiple versions,
languages, and platforms.
• Code generators that automatically create 100 percent of C#, Java, C++, HTML, RPG, or SQL code required for
implementing applications for the Web, wireless, Java, System i, and .NET operating environments. CA Plex generates
the entire application, including HTML and GUI clients, 5250 host screens, server programs, and database objects.
CA Plex minimizes the need for operating environment expertise, which insulates developers from technology changes. In
addition, lets the developers focus on solving business problems rather than technical problems.
CA Plex generates applications that support the industry standards and following technologies:
• .NET
• XML
• J2EE
• J2SE
• WAP
• Web Services
• Microsoft SQL Server
• Oracle
• DB2
• Linux

Supported Operating Environments


CA Plex creates native, n-tier code for the following operating environments:
• Java Server—Java Servers with JDBC data access are supported across multiple operating environments including
Linux, Solaris, and i5/OS. EJB Option for J2EE support.
• .NET Server—C# code generation with a .NET runtime system that uses OLE DB for data access to industry standard
databases.
• System i Server—System i Servers are supported with RPG IV or RPG III code generation and DDS access to
DB2/400.
• XML-based web services—XML document-based web services support through the Websydian pattern libraries.
• HTML web client—HTML web clients through the Websydian pattern libraries.
• Rich GUI client—Rich GUI client supports Win32, Java (Swing), and .NET (WPF) operating environments and ActiveX
and JavaBean GUI components. Rich GUI client supports access to all server operating environments, plus stand-
alone client data access through ODBC or JDBC to the industry standard databases.
• System i 5250—System i 5250 with RPG IV or RPG III code generation and DDS access to DB2/400. System i 5250
includes drag-and-drop 5250 screen designer.
• Windows C++ Server—Windows C++ Servers provide support for Oracle (through OCI) and Microsoft SQL Server
(through ODBC). They also include extensive COM integration support.

A First Look
This section gives you a quick tour of the CA Plex environment and its online help.

Open CA Plex
Follow these steps:
1. Click Start, Programs, CA, CA Plex r7.2.1, and click the CA Plex icon. CA Plex opens.
You can dock toolbars in different ways -- just below the menu, on either side, or set them to float in the workspace.

58
CA Plex 7.2.1

2. Notice where your toolbar resides in the CA Plex environment.


3. Select Open from the CA Plex File menu.
4. Select any tutorial model from the Tutorial subdirectory of your installation directory in the Open File dialog, and click
OK.
By default, when the model opens, the Object Browser appears and the name of the model appears in the title bar.
These are the only indications that you have opened your model. See Objects and Object Browser to learn about the
Object Browser.
If you need to stop working on this tutorial, you can save it by clicking the Save toolbar button

.
You are also prompted to save your changes when you close certain editors after making changes.
NOTE
When the editors prompt you to save, only the changes made in that editor are saved and not the whole model.

Close CA Plex
From the File menu, click Exit to close CA Plex.

Access Online Help


The CA Plex online help system contains detailed information about the concepts and functions in CA Plex and systematic
procedures for getting started and performing various CA Plex tasks. It also includes descriptions of the CA Plex dialogs,
menus, and toolbars.
You can use any of the following methods to access online help:
• From a menu command, select the command on the menu. A short description of the command appears in the status
bar.
• From a dialog, click Help or press F1.
• From a class library object, select the object in the Object Browser and press Shift+F1.
• From anywhere within CA Plex, press F1.

Tutorials
After reading this Getting Started, you can refer to the numerous resources available to you for additional information. In
particular, there are three tutorials that take you step-by-step through the creation of a simple application:
• Tutorial for Windows
• Tutorial for System i 5250
• Develop Your First Java Application in 20 Minutes
CA Plex offers detailed online help that provides comprehensive information and detailed instructions about how to use
CA Plex.

Project Management Application - Example


In this tutorial, you create a basic project management application. In the application, a project consists of a group of
tasks, and each task is assigned to one employee. It contains three entities:
• A project entity, with information about projects
• An employee entity, with information about employees
• A task entity, with information about tasks
For the purpose of the System i tutorial, the model is very simplistic. If you have developed project management systems,
you may find parts of the model that you would do differently. Keep in mind that it is only an example.

59
CA Plex 7.2.1

An entity-attributes diagram of the application appears as follows:

Look at what this diagram shows about the application. If you have worked with entity-attributes or entity-relations
diagrams before, you can see that:
• It tracks projects and projects have tasks
• A project can have more than one task, but a task can only belong to one project
• A task is owned by a project, which means that if the owning project is deleted, you will want to delete all of its tasks
• Employees are assigned to tasks -- One employee can be assigned to more than one task, but each task can only
have one employee assigned to it
• An employee is not dependent on any particular task, which means that if a task is deleted, the employee assigned to
it is not deleted
You can see all of this without having to look at any code or a database schema. This diagram shows useful information,
which CA Plex uses to generate the application.

60
CA Plex 7.2.1

Installing
This section discusses the steps in installing CA Plex, the base product and other components.
This section includes the following topics:
• System Requirements
• How to Install and Configure CA Plex
• How to Install Pattern Libraries
• How to Install and Configure System i Components
• How to Configure the Windows C++ Server Components for CA Plex
• How to Install and Configure the Java Components for CA Plex
• How to Install the Application Integrator

System Requirements
This section describes what you need to know and do before you install the product.
This article includes the following topics:

Prerequisites for Installation


The deployment system requirements vary depending on the target platform. You can find the details of currently
supported deployment platforms for CA Plex on Broadcom Support, Compatibility Matrix.

PC Development Environment
This specification is a recommendation rather than a strict requirement.
• 1 GHz 32-bit (x86) or 64-bit (x64) processor
• Windows 8, Windows 7, Windows XP (SP2 or SP3), Windows Vista SP1, Windows Server 2008, or Windows Server
2012
NOTE
The Server Core version of Windows is not supported for development or deployment of Plex applications.
• At least 1 GB RAM
• 40 GB hard drive or larger; at least 4 GB of free space is recommended
• A CD-ROM drive
• A 17-inch color monitor capable of running at 1024 x 768 resolution or greater
Customers developing Windows C++ applications should also review the requirements for Visual Studio 2013
Professional at Microsoft Site).

Platform-Specific System Requirements


The system requirements depend on the platforms on which you intend to deploy your generated applications. The
platform requirements change regularly as vendors release new versions of operating systems, compilers, and databases.

Windows C++ Client (WinC Generator)


Following are the requirements for Windows C++ Client:
• Microsoft Visual Studio 2013 Professional edition

61
CA Plex 7.2.1

Notes:
– Visual Studio 2013 Professional Update 5 is also required (available for download Microsoft Site).
– Multibyte MFC Library for Visual Studio 2013 is also required (available for download Microsoft Site).
– Visual Studio 2015 is NOT compatible with CA Plex C++ builds. Multiple releases of Visual Studio may be installed
and run side-by-side on the same PC.
• CA Plex WinC Run-Time System
• ODBC Driver and Database (if client-side data access is required)
• Deployment platforms:
– Microsoft Windows 7
– Microsoft Windows 8
– Microsoft Windows 10

System i (System i 5250 and System i Client/Server Generators)


Following are the requirements for System i 5250 and System i Client/Server Generator:
• TCP/IP
• CA Plex System i libraries
• RPG III or RPG IV compiler
• IBMi 7.1, IBMi 7.2
• CA License key for 5250 generator (if required)

C# Server Generator
Following are the requirements for C# Server generator:
• Microsoft .NET Framework Version 4.6 (can be installed from the CA Plex installation CD). Both 32-bit and 64-bit .NET
Frameworks are supported.
• DBMS (Microsoft SQL Server 2008, Microsoft SQL Server 2012, Microsoft SQL Server 2014, Oracle 11g, Oracle
12c, and IBM DB2 9.5) and OLE DB Provider.
• ODBC driver for database builds, not required at run time
Note: Microsoft Visual Studio is not required for C# development. Optionally, you may find Visual Studio useful for
debugging and other development activities.

C# Client Generator
Following are the requirements for C# Client generator:
• Microsoft .NET Framework Version 4.6 (can be installed from the CA Plex installation CD). Both 32-bit and 64-bit .NET
Frameworks are supported.
• CA License Key for .NET Client generator.

Java Generator
Following are the requirements for Java generator:
• Oracle J2SE Development Kit 7.0 or 8.0. Both 32-bit and 64-bit Java Runtime Environments are supported.
• Apache ANT 1.9.4 (automatically installed with CA Plex).
• Third-party DBMS, such as, Oracle, Microsoft SQL Server, or any third-party DBMS and JDBC driver
• ODBC driver for database builds, not required at run time

EJB Option
In addition to the requirements for the Java generator, following are the requirements for the EJB option:

62
CA Plex 7.2.1

• Java EE reference implementation (GlassFish)


• Java EE Application Server, such as, Oracle GlassFish, Oracle WebLogic, JBoss, or IBM WebSphere
• CA License Key for EJB Connector generation.

Windows C++ Server (WinNTC Generator)


Following are the requirements for Windows C++ Server:
• CA Plex Windows Application Server.
• Microsoft Visual Studio 2013 Professional edition. For more information about Visual Studio, see the Windows C++
Client (WinC Generator) section in this guide.
• DBMS (Microsoft SQL Server 2008, Microsoft SQL Server 2012, Microsoft SQL Server 2014, Oracle 11g, Oracle 12c,
or IBM DB2 9.5). The latest available service packs are generally recommended.
• Microsoft Windows Server 2008, or Microsoft Server 2012.
NOTE
The Windows C++ Server generator is provided only for maintenance of existing WinNTC applications. CA
strongly recommends the use of C# or Java generators for the development of new applications for the Windows
Server platform.

Installation Considerations
You will learn about installation and upgrade procedures for this release in the following sections. You can also perform a
silent install of CA Plex by following the steps discussed under Silent Installation in Install the Base Product.

Microsoft Help Compiler Installation


Microsoft Visual Studio 2013 does not include the help compiler for creating HLP format help files.
To compile HLP files with Plex, you must download and install the help compiler separately. You can find Windows 95
Help Authoring Kit (hcwsetup.exe) available for download from Microsoft Site. You must install the MS help compiler to its
default location: C:\Program Files\Help Workshop.
The minimum requirement for successful help topic compilation is to have two files -- HCRTF.EXE and HWDLL.DLL
present in the folder C:\Program Files\Help Workshop.

How to Install and Configure CA Plex


This article discusses the minimum hardware and software requirements for developing applications with CA Plex, how to
install CA Plex with Unicenter Software Delivery (USD) and shows a typical configuration in a LAN environment.
Do the following:
• Verify the Installation Checklist
• Install CA Plex with Unicenter Software Delivery
• Typical Configuration in a LAN Environment
• Install the Base Product
• Install Other Components

Verify the Installation Checklist


Installation requirements for CA Plex vary depending on your target development platforms and include third-party
products that are not supplied with the product.
Compatibilities are subject to change.

63
CA Plex 7.2.1

Use the following tables to determine which components you need to install and where to find the corresponding
installation instructions.
Base Product:

Component Description See


CA Plex base product Includes the CA Plex development Install the Base Product
environment, help files, sample models and
tutorial models.
CA License Key License keys are required to use CA Plex Entering the CA License Key
and its optional components. The optional
components are as follows:
Enterprise Option (required for both EJB
and .NET Client generators)
IBM i 5250 generator
Websydian pattern libraries

Pattern and Class Libraries:

Component Description See


Pattern libraries The latest pattern libraries, recommended How to Install Pattern Libraries?
for most application development with CA
Plex.
Class libraries (OBASE) The first set of pattern libraries developed Classlib.chm help file
for CA Plex; not recommended for new
development projects, except
for the System i 5250 platform.

Tools and Utilities:

Component Description See


Application Integrator Used for reverse engineering information How to Install the Application Integrator?
from a variety of data sources into CA Plex.
Microsoft Word Viewer Used for viewing and printing generated Specifying your Print Program in the online
Windows reports. help
Adobe Acrobat Used for viewing the online versions of the See Adobe documentation to install Adobe
tutorial guides. Reader

64
CA Plex 7.2.1

Platform-Specific Requirements:

Component Description See


C# generator For developing applications install the ObNET.chm help file.
Microsoft .NET Framework SDK Version
4.6 or later. The web installer for this is
supplied on the Plex product CD.
For runtime applications install the
Microsoft .NET Framework Version 4.6 or
later. The full install for this is supplied on
the CA Plex product CD.
DBMS (Microsoft SQL Server, Oracle, IBM
DB2) and OLE DB Provider.
ODBC driver for database builds, not
required at run time
Note: Microsoft Visual Studio 2013,
2008, and 2010 are not required for
C# development. Optionally, you may
find it useful for debugging and other
development activities. Microsoft Visual
Studio 2013 is the version recommended
for these activities.
Java generator Oracle J2SE Development Kit 8.0 How to Install and Configure the Java
Apache ANT (automatically installed with Components for CA Plex?
CA Plex)
Third-party DBMS such as Microsoft SQL
Server, Oracle, IBM DB2, or other third-
party DBMS and JDBC driver.
ODBC driver for database builds, not
required at run time.
The JAVA_HOME environment variable
must be defined to enable Java builds.
EJB Option J2EE application server such as WebLogic, EJB Option in the online help
JBOSS, or WebSphere. GlassFish
application server (the Reference
Implementation) can be used for testing
purposes.
J2SE SDK. This is the same as the
requirement for the Java generator.
JDBC driver and DBMS. This is the same
as the existing requirement for the Java
generator.
Windows C++ client Microsoft Visual Studio 2013 Professional Microsoft Visual C++ Compiler
edition.
A deployment platform of Windows 7,
Windows 10.
CA Plex WinC
Run-time system
ODBC driver and database (Optional)

65
CA Plex 7.2.1

Windows C++ server CA Plex Windows Application Server Windows Server Components
(WinNTC generator) Microsoft Visual Studio 2013
DBMS (Microsoft SQL Server, Oracle, IBM
DB2)
Windows Server 2008 or Windows Server
2012
System i (System i 5250 CA Plex System i libraries System i Components
and System i client/server generators) TCP/IP
RPG IV or RPG III compiler
Open Database (ODBC) Requires an ODBC driver and DBMS. ODBC Components

Before installing CA Plex (or any of its components) or migrating from a previous product release, be sure to review the
following section carefully to determine if there are additional installation or configuration steps you need to follow for this
release.

Install CA Plex with Unicenter Software Delivery


You have an option of installing CA Plex with Unicenter Software Delivery (USD). A USD package is provided for this
purpose on the Broadcom Support Website.
To install the CA Plex with USD
1. Download the USD package from the CA Support web site.
2. Unzip the USD Package to your SDO Server.
3. Register the USD Package with your SDO Server.
4. Deploy the USD Package to your desired system.

Typical Configuration in a LAN Environment


You can configure CA Plex in various ways. The following diagram shows a typical placement of CA Plex components in a
LAN environment:

66
CA Plex 7.2.1

Your group models and pattern libraries reside on the LAN server. The base product and the local models reside on the
developer workstations. They may also reside on a laptop with a connection to the network. You only need to connect to
the network when you are working on the group model.
After you complete installing and configuring CA Plex, you can install the pattern libraries based on which you can develop
applications using CA Plex.
More Information
• Install the Base Product
• Install Components
• Enter the CA License Key
Install the Base Product
This scenario provides the basic steps involved in installing the CA Plex base product so that CA Plex developers
can start working with CA Plex.
Follow these steps to complete this scenario:

The following diagram illustrates how you can develop your first Java application in CA Plex:

67
CA Plex 7.2.1

Figure 1: Scenario to Install the Base Product

68
CA Plex 7.2.1

Install the CA Plex Base Product on a Development Workstation


You must install the base product to start working with the product and develop your first application.
NOTE
You must have administrator rights to install CA Plex. If you try to install CA Plex without being logged as an
administrator, you can get an error 1628: Failed to complete installation from InstallShield.

In case if you have installed Plex r7.2.1 Beta build, make sure to uninstall the Beta Build completely before
installing the GA build.
Follow these steps:
1. Insert the CA Plex product CD into a CD-ROM drive.
The CA Plex Installation CD window appears.
2. Click the Read button to read the CA Plex documentation, and review the installation and upgrade information.
3. Click the Install button to begin the installation.
Initiate one of the following installations from the displayed menu:
CA Plex
Installs the CA Plex base product.
CA Plex Windows C++ Application Server
Installs the CA Plex Windows C++ Application Server necessary to deploy a WinNTC application on a Windows
server. This option excludes build tools required for development. To install the build tools, run a custom installation of
the base product.
Websydian Web Libraries
Installs third-party libraries to enable your CA Plex applications for the Web.
Download .NET Framework 4.6
Download and Installs Microsoft .NET Framework 4.6. You must reboot at the end of the install. Microsoft .NET
Framework 4.6 installation is mandatory for all .NET based development.
Java JDK
Links to the Oracle website to download the Java Development Kit (JDK), which is a mandatory component for Java
development within CA Plex. Java JDK is not required for C#, Windows C++, or System i RPG development.
If you clicked CA Plex, the InstallShield Wizard window appears.
4. Click Next.
The License Agreement window appears.
5. Read the License Agreement. Select I accept the terms of this license agreement option if you accept the terms of the
agreement, and click Next.
The Personal Information dialog appears.
6. Enter your name and your company name, and Click Next.
The Choose Destination Location dialog appears
7. Specify which type of setup you want to install:
Typical configuration
Installs all the program files, including online help files, tutorial files, sample files, and pattern libraries. With a Typical
installation, the OBASE class libraries and Windows C++ Server components are not installed by default; select
Custom install to install them.
Compact configuration
Saves disk space by installing only the program files and the pattern libraries, but not the online help files, tutorial files,
or sample files.
Custom configuration
Lets you specify which product components to install.
8. Specify a destination location, and Click Next. Either you can accept the default, C:\Program Files\CA\Plex\7.2.1, or C:
\Program Files (x86)\CA\Plex\7.2.1, or you can click Change to install to a different directory.
In addition to the specified destination directory, CA Plex also installs a copy of Sun’s JRE in the Program Files\CA
\SharedComponents\Jre directory.

69
CA Plex 7.2.1

NOTE
The installation program prevents you from installing this release into the same directory as the previous
release of CA Plex. Instead, install this release into a different directory or uninstall the previous version.
9. If you selected Custom, select the components to install. The default settings for the Custom installation are the same
as for the Typical installation, but you can also select Class Libraries, Application Integrator, and CA Plex Windows C+
+ Application Server SDK.
10. Select which language you want to use as the default for generated Windows clients. You can change this setting later.
NOTE
For more information, see the online help topic Specifying the National Language Library.
11. Click Back to return to any dialog in which you want to change the settings, or click Next to begin the installation.
12. Review your settings before copying files, and click Finish when the installation is complete.
CA Plex is installed on your computer.
13. If prompted, select whether to restart your computer now or later and click OK.
NOTE
If you experience an installation error when running CA Plex setup, enter the following command from Windows
command prompt:
F:\PlexSetup\setup.exe /v"/L*v C:\PlexInstall.log"

To run this command on Windows Vista, start the Windows Command Prompt as an Administrator. This command creates
a PlexInstall.log file in the root of the C: drive containing information that helps diagnose the problem.
In the previous example, the F: Drive is the CD/DVD drive containing the CA Plex installation CD.
For the CA Plex Windows C++ Application Server, the command line is as follows:
F:\Plex Application Server\setup.exe /v"/L*v C:\PlexInstall.log"

Silent Installation
A silent installation is useful when you need to install the product automatically without any user intervention. To install
the product in silent mode, use the /s command line switch with the setup.exe command. For example, enter the following
command from the command line:
d:\Plexsetup\setup.exe /s

or
d:\Plexsetup\setup /s /f1".\setup64.iss"

where d:\ is the drive letter for your CD-ROM.


The first command performs a typical installation of the CA Plex product to the default installation directory on 32-bit
Windows. The second command performs an installation on 64-bit Windows.
If you run the silent install using a command-line window on Windows Vista or Windows 2008, you must open the
command-line window prompt as an administrator, even if you are already logged on as an administrator.
To uninstall CA Plex in silent mode, use the following command.
• On 32-bit Windows:
d:\Plexsetup\setup.exe /s /f1".\setupUnInstall.iss"

• On 64 bit Windows:
d:\Plexsetup\setup /s /f1".\setup64UnInstall.iss"

70
CA Plex 7.2.1

Record Your Own iss File


The shipped setup.iis file is recorded so as to install CA Plex to the default location with the Typical install option. However
this may not meet your requirements.
You can record your own setup.iss file by using the /r command-line switch with the setup.exe command. Typically, the
setup.exe will create the setup.iss file in the C:\Windows folder.
You can rename the setup.iss file and specify it with the /f1 command-line switch when running setup.exe.

Modify the System Path


The CA Plex base product installation automatically makes changes to your system path. Specifically, the CA Plex Bin
directory (typically, C:\Program Files\CA\Plex\7.2.1\Bin) is added to the system path.
To view or change the system path, double-click the System icon in the Control Panel and alter the environment settings.

Continue Side-By-Side Installation of CA Plex r7.2.1 with CA Plex r7.2, r7.1, r7.0, r6.1 and r6.0
Plex r7.2.1 unmanaged C++ runtime is not backward compatible with earlier Plex releases. Due to compiler upgrade,
runtime version string has changed from 600 to 721. E.g. Ob600lc.dll will be Ob721lc.dll.

The CA Plex r7.2 unmanaged C++ runtime is backwards compatible with CA Plex r7.1 and r7.0. This means that C++
functions generated with CA Plex r7.0 or r7.1 can be used with CA Plex r7.0 version of the runtime without needing to be
recompiled.
NOTE
There is no forward compatibility - do not use the CA Plex r7.0 or r7.1 runtime with CA Plex r7.2 functions
because runtime errors will occur.
The 7.2, 7.1, and 7.0 C++ runtime DLLs have the same names. For example, ob600lc.dll, ob600nwi.dll and so on. When
the CA Plex install modifies the system path, the Plex 7.2 Bin folder is put at the beginning of Path statement. This means
that, by default, both 7.0 and 7.1 WinC applications will run with the newer 7.2 WinC runtime DLLs on your PC.

Install Adobe Reader


To view the online versions of the tutorials, you must install Adobe Reader.
To install Adobe Reader
1. Click Documents, Install Adobe Acrobat on the CA Plex Installation CD window.
2. Follow the instructions displayed on the dialog.

Install the Java Development Kit


To develop applications using Java within CA Plex, you must download and install the J2SE Development Kit (version
7.0/8.0).
To install Java Development Kit
1. Click Install to display more installation options on the CA Plex Installation CD window.
2. Click the Download JDK button.
3. Follow the instructions on the website to download and install JDK 7.0/8.0.
NOTE
If you install the JDK component after installing CA Plex, you must perform any Java-dependent CA Plex
configuration changes manually.

71
CA Plex 7.2.1

Modify, Repair, or Remove the Base Product


After installing the CA Plex base product, you can rerun the installation to modify, repair, or remove the base product.
To modify, repair, or remove the CA Plex base product
1. Click Start, Settings, and Control Panel from your computer.
The Control Panel window appears.
2. Double-click the Add/Remove Programs icon.
The Add or Remove Programs window appears.
3. Select CA Plex from the list of products, and click Add/Remove Programs.
The Modify, repair, or remove the program dialog appears.
4. Select Modify, Repair, or Remove, as required.
The Select Features dialog appears.
5. Click Next, and follow the instructions displayed on the dialog.

Install Components
This article explains how to install the following components:

Install the Windows Application Server


To install the application server tool when you install the CA Plex base product
1. Click Custom when asked to specify which type of setup to install.
2. Check CA Plex Windows Application Server in addition to what is already checked.
To install the application server after you install the CA Plex base product
1. Click Start, Settings, and Control Panel.
2. Double-click the Add/Remove Programs icon on the Control Panel.
3. Select CA Plex in the list of products.
4. Click Change/Remove.
5. Select Modify and click Next on the InstallShield Wizard window.
6. Click CA Plex Windows Application Server to check it.
7. Click Next to start the installation.

Install the Application Integrator


You can choose to install the Application Integrator tool when you install the CA Plex base product or after you install the
CA Plex base product.
To install the Application Integrator tool when you install the CA Plex base product
1. When asked to specify which type of setup to install, click Custom.
2. Check Application Integrator in addition to what is already checked.
To install the Application Integrator tool after you install the CA Plex base product
1. Click Start, Settings, and Control Panel.
2. Double-click the Add/Remove Programs icon on the Control Panel.
3. In the list of products, select CA Plex.
4. Click Change/Remove.
5. On the InstallShield Wizard window, select Modify, and click Next.
6. Click Application Integrator to check it.

72
CA Plex 7.2.1

7. Click Next to start the installation.

Install Microsoft Visual Studio 2013


The Microsoft Visual Studio 2013 C++ compiler must be installed to generate and build C++ code (WinC and WinNTC
objects) in CA Plex. The Professional edition of Visual Studio is compatible with CA Plex.
CA Plex only requires a typical installation for Microsoft’s Visual Studio. For more information about different
configurations, see the Visual C++ documentation.
Note the following:
• The C#, System i 5250, and Java generators do not require the Microsoft Visual C++ compiler.
• If you are building Windows server (WinNTC) functions, you must install Visual Studio on the machine on which you
are building the server functions.
The Microsoft Visual Studio Professional 2013 Update 5 along with Multibyte MFC Library for Visual Studio 2013 is
required for for CA Plex C++ builds.

Enter the CA License Key


To complete the licensing of CA Plex, place the information in the Execution Key from the ALP Key Certificate in the ca.olf
file on the machine running CA Plex.
If you have access to the World Wide Web, you can get your updated ca.olf file by going to. Otherwise, follow the
directions in this article.

Create the CA License Key File


If the ca.olf does not exist in the CA_LIC folder (usually located in Program Files\CA\SharedComponents), create a new
ca.olf file.
Follow these steps:
1. Create a new file using a text editor.
2. Copy all of the information from the Execution Key into the new file.
3. Click Save and select the CA_LIC directory.
The ca.olf file is created. Now follow the instructions to edit an existing CA license key file.

Edit an Existing CA License Key File


If the ca.olf file exists, open it using a text editor of your choice and make the edits.
Follow these steps:
1. Open the ca.olf file using a text editor, such as Notepad.
2. Replace all lines beginning with ID_ with the ID_ lines indicated in the Execution Key.
3. Go to the bottom of the file and immediately following any existing FEATURE lines, add the FEATURE line from the
Execution Key.
NOTE
Do not remove any existing FEATURE lines.
4. Select Save As from the File menu to save the edited ca.olf file in the CA_LIC folder.
NOTE
The FEATURE line can wrap to a second line on the certificate, but it must be entered on a single line with
no carriage return in the ca.olf file.

73
CA Plex 7.2.1

How to Install Pattern Libraries


Pattern libraries are sets of reusable design objects on which you can base the applications you develop.
CA Plex provides the following sets of pattern and class libraries:
• Pattern libraries
• Class libraries (OBASE family)
This article includes the following sections:

Version and Level Names


The pattern libraries accompanying CA Plex r7.2.1 are called V7.2.1 Patterns.

Install Pattern Libraries


To install the pattern libraries, you must perform a Typical installation of the CA Plex base product. The pattern libraries
are included with the Compact installation. For more information about installation instructions, see How to Install and
Configure CA Plex.

Install Class Libraries


To install the class libraries, you must perform a Custom installation (or modify your existing installation).
See the online help file to understand how to use the class libraries,.

Install Pattern Libraries on a Network


In a typical workgroup environment, the pattern libraries are installed on a network drive where they are accessible by all
developers. This ensures that all developers use the same version of the libraries, thus simplifying model administration.
To install the pattern or class libraries on a network server
1. Run the setup program on the server machine.
For more information, see Install the CA Plex Base Product.
2. Specify the directory where the libraries are to be installed.
NOTE
You can use a UNC path (such as \\MyServer\MyShare\Libraries) as the location for the libraries. This
means that all developers accessing the libraries on your network can also use the same path. The use of
UNC paths is optional. If you need to access a library, and the path name specified at installation time is not
recognized, CA Plex prompts you to enter a valid path.
3. Select the Custom installation option.
Select the libraries that you want to install and clear the other options.

How to Install and Configure System i Components


This article describes how to install and configure the System i components -- specifically for the System i client/server,
System i 5250, and Java client -- System i server products.
CA Plex also supports the development of Java Server applications on the System i.
This article includes the following sections:

74
CA Plex 7.2.1

• Minimum System i Development Requirements


• Library List Considerations
• Transfer the Product Libraries from CD to System i
• Restore the Product Libraries from Save Files (*SAVF)
• PC-to-System i Communications Software

Minimum System i Development Requirements


The minimum requirements for the System i development environment include the following:
• PLEX721 library containing the remote configuration and run-time objects
• TCP/IP
• i5/OS V5R3 or later. For more information, see the Supported Operating Environments section.
• Restore the Product Libraries from Save Files RPG/400 compiler or ILE RPG/400 compiler
Functions defined with the RPG400 (or SQLRPG400) system value are generated with RPG III syntax and require the
RPG/400 compiler.
Functions defined with the RPGIV (or SQLRPGIV) system value are generated with RPG IV syntax and require the ILE
RPG/400 compiler.
– DDS compiler.
– UIM compiler (for System i 5250 generator only).
– QSYS2 library for System i CPIC communications in the system portion of your library list.
– 4 MB of disk space for the CA Plex product (for application development and run-time execution).
– Sufficient space for generated and compiled System i objects.
– A PC that meets the requirements of the PC Development Environment (System i client/server applications only).

Minimum System i Deployment Requirements


This section lists the requirements for a System i running the following:
• System i 5250 application
• System i client/server application
• Java-RPG/400 application
The components you need are as follows:
• 5250-type terminals, or a PC running a 5250 emulation package (System i 5250 applications only)
• i5/OS
• The following libraries must be in your library list when you call your function:
– A data library, where your physical and logical files reside
– A generation library, where your generated programs reside
– The PLEX721 library
You can combine your data library and generation library into one library.

Library List Considerations


At run time, the PLEX721 library should be lower than your data and generation library in your library list.

Transfer the Product Libraries from CD to System i


Before restoring the CA Plex System i product libraries, you must first transfer the files from the CD to your System i.
These instructions assume you have TCP/IP installed, configured, and active on your System i, otherwise, you cannot
continue. Contact your System i System Administrator about installing TCP/IP.
To transfer System i (binary) files from the CD to your System i

75
CA Plex 7.2.1

1. Get the IP address (for example, nnn.nnn.nnn.nnn), or the symbolic name (myas400.mycompany.com), of your
destination System i from your System i System Administrator.
2. Log on to your PC.
3. Insert the CA Plex CD into an accessible CD-ROM drive.
4. Open a command line window on your PC.
5. Change drives to the location of your CD-ROM drive.
6. Type cd as400libs, and press Enter.
7. Type ftp, and press Enter.
This starts an FTP session.
8. Type open nnn.nnn.nnn.nnn (nnn.nnn.nnn.nnn is your System i TCP/IP address -- you can substitute the symbolic
name for the IP address), and press Enter.
You are successfully connected if you are prompted for your user profile.
NOTE
If the session is idle for more than five minutes after you have connected, then the system automatically
closes the connection. To restart the session, you must start the procedure over at Step 7.
9. Type your System i user profile at the prompt, and press Enter.
10. Type your System i password at the prompt, and press Enter.
Note, the cursor does not move when you are entering the password.The system replies that your user profile is
logged on.
11. Type quote site namefmt 1, and press Enter.
NOTE
There must be a blank space between namefmt and 1.
The system replies that the user is now using naming format 1. You must specify 1 as the naming format.
12. Type bin, and press Enter to set the binary format.
13. Type cd qgpl.lib, and press Enter.
You can specify another existing library in place of QGPL; the .lib extension is required.The system replies that the
current library is changed to QGPL.
14. Type put plex721.savf, and press Enter. The time to transfer the file varies depending on your network speed.
The .savf extension is required.
The system replies that the file transfer is completed successfully.
15. Repeat Step 14 for ytutorial.savf, ytutrefer.savf, and appintobj.savf.
16. Type quit, and press Enter.
This stops your FTP session.
17. Exit the command line session.
You can now restore the *SAVF files.

Restore the Product Libraries from Save Files (*SAVF)


To install the CA Plex for System i client/server or CA Plex for System i 5250 components from save files
1. Log on as QSECOFR or with QSECOFR equivalent authority.
2. If you are upgrading an existing release of CA Plex, first clear the product libraries by entering the following command
strings:
CLRLIB LIB(PLEX721)
CLRLIB LIB(YTUTORIAL)
CLRLIB LIB(YTUTREFER)
CLRLIB LIB(APPINTOBJ)
3. Restore the CA Plex product library by entering the following:

76
CA Plex 7.2.1

RSTLIB SAVLIB(PLEX721) DEV(*SAVF) SAVF


(QGPL/PLEX721) FRCOBJCVN(*YES *RQD)
4. Restore the Tutorial library by entering the following:
RSTLIB SAVLIB(YTUTORIAL) DEV(*SAVF)
SAVF(QGPL/YTUTORIAL)
5. Restore the Tutorial library by entering the following:
RSTLIB SAVLIB(YTUTREFER) DEV(*SAVF)
SAVF(QGPL/YTUTREFER)
6. Restore the Application Integrator library by entering the following:
RSTLIB SAVLIB(APPINTOBJ) DEV(*SAVF)
SAVF(QGPL/APPINTOBJ)
7. Add PLEX721 to the top of your library list.

PC-to-System i Communications Software


For System i development, CA Plex requires your PC to be linked to System i through TCP/IP.
More Information
• How to Configure CA Plex TCP/IP Environment in CA Plex
How to Configure CA Plex TCP/IP Environment in CA Plex
This scenario explains how you can configure CA Plex TCP/IP protocol services according to the needs of your
developers and end users. TCP/IP does not use, or require, the QCMN subsystem. Therefore, these instructions are
based on QCMN not being present.
You must have the following prerequisites to use TCP/IP with this release of CA Plex:
• i5/OS V5R3 or later
For more information about configuring TCP/IP for your System i, see the IBM publication, TCP/IP Configuration and
Reference (SC41-34209-00). These instructions presume that TCP/IP is installed and active on your System i.
• TCP/IP configured and started on your System i
• TCP/IP version of the System i CA Plex Dispatcher started on the System i
For CA Plex clients to connect using TCP/IP, you must have the following:
• The TCP/IP CA Plex Dispatcher started on the System i
• A port number assigned when starting the TCP/IP Dispatcher program
To configure CA Plex TCP/IP Environment, follow these steps:
1. Use YOBSYTCPDP TCP/IP Dispatcher Program
2. Verify User Authority Requirements
3. Verify Object Authorities
4. Start the System i TCP/IP Dispatcher
The following diagram illustrates how to configure CA Plex TCP/IP Environment:

77
CA Plex 7.2.1

Figure 2: Scenario diagram to Configure CA Plex TCP IP Environment

Use YOBSYTCPDP TCP/IP Dispatcher Program


For CA Plex r7.0, we recommend the use of the YOBSYTCPDP Dispatcher program. This version of the Dispatcher
program provides the following:
• Improved security. Specifically, this Dispatcher uses a single socket for all communications between the client and the
server so that only the specified port needs to be open through a firewall.
• Support for the IPv6 protocol (in addition to IPv4).
The Dispatcher programs supplied with CA Plex r7.0 are not compatible with V5R2 and earlier.

V5R3 version of YOBSYTCPDP


Initially at the time of writing, V5R3 does not fully support IPv6. Therefore, a separate version of YOBSYTCPDP
is required on V5R3. This version is supplied as two programs, YOBSYTCPC3 and YOBSYTCPD3. To install the
V5R3‑compatible version:
1. Rename the existing YOBSYTCPCT and YOBSYTCPDP programs within your PLEX library (PLEX700).
2. Rename the YOBSYTCPC3 program to YOBSYTCPCT and rename the YOBSYTCPD3 program to YOBSYTCPDP.
NOTE
Any running dispatchers should be stopped before any renaming occurs, then restarted, after the renames
have occurred.

78
CA Plex 7.2.1

User Name Limitation on V5R3


At V5R3 only, one limitation of the YOBSYTCPDP Dispatcher is that it does not display the actual user profile for the Job
User parameter of the spawned job name on the i5/OS WRKACTJOB screen. This limitation does not exist at V5R4 or
later.
As a workaround for this i5/OS limitation on V5R3, you can run the YOBSYTCP dispatcher instead of YOBSYTCPDP. The
YOBSYTCP dispatcher is not generally recommended because it is not firewall compatible and as well as not supporting
IPv6.

YOBSYTCP_R dispatcher
Earlier releases of CA Plex also included a dispatcher program called YOBSYTCP_R. If you require the functionality
provided by this program, contact CA Technical Support.

Verify User Authority Requirements


It is not necessary to set the USER parameter to QSECOFR, but the user parameter you supply must have the following
authorities:
• *USE authority for objects QSYS/QSYGETPH and QSYS/QSYRLSPH.
• *ALLOBJ authority is not required, however, the connecting client user profile must provide *USE authority and
*OBJMGT (Object Management) to the user profile that started the Dispatcher. This requirement is necessary because
the user profile that started the Dispatcher is then allowed to validate the connecting client user's i5/OS user profile
and password.
• *SECADM authority is not required, however, the connecting client user profile will not be allowed to change its own
expired password unless the user profile that started the Dispatcher has *SECADM authority. If you prefer to run the
Dispatcher without *SECADM authority then you must provide alternative mechanisms for your end users to change
their passwords. For more information, see Managing Passwords with System i TCP/IP Connections in the online help.
NOTE
If the connecting client user profile is the same user profile that started the Dispatcher, it does not require
*SECADM authority for resetting its own expired password.

Verify Object Authorities


The Grant Object Authority (GRTOBJAUT) command or the Edit Object Authority command can be used to grant these
object authorities.
Example:
The STARTDSP user profile starts the Dispatcher (YOBSYTCPDP or YOBSYTCP) on the System i, which does not have
*ALLOBJ authority but has *SECADM authority. The CONNECTUSR user profile is the connecting client user profile.
GRTOBJAUT OBJ(QSYS/CONNECTUSR) OBJTYPE(*USRPRF) USER(STARTDSP) AUT(*OBJOPR *READ *EXECUTE)

NOTE
AUT(*OBJOPR *READ *EXECUTE) is equivalent to *USE authority when using the 'Edit Object
Authority' (EDTOBJAUT) command.
In the previous example, the CONNECTUSR user profile will not be to able reset its own expired password because the
STARTDSP user profile does not have Object Management (*OBJMGT) authority to the CONNECTUSR user profile.
In the next example, the CONNECTUSR user profile will be able to reset its own expired password because the
STARTDSP user profile does have Object Management (*OBJMGT) authority to the CONNECTUSR user profile.
GRTOBJAUT OBJ(QSYS/CONNECTUSR) OBJTYPE(*USRPRF) USER(STARTDSP) AUT(*OBJMGT *OBJOPR *READ *EXECUTE)

79
CA Plex 7.2.1

Start the System i TCP/IP Dispatcher


Review the preceding sections before you execute the examples on starting the System i TCP/IP Dispatcher.
Note: In these examples the parameter 62000 is the assigned port number. However, it can be any unused port number
that is not in the range of port numbers previously registered with the Internet Assigned Number Authority (IANA). These
registered ports are typically within the range of 0 to 1023.
We recommend using port numbers between 3000 and 62000 to avoid conflicts with lower numbers as they become
registered. Also note that port 70000 is not a valid port number.
The YOBLISTEN job runs until it is ended manually or by the system IPLs. Set the SCDTIME parameter to a time after the
IPL, when the STRTCP command was issued to complete the TCP/IP startup.
Example 1:
Write your own CL program to start PLEX700/YOBSYTCPDP or PLEX700/YOBSYTCP, and call the CL program as part
of your IPL.
Example 2:
Create a Job Schedule Entry (ADDJOBSCDE).
The following is an example you can use if your IPL happens nightly:
ADDJOBSCDE JOB(YOBLISTEN) CMD(CALL )) FRQ(*WEEKLY)
PGM(PLEX700/YOBSYTCPDP) PARM('62000'
SCDDATE(*NONE) SCDDAY(*ALL) SCDTIME('hh:mm:ss')
JOBD(PLEX700/PLEX) JOBQ(QGPL/QINTER) USER(QSECOFR)
TEXT(Plex TCPIP C/S Dispatcher')

NOTE
The PARM value in the previous statements must include the single quotes or the call will fail.
After submitting the ADDJOBSCDE command, the Dispatcher will not start until the scheduled time after the next IPL.

Start the Dispatcher Before the Next IPL


You can choose to start the Dispatcher before the next IPL.
Follow these steps:
1. Enter the following from the command line:
WRKJOBSCDE
2. Enter 10 next to the job, and press Enter.
The job will start immediately (typically, you would only do this once on the day you set up the Dispatcher).

Start Additional TCP/IP Dispatchers


You can start additional CA Plex TCP/IP Dispatchers on additional ports at any time for testing purposes. For instance,
when first configuring CA Plex for TCP/IP to the System i, you may want to start the Dispatcher manually before adding
the job to your startup routine.
To manually start the CA Plex TCP/IP Dispatcher on a port
1. Enter the following from the command line:
SBMJOB CMD(CALL PGM(PLEX700/YOBSYTCPDP) PARM('62000')) JOB(YOBLISTEN) JOBD(PLEX700/PLEX)
JOBQ(QGPL/QINTER)
The parameter passed into the YOBSYTCPDP (or YOBSYTCP) program must be an available, unused port number.
2. Verify that your port has started by entering the following command on the command line:

80
CA Plex 7.2.1

WRKTCPSTS *CNN (check the Local Port column for the port number you assigned)

NOTE
Use QINTER as the job queue so that incoming CA Plex clients get interactive response times. The job
queue that starts the CA Plex TCP/IP Dispatcher is used for submitting individual client jobs as they are
requested. Using a batch job queue may cause your CA Plex client jobs to sit in your batch job queues,
subsequently causing a time-out and hanging behaviors on the client side.

How to Configure the Windows C++ Server Components for CA Plex


This article describes how to configure the Windows C++ server components for CA Plex.
NOTE
The Windows C++ Server generator is provided only for maintenance of existing Plex WinNTC applications.
CA strongly recommends the use of C# or Java generator for the development of new Plex applications for the
Windows Server platform. Customers with existing WinNTC applications are encouraged to consider a migration
to C# or Java.
This article includes the following sections:

Install the Windows C++ Server Components


Before you develop Windows server applications, you must install the development version of the CA Plex Application
Server.

Windows C++ Server Development Requirements


The software requirements for the Windows C++ server are as follows:
• Windows Server 2008. 64-bit editions of Windows Server are supported. Plex WinNTC applications execute as 32-bit
applications in the WOW64 environment. For native 64-bit application support, C# or Java generator must be used.
NOTE
For more information, see the Additional Prerequisites for Windows Vista and Windows Server 2008 section.
• Microsoft Visual Studio 2013 (Professional Edition or Standard Edition)
• CA Plex Windows C++ Application Server SDK
• Microsoft SQL Server or Oracle
NOTE
Microsoft Visual Studio 2013 needed to be set as 'Run as Administrator'. You can do this against the properties
for the devenv.exe. Go to the 'Compatibility' tab and set the 'Run as Administrator 'check box at the bottom.

Application Server
The Application Server is the name for the services and components that support CA Plex C++ applications on Windows
servers.
The Application Server includes the following:
• Environment Manager
• Build Service and Build Service Manager
• Dispatch Service and Dispatch Service Manager
• Printing Service
These components are installed in the Plex\AppServer\Bin directory.

81
CA Plex 7.2.1

Install the Application Server


To install the Application Server on a Windows Server 2008 operating system, the following authorities are required:
• Local Administrator authority is required if CA Plex has previously been installed anywhere in the domain.
• Domain Administrator authority is required if CA Plex has not been previously installed. The server must be part of a
domain.
To install the Application Server when you install the CA Plex base product
1. When asked to specify which type of setup to install, click Custom.
2. Check CA Plex Windows C++ Application Server SDK in addition to what is already checked.
To install the Application Server after you install the CA Plex base product
1. Click Start, Settings, and Control Panel.
2. Double-click the Add/Remove Programs icon.
3. In the list of products, select CA Plex.
4. Click Change/Remove.
5. On the InstallShield Wizard window, select Modify, and click Next.
6. Select the CA Plex Windows C++ Application Server JDK check box.
7. Click Next to start the installation.

Job Status Database


To support the Build Service, the Application Server installation program automatically does the following:
1. Creates a Microsoft Access database for storing status information about CA Plex builds. This job status database is
located at \AppServer\Jobsts\Objobsts.mdb.
2. Configures an ODBC data source for the job status database.

Build Service and the Dispatch Service Configuration


You have the option of configuring the startup information for both the installed services. The default installation sets the
startup type to be manual. You can change this to automatic so that the services start at boot up.

Oracle Support
You can use the Windows Server (WinNTC) generator to create applications that access data in Oracle databases on
Windows Servers. The run-time application uses the native Oracle Call Interface (OCI) for fast data access.
Before using CA Plex, ensure that Oracle is properly installed on the server (see your Oracle documentation for details)
and that a basic user (like the default user SCOTT) has been configured with the following privileges:
• Connect
• Resource
• Tablespace

Windows Client Components—Microsoft RPC Installation


Consider the following before installing the Windows Client Components -- Microsoft RPC:
• CA Plex clients connect to the Application Server using the Microsoft RPC run-time services.
• Using the CA Plex Environment Manager, create a user profile with proper authorities on the Windows Server for each
CA Plex developer. For more information, see Creating User Environments in the online help.
• For information on setting up a database, authorizing users, and configuring a data source name, see your Microsoft
SQL Server documentation.

82
CA Plex 7.2.1

Windows C++ Application Server


The CA Plex installation has a Windows C++ Application Server option. When selected, this installs only the components
necessary to deploy your application (the Dispatch Service, Printing Service, and the Environment Manager).

How to Install and Configure the Java Components for CA Plex


This article includes the following sections:

Verify Java Development Requirements


CA Plex supports the generation of Java applications on both the client and server. Java applications can be developed
and deployed in the following configurations:
• Java client to RPG (System i) server
• Java client to Java server
• Java client or server to C# .NET server
• C# .NET Client or Server to Java Server
• Windows client to Java server
CA Plex generates 100 percent pure Java code that can be run under any Java Virtual Machine on any platform. If you
have any existing Java applications generated by CA Plex, run-time backwards compatibility enables new versions of the
CA Plex Java run time to be deployed without regenerating existing applications.
CA Plex Java clients are primarily tested on Windows. Java client applets are tested using the Oracle Java plug-in. Note
that CA Plex Java clients require the Oracle Swing classes to support GUI components.
The following table summarizes the installation requirements for CA Plex Java development. Deployment requirements
are documented in the Java Platform section of the online help.

Component Description
Java client CA Plex Java components
Oracle Java SE JDK 8.0. Other versions of the JDK work with CA
Plex, but they have not been fully tested. Freely downloadable.
The JAVA_HOME environment variable must be defined.
Java server The same as Java client, with the addition of:
Third-party DBMS and JDBC driver (for runtime data access)
ODBC driver (for database builds, not required at run time)
For System i Java server development:
PLEXJVA721 library
IBM Client Access (or equivalent)
IBM System i Toolbox for Java

Install Java Components


The CA Plex Java components are installed automatically when you install CA Plex. They include the following:
• ObJava directory
• Apache ANT
• The obJavadsp.bat file in the ObJava directory
To install and configure the Java components, do the following:
1. Download and install the required version of the Oracle Java SE Development Kit (JDK).
2. Set the JAVA_HOME environment variable.

83
CA Plex 7.2.1

3. Configure the server for run-time.


4. Transfer Java server functions (JAR file) to the server.
5. Start the Java Dispatcher.

Define the JAVA_HOME Environment Variable


The JAVA_HOME environment variable determines the Java compiler (Javac.exe) that will be used for Plex Java builds.
Plex does not automatically set this environment variable which provides you with the flexibility to switch between different
versions of the compiler. This setting is not required to run generated applications.
To define the JAVA_HOME environment variable
1. Double-click the System icon in the Windows Control Panel
2. On the Advanced tab, click the Environment Variables button.
3. You can define JAVA_HOME either as a user variable or as a system variable.
Click the appropriate New button, and enter the Variable name as JAVA_HOME and the Variable value as the full path
of the folder where the JDK is installed. For JDK 1.8, the full path will be C:\Program Files\Java\jdk1.8.0
4. Note that JAVA_HOME should NOT point to the Bin sub-folder of the JDK installation folder. For example:

5. Click OK.
You have defined the JAVA_Home environment variable.

Configure the Server for Run-time


To configure the server for run-time
1. Copy the ObJava directory from the CA Plex directory on your client machine to the remote server.
NOTE
You do not require some sub-folders of Objava run-time applications. For example, you do not need to copy
the apache-ant and src sub-folders.
2. After building your Java application’s server functions on a client, transfer the resulting JAR file to the server.
3. Administer the Java Dispatcher for CA Plex by one of the following methods:
– Using a web server that processes a shipped servlet
– Using a batch file that runs the Java VM interpreter within the session
Using the batch file is the simplest option. The use of a web server is more appropriate for production applications.

As an alternative to the Java Dispatcher, you can use the EJB runtime proxy to manage communications in distributed
Java applications.

84
CA Plex 7.2.1

Set Up Java on the System i


To run CA Plex Java functions on the System i, you must install the PLEXJVA721 library and the CA Plex Java
components onto your System i.
These instructions assume you are using the System i Toolbox for Java. The use of IBM Client Access (or equivalent) is
also recommended for accessing the Integrated File System (IFS) on the System i.
NOTE
If you are developing Java client to RPG server applications, you can ignore this section. To connect to RPG
server functions on a System i, Java clients use the System i TCP/IP dispatcher that is included in the PLEX721
product library. The installation process is the same as for Windows clients and is described in How to Install
and Configure System i Components.

PLEXJVA721 Library
The PLEXJVA721 library is supplied as a save file in the AS400 Libraries folder on the CA Plex CD-ROM. This must be
transferred to the System i and restored in the same way as the other CA Plex System i libraries. For more information,
see Transferring the Product Libraries from CD to System i and Restoring the Product Libraries from Save Files (*SAVF).

Copy the Objava Directory to the System i


To copy the Objava directory to the System i
1. Install the CA Plex Java components onto a Windows machine
2. Create a directory at the top-level of the System i IFS. In these instructions, we assume the directory name is Plex.
3. Copy the ObJava directory and its contents from your Windows machine to the System i, to create a Plex/ObJava
subdirectory.

Configure the Java Dispatcher on the System i


The following instructions assume you are using the JDBC driver from the System i Toolbox for Java. The Dispatcher must
be configured with the necessary JDBC settings to ensure that the System i Toolbox for Java classes are available on the
class path.
To configure the Java Dispatcher
1. Create a directory at the top-level of the IFS. For example, /PlexJava.
2. Change the settings in the obsrv.properties file. Descriptions of these settings can be found in the CA Plex help. A
typical example follows with the necessary modifications in bold. Each entry should be on a single line.
Environment.Default.Driver=
com.ibm.as400.access.AS400JDBCDriver
Environment.Default.DataSource=
jdbc:as400://MACHINE/LIBRARY
Environment.Default.User=USERID
Environment.Default.Password=PASSWORD

Java Classes Optimization


You must optimize the system .class files for them to perform well on the System i. This only needs to be done once.
You use the CRTJVAPGM command on a single file, an entire JAR file, or an entire directory (using wildcards). There are
four levels of optimization you can choose. Unless you have a reason to do otherwise, use full optimization (level 40). The
command creates an optimized hidden file for each .class file that is loaded by the System i Java Virtual Machine.
Run CRTJVAPGM as a batch process on the following files:

85
CA Plex 7.2.1

obrun.jar
JT400.jar (you can copy this file from the default location to the Plex directory you created earlier to make the path
shorter)

Start the Java Dispatcher on the System i


You can use the YSTRJVADSP command to start the Dispatcher. You can also use the RUNJVA command to start the
service.
To start the Java Dispatcher using the YSTRJVADSP command
1. Add PLEXJVA721 to your library list.
2. Use the YSTRJVADSP command to start the Dispatcher.
NOTE
This command includes parameters for the port number and locations of the run-time and properties files.
The path to JT400.jar file should be referenced in the Path To Additional Class parameter.
A second method of starting the service is by using the RUNJVA command.
To start the service using the RUNJVA command
1. Enter RUNJVA on a System i command line and press F4.
2. For the Class parameter, type in the name of the run-time class that requires service:
ObRun.ObComms.ObService -- to start the Java Dispatcher
NOTE
The class names are case-sensitive.
3. For the Parameters parameter, type in the port number and the path to the properties file, for example, 1998 and /Plex/
Objava.
At the Classpath prompt, type in the full path to the CA Plex Java run time, for example, /Objava/lib/obrun.jar.

How to Install the Application Integrator


This article describes how to install Application Integrator. Application Integrator enables reverse engineering information
from several sources into CA Plex.
There are several data sources that you can import into the Application Integrator. Each one is a separately licensed
product.
• Schema/ODBC -- Enables the integration of data schemas from any ODBC data source. This replaces the previous
ODBC Import Utility.
• Schema/400 -- Enables the integration of a DDS-defined data schema from the System i. This replaces the previous
DB2/400 Import Utility.
• Application Integrator/400 -- Enables the integration of i5/OS programs (hand-coded or generated by other tools).
• Application Integrator/2E -- Enables the integration of CA 2E functions direct from an CA 2E model.
This article includes the following topics:

What is Shipped to You?


The CA Plex product CD includes the following:
• The Application Integrator tool
• The APPINT System i library, installed as a save file in the Application Integrator directory

86
CA Plex 7.2.1

Install the Application Integrator


You can install the Application Integrator while installing the base product or after the base product installation is
complete.
To install the Application Integrator tool when you install the CA Plex base product
1. Click Custom when asked to specify the type of setup to install.
2. Select Application Integrator in addition to what is already selected.
To install the Application Integrator tool after you install the CA Plex base product
1. Click Start, Settings, and Control Panel.
2. Double-click the Add/Remove Programs icon.
3. In the list of products, select CA Plex, and click Change/Remove.
4. On the InstallShield Wizard window, select Modify, and click Next.
5. Select the Application Integrator check box, and click Next to start the installation.

Set Up the ODBC Data Source


At the end of the installation process, you may see a warning message indicating that no directory has been specified for
ODBC file DSNs on your system. If a warning message appears, you will have to complete the set up manually.
To set up the ODBC Data Source
1. Locate the file Appint.dsn in the Application Integrator directory.
2. Copy this file to the default directory on your system where ODBC file DSNs are stored. This is typically C:\Program
Files\Common Files\ODBC\Data Sources but can be changed using the ODBC Administrator.
NOTE
If you did not see a warning message, these steps are not necessary.

Prepare to Import from the System i


If you are importing from a System i-based data source, you must first install the CA Plex product library, PLEX721, and
the Application Integrator product library, APPINT on the System i. If you are only using the Schema/ODBC or Schema/
Biz modules you can ignore this section.
To restore the CA Plex objects from the product CD to the System i
1. Transfer the save files from the CD to your System i. Follow the steps as discussed in Transfer the Product Libraries
from CD to System i in How to Install and Configure System i Components? The appint.savf file is installed in the
Application Integrator directory. The plex.savf is available in the AS400 Libraries folder on the product CD.
2. Follow the steps in Restore the Product Libraries from Save Files (*SAVF) in How to Install and Configure System i
Components? if you are using the product CD.
3. Enter the following to restore the APPINT library:
RSTLIB SAVLIB(APPINT) DEV(device) ENDOPT(*REWIND) FRCOBJCVN(*YES)

Multiple Versions of CA Plex


If you are running multiple versions of CA Plex, edit the APPINT/APPINT job description to use the correct names for the
PLEX and APPINT libraries.

87
CA Plex 7.2.1

Using
This section provides information on how CA Plex developers and end users can use the CA Plex base product.
This section contains the following topics:
• Create a Project Management Application
• Open the Tutorial Model
• Display the Model Editor and Panel Designer
• Use Inheritance to Define Field Properties
• Use Continuation Triples to Make Fields Optional
• Display the Object Browser
• How to Set Up Generate and Build Options
• How to Define, Generate, and Build a Project Entity
• Modify the User Interface
• How to Define Entity Relationships Using Diagrammer
• How to Define the Task Entity and Process Enabling
• Add Functionality to the Project Entity
• How to Create a Wizard to Add a Project
• Create a Property Sheet
• How to Use Group Model and Local Model Licensing in CA Plex
• How to Create, Import, and Use Windows Communication Foundation Services in CA Plex
• How to Deploy .NET ClickOnce in CA Plex
• How to Import and Use Web Services in CA Plex
• How to Use ActiveX Controls in WinC and C# Client Applications
• Auto Deploy CA Plex WCF Services to Internet Information Services
• Auto Publish CA Plex WCF Services into a CA API Gateway
• Tutorials

Create a Project Management Application


In this tutorial, you create a simple model for a project management application. Assume that the project consists of a
group of tasks, and each task has one employee assigned to it. The model contains three entities:
• Projects
• Tasks
• Employees
Here is an entity-relationship diagram of the application created in this tutorial. You will draw a diagram like this later.

88
CA Plex 7.2.1

If you have worked with entity-relationship diagrams before, you can see that:
• A project can have more than one task, but a task can only belong to one project.
• A task is owned by a project, which means that if you delete a project, you also want all of its tasks deleted.
• Employees are assigned to tasks—one employee can be assigned to more than one task, but each task can only have
one employee assigned to it.
• An employee is not dependent on any particular task, which means that if you delete a task, you do not necessarily
want to delete the employee record too.
You can see all of this without having to look at any code. This diagram shows useful information, which CA Plex uses to
generate the application.
This model is very basic but the end product is far from simple. For example, you create both a wizard and a property
sheet to work with the project data in the tutorial for Windows. If you have built these in other design environments, you
know that you would not be able to reuse much code from the wizard when creating the property sheet. However, CA Plex
enables you to create a property sheet using the information you added to create the wizard, plus a few new lines of code

Open the Tutorial Model


Start CA Plex and open the supplied tutorial model. The tutorial models are available under the Tutorial directory.
Follow these steps:
1. Click Start, Programs, CA, CA Plex r7.2.1, and CA Plex.
2. Select File, Open, and then select the model you want to open in the File Open dialog.
Click My Documents (or Documents on Windows Vista or Windows 7) and navigate to the \CA\Plex\7.2.1\Tutorial sub-
folder.
3. Select the tutorial you want to use:
– TutorialWin.mdl (Tutorial for Windows)
– TutorialJava.mdl (Tutorial for Java)
– Tutorial5250 (Tutorial for System i)
4. Click Open.
5. By default, when the model opens, a window called the Object Browser appears and the name of the model appears in
the title bar of the main application window.
NOTE
For more information, see Display the Object Browser.
6. Select File, Save if you need to stop working on this tutorial before reaching the end of a chapter.
CA Plex also prompts you to save your changes when you close certain editors after making changes in them.

Display the Model Editor and Panel Designer


To create an application, you must define objects and the relationships between them.
In CA Plex, you can specify relationships between objects in a model using triples. A triple is comprised of three parts: the
source object, verb, and target object. For example, in this tutorial, you use the following triple to define a unique identifier
for the Project entity:
Project known by Project ID
The triple is an instance of the abstract triple ENT known by FLD. Whenever you want to designate a unique identifier for
an entity, also known as its primary key, you use this triple, replacing ENT with the name of your entity, and FLD with the
name of your key field.

89
CA Plex 7.2.1

Open the Model Editor


To open the Model Editor, select Model Editor from the Tools menu, or click the New Model Editor toolbar button

.
The Model Editor appears.
You can use the Model Editor to view, add, edit, and delete triples.

Open the Panel Designer


The Panel Designer lets you change the visual appearance of a panel. It comprises three separate windows: Design
window, Panel palette, and property sheet.
Follow these steps:
1. Click the Entities toolbar button Entities toolbar
button o
the Object Browser, if the Object Browser is not displaying the entities, by default.
If you do not see the Project entity, click the Refresh toolbar button Refresh toolbar

button .
2. Expand the Project entity, expand the Edit function, and select Panel.
3. Right-click and select Editor.
The Panel Designer appears.
You can click the Editor button when you select any object. CA Plex always opens the appropriate editor.

Use Inheritance to Define Field Properties


You can define properties to the fields in an entity. Properties provide information about the type of data each field stores.
To define the properties of Project’s fields
1. Click the Show/Hide Library Objects button to display the library objects.
2. Click the Fields button to display field objects to ensure that the Object Browser is focused on fields.
3. Select the Project ID field in the Object Browser by clicking the name (not the icon to the left of the name) and drag the
field from the Object Browser to the source object box of the Model Editor.
This changes the Model Editor source object type to Field, and changes the verb list so that only verbs appropriate for
fields are contained in it.
NOTE
The cursor changes to a closed parcel icon

when you drag an object. It changes to an open parcel icon when it is over a location where you can drop the
object

4. Select is a FLD from the verb list.


5. Drag the library object FIELDS/Identifier field from the Object Browser to the target object box, and press Enter.

90
CA Plex 7.2.1

NOTE
You have to scroll down the Object Browser to find the FIELDS/Identifier field. You can use the filter box at
the top of the Object Browser to only show some of the library items. In this case, you could type *Identifier*
to display only FIELDS/Identifier. Remember to set the filter back to * when you are done.
You just created the triple Project ID is a FIELDS/Identifier.
6. Click the Refresh button on the Object Browser.
The Project ID field has a plus sign (+) to the left, indicating that it now has scoped objects.
7. Click the plus sign (+) to expand the field:

8. Note that Project ID now has the value *Blank, but you cannot tell much else about what it inherited from FIELDS/
Identifier. Values are another type of CA Plex object.
9. Drag the Project ID field from the Object Browser to the body of the Model Editor. The body is the bottom part of the
editor, where the full triples are displayed.
When you drag one or more objects to the body of the Model Editor, the display changes to show you only the triples
that define those objects. This is called focusing the Model Editor. When you drag the Project ID field to the Model
Editor, it focuses on this field, showing the triple Project ID is a FIELDS/Identifier. This still does not give you much
information.
10. Click the Two Levels toolbar button to see more about what an object inherits from its ancestor objects.
The Model Editor shows another level of detail.

Now you can see that Project ID has inherited a data type of character and length of 10, along with the value *Blank
(which you saw in the Object Browser in Step 7).

91
CA Plex 7.2.1

NOTE
In Step 5, you dragged the library object FIELDS/Identifier from the Object Browser to the target object box in
the Model Editor. You can enter the name of the object into the target object box (without the library name) to
accomplish the same thing. In Step 5, you would have entered Identifier.
WARNING
If you entered a wrong object name, you could create a new object with the wrong name. If this happens, find
the erroneous object in the Object Browser and delete it, selecting the Ripple Delete check box on the Delete
dialog.
11. Click the One Level toolbar button to set the Model Editor to show a single level of information.
12. Reset the Model Editor display by clicking the Clear Focus button.
All of the triples appear in the model again.

NOTE
If your Model Editor displays many more triples than shown in the previous graphic, then you have your
model set to display library objects. If this is the case, click the Show/Hide Library Objects toolbar button.
13. Drag the Project Description field from the body of the Model Editor to the source object box. This field is in the third
column of the Project has Project Description triple.
14. Enter ShortDescription in the target object box, and press Enter.
The Model Editor displays the triple as:
Project Description is a FIELDS/ShortDescription
This indicates that you correctly spelled the name of the pattern library field.
NOTE
If you create a new object for a model, and it happens to share the name of a library object, you must
rename your object or delete it (if you did not intend to create it).
15. Repeat either Steps 3 to 5 or Steps 12 to 13 to create the following triples:
Project Start Date is a DATE/CheckedDateISO
Project End Date is a DATE/CheckedDateISO
Project Description Length NBR 255
16. Click the Refresh toolbar button (on the main toolbar, not on the Object Browser).
Your Model Editor should look like this:

92
CA Plex 7.2.1

Inheriting from DATE/CheckedDateISO gives the fields functionality to ensure that end users enter valid dates.
17. Use the process explained in Steps 8 and 9 to look at the characteristics that these fields inherit from the pattern
library fields.

Use Continuation Triples to Make Fields Optional


When your end users enter data, they typically enter data in every field. You can specify that some fields are mandatory,
while others are optional. If you do not specify optionality, the default is that they are mandatory.
If end users leave a mandatory field blank and then try to close the dialogs, a message dialog prompts them to enter data
for the blank mandatory field and does not let them close the dialog until they do. Since this processing is defined as part
of the pattern library and not hard-coded into CA Plex, you can adapt it as required.
To use continuation triples to make fields optional
1. Click the Entities toolbar button to set the Object Browser to display entities.
2. Select the Project entity in the Object Browser and click the Inspect toolbar button.
This focuses the Model Editor on the Project entity, showing only the triples that define that entity.
3. Click in the center of the triple Project has Project Description to select it.
4. Drag it to the source object (top left) box in the Model Editor.

5. Select optionality SYS from the verb (top middle) list, and Optional from the target object (top right) list.
6. Press Enter.
You have entered the continuation triple:Project has Project Description

93
CA Plex 7.2.1

...optionality triples Optional


NOTE
If you do not see this view, click the One Level toolbar button to set the Model Editor to show a single level of
information.
7. Make the Project Start Date and Project End Date fields optional in the same manner.
8. Refresh the Model Editor.
The Model Editor appears as follows:

Display the Object Browser


Your local model is the file that stores the structure and functionality of the application you are building. In your model, you
create and define objects.
In the System i tutorial, you create an entity called Project. The Project entity uses fields to store information about itself,
such as its start and end dates. You define functions to enable end users to create, modify, and delete projects. Entities,
fields, and functions are all types of objects.

Open the Object Browser


You can display the Object Browser by selecting Object Browser from the Tools menu, or clicking the New Object Browser
toolbar button

. By
default, CA Plex opens an Object Browser when you open a local model, even if an Object Browser is already open.
The Object Browser is the bucket that displays all of the objects in a model. In it, you can see the available library objects,
and the objects that you define in your model.

How to Set Up Generate and Build Options


When you generate and build code, you need to tell CA Plex about your application development environment. To do this,
you set options in the CA Plex Generate and Build window.
The options you specify for a model are stored in a file in the same directory as the model. It has the same name as the
model, but has a .bld extension (in the case of this tutorial, the build file is Tutorial5250.bld).
Before continuing in this section, ask your System i Network Administrator what type of connection you will make to the
System i server (TCP/IP), and get the following information. For TCP/IP connections:

94
CA Plex 7.2.1

• A fully qualified network address


Such as myAS400.local.mycompany.com
• Server port
• Code page
• User name
• Password

Specify Build System Settings


Now that you have the necessary information to set up a network connection to your System i system, you are ready to
specify those settings in the Generate and Build options for your model.
The following steps outline how to set up a TCP/IP connection. The process involves three main steps:
1. Creating a System i system.
2. Specifying settings for the system.
3. Indicating that the model should use the newly created system when building for the System i 5250 environment.
To specify build system settings
1. Start CA Plex and open Tutorial5250.mdl.
2. Select Generate and Build from the Tools menu.
The Generate and Build window opens

3. Click the Generate and Build Options toolbar

button .
The Generate and Build Options dialog opens:

95
CA Plex 7.2.1

4. Click Set Defaults.


The Set Build Directory Defaults dialog opens:

96
CA Plex 7.2.1

5. Change the Source Library and Object Library fields to YTUTORIAL.

NOTE
You should have created the YTUTORIAL library on your System i during the CA Plex installation process.
6. Click OK.
The Generate and Build Options dialog opens.
7. Click Apply Defaults.to assign the Source directory location as the default location of the generated source directories.
8. Select System Definitions on the left pane of the dialog. The display changes:

97
CA Plex 7.2.1

NOTE
The section on the right looks different on your screen.
9. Click Add.
The Add System dialog opens

10. Type your system name in the System Name field. Remember that you received this information from your System i
network administrator before starting this process.
Make sure System i is selected in the System Type field, then click OK.

98
CA Plex 7.2.1

The new system name appears in the Generate and Build Options dialog. Now that you have created a System i
system, you need to specify its settings.
11. Select the system name you just added and click Properties. The System Properties dialog opens.
12. Change the Job Description Name to QBATCH, and the Job Description Library to YTUTORIAL.

13. Make sure that the Hold on Job Queue check box is not checked and that the Job Priority value is set to 5.
14. Select the AS/400 Configuration option on the left pane
The System Properties dialog changes:

99
CA Plex 7.2.1

15. Enter the appropriate information In the Protocol section.


16. Click OK to close the System Properties dialog.
Now that you have created a system definition, you must indicate that CA Plex is to use that system when generating
and building for the System i 5250 environment.
17. Click OK again to exit the Generate and Build Options dialog.

How to Define, Generate, and Build a Project Entity


In the Project Management Application, the application you build stores information about projects, the tasks that are part
of a project, and the employees that are assigned to each task. This scenario discusses how as a Plex developer, you can
define, generate, and build a project entity and view the generated application.
To define, generate and build a project entity, follow these steps:

The following diagram illustrates how you can define, generate and build a project entity in CA Plex:

100
CA Plex 7.2.1

Figure 3: Scenario diagram - how to define, generate and build a project entity

More Information
• Specify the Attributes for a Project Entity
• Define Field Properties
• Define the Project Entity Using Inheritance
• Generate and Build the Project Entity
• Using Your Generated Application

Specify the Attributes for a Project Entity


Before defining an entity, you must decide on what data it must store. This article discusses how to define fields for the
Project entity, such as an identifier, a description, and start and end dates for a project.
Follow these steps:
1. Open the Model Editor.

101
CA Plex 7.2.1

2. Select Entity from the object type list.


3. Enter Project in the source object field,
4. Select known by FLD from the verb list.
5. Enter Project ID In the target object field, and then press Enter.
You just created the triple Project known by Project ID. This triple creates a primary key for the Project entity. For more
information on how to change misnamed objects, see Rename Objects Whose Names You Mistyped.
6. Open the Object Browser.
7. Click the Fields toolbar button

on the Object Browser to display field objects:

Project should still appear in the source object field of the Model Editor.
8. Select has FLD from the verb list.
9. Enter Project Description in the target object field,
10. Press Enter.
You have created the triple Project has Project Description, which defines the field Project Description for the Project
entity. You will use this field to store a description of the project. This triple, ENT has FLD, creates a non-key attribute.
The values in non-key attributes do not need to be unique to each entity. For instance, you may have more than one
project with the same text in the description field.
11. Repeat Steps 8 and 9 to create the following triples:
Project has Project Start Date
Project has Project End Date
12. Click the Refresh toolbar button

on the Object Browser. The Object Browser shows the new fields:

102
CA Plex 7.2.1

Define Field Properties


In this step, you further define Project’s fields using inheritance, the mechanism that enables an object to adopt the
properties of another more general object.
By inheriting from class library fields, you enable your application to:
• Validate data entered in the fields (which ensures that an end user does not accidentally enter the year in the month
position of the Project Start Date field, for example)
• Display data to the screen appropriately (such as displaying an underscore to show how long the Project Description
field entry can be)
• Store data appropriately in the database (creating a text field in the database for the Project Description field, and date
fields for the Project Start Date and Project End Date fields)
Follow these steps:
1. Make sure that the Object Browser is focused on fields, and that library objects are showing. See Library Objects.
2. Drag the Project ID field from the Object Browser to the source object field of the Model Editor (to select the object in
the Object Browser, click the name, not the icon to the left of the name).
NOTE
The cursor changes to a closed parcel icon

when you are dragging an object from the Object Browser. It changes to an open parcel icon

when it is over an editor, or any area that can accept the object.
3. Select is a FLD from the verb list, .
4. Drag the library object OBASE/Code from the Object Browser to the target object field, then press Enter.

You just created the triple Project ID is a OBASE/Code. Click the Refresh button on the Object Browser. Notice that the
Project ID field has a plus icon to the left, indicating that it now has scoped objects.
5. Click the plus icon to expand the field. Note Project ID has the values *Blank and *Not blank now, however, it does not
display what was inherited from OBASE/Code.

103
CA Plex 7.2.1

6. Drag the Project ID field from the Object Browser to the body of the Model Editor.
When you drag one or more objects to the body of the Model Editor, the display changes to show you the triples that
define those objects.

If you want to make changes to an object and its scoped objects, but do not want to be distracted by information about
the other objects in your model, use this drag and drop technique. To clear the focus so that all of the model’s objects
are again displayed, click the Clear Focus toolbar button.
When you drag the Project ID field to the Model Editor, it focuses on this field, showing the triple Project ID is a
OBASE/Code. This triple still does not tell you much.
7. Click the Two Levels toolbar button

to
see more about what an object inherits from its ancestor objects.
The Model Editor changes to show another level of detail.

Now, you can see that Project ID has inherited a data type of character and a length of six through the inheritance
triple OBASE/Code is a OBASE/Character.

104
CA Plex 7.2.1

NOTE
In Step 4, you dragged the library object OBASE/Code from the Object Browser to the Model Editor to enter
it in the target object field. You can actually type the value into the target object field (without the library
name) to accomplish the same thing.
WARNING
If you mistype the object name, you are likely to create a new object with the mistyped name.
8. Change the Model Editor display back to show a single level by clicking the One Level toolbar

button .
9. Reset the Model Editor display by clicking the Clear Focus button.
10. Drag Project Description from the body of the Model Editor to the source object field.
11. Enter Narrative in the target object field and press Enter.
Notice that the Model Editor displays the triple as:
Project Description is a OBASE/Narrative
This indicates that you correctly spelled the class library field, as the Model Editor replaced your entry with the library
object by the same name.
NOTE
If you create a new object for a model, and it happens to share the name of a library object, you must
rename your object or delete it (if you did not intend to create it).
By default, fields that inherit from OBASE/Narrative have a specified length of 25.
12. Add the following triple to enable your end users to specify a longer project description:
Project Description length 30
13. Create the following triples using either the method explained in Steps 2 through 4, or the method explained in Steps
11 and 12:
Project Start Date is a OBASE/ISO Date
Project End Date is a OBASE/ISO Date
This inheritance gives the fields an ISO date format and includes built-in functionality to ensure that the date values
end users enter are valid dates.
14. Use the process described in Steps 7 and 8 to look at the characteristics these fields inherited from the class library
fields.

Define the Project Entity Using Inheritance


You have now defined the fields in which the Project entity will store data, and specified the class library fields from
which those fields inherit. In this next step, you give the Project entity a user interface and functionality to interact with a
database.
You again use inheritance to add this functionality. The inheritance triple gives your entity the objects necessary to display
and process a user interface, and to read data from and write data to a database.
Use the following procedure to add functionality to the Project entity.
Follow these steps:
1. Click the Entity button
on
the Object Browser.
Mo plus sign to the left of the Project entity indicates that there are no objects scoped to it.
2. Drag Project from the Object Browser to the source object field of the Model Editor.
3. Select is a ENT from the verb list.
4. Enter Grid Maintained Entity in the target object field and press Enter.

105
CA Plex 7.2.1

You just created the triple Project is a OBASE/Grid Maintained Entity. This action indicates that Project inherits the
structure and functionality of the Grid Maintained Entity object in the OBASE class library.
For information on the Grid Maintained Entity object, select the pattern in the Object Browser and press Shift+F1.
By inheriting from Grid Maintained Entity, the Project entity now has some scoped objects.
5. Click the Refresh button

on
the Object Browser.
The Project entity you just created appears at the top of the Object Browser. Click the plus sign to the left of the entity
icon to expand Project.

You can see that among the inherited objects are several functions (with scoped panels) and views, and a physical table.
These objects enable Project to display a user interface, and to store data to and retrieve data from a database.
Specifically:
• – Project.Grid Maintenance Suite.Edit Grid User Interface displays the panel scoped to it
– List Panel, which is scoped to the Edit Grid User Interface function, stores the layout of the Edit Project panel
– The functions scoped to the views access the database to add, delete, and change records
You will learn more about panels in Modifying the User Interface, and functions and views in How to Define the Task
Entity and Process Enabling?.

Generate and Build the Project Entity


This section assumes that you have defined fields for the Project entity, specified the properties of those fields, and
defined functionality for the Project entity, providing a basic user interface and the ability to write to and read from a
database. Now, you are ready to generate and build the Project entity. Generate and Build is the process in which CA Plex
turns your model into source code (generating), and then turns your source code into executable objects (building).
Follow these steps:
1. Select Generate and Build from the Tools menu.
Alternatively, click the New Gen and Build toolbar button.
The Generate and Build window appears. The Message Log pops up when you open the window. You can ignore its
messages for now, and minimize it

106
CA Plex 7.2.1

2. Click the Show/Hide Library Objects toolbar button to turn off library object, if the Generate and Build window shows
library objects,
The Generate and Build window now shows only the Project entity:
3. Select the Project entity.
4. Click the Generate and Build toolbar button.
The Project entity expands, showing all of its scoped objects that can be generated; those that will be generated are
highlighted.
A Confirm Generate dialog appears, indicating the number of objects that are generated. Not all of the scoped objects
are selected.
5. Click Yes.
CA Plex generates those objects, and then summarizes the generation process.
6. Click OK on the summary dialog when the generation completes (until the generation is complete, the button says
Cancel).
NOTE
Generating these objects causes warnings; one indicates that the length of a field on a panel differs from
its length in the program, and the other indicates that no event was found for a grid subfile selector value
*Blank. Disregard these warnings, as they do not affect your compiled application.
CA Plex prompts you to compile and build the objects.
7. Click Yes both times.
CA Plex then sends the generated code to the System i that you specified previously.
The window shows the progress of transferring the source code on the Remote Compile dialog.
After the code is transferred to the System i server, the server compiles it.
8. Click OK on the Remote Compile dialog.
9. Click the AS/400 Build Status toolbar button to display the status of your build.
The Remote Job Status dialog appears.
10. Click Refresh until all of the jobs indicate that they successfully compiled.
11. Close the Remote Job Status dialog when the build is done.
12. Save your model.
13. Select System i Message File from the Build menu, and then select Generate and Build.
NOTE
Building the message file generates an error, indicating there was no text for "Format ODBC time value." Do
not worry about this error; it will not keep your generated application from running properly.
14. Select System i Field Values File from the Build menu, and then select Generate and Build.
15. Find the function Project.Edit Grid User Interface, in the Generate and Build window, and note its implementation
name (following the object name).

16. Start a 5250 session.


17. Enter call AA4ZF '', where AA4ZF is the implementation name you noted in Step 15.
Your generated application starts, and should look like this:

After you have generated and built the objects in your model, you can run the program to see what you created.

Using Your Generated Application


By entering a few triples, you have created a fully functional application. You can use your generated application to create,
edit, and delete projects. You can create a description for each project and indicate a start and end date.

107
CA Plex 7.2.1

Add a New Project


Follow these steps:
1. Started your application. Now, press F6 to add a new project.
2. Enter the following values on the Add Project panel, and then press Enter.

Value Enter
Project ID PROJ01
Project Description McCready database app.
Project Start Date 121098
Project End Date 010199

The display changes after you enter a project.

3. Add the following two projects to the database:

Value Enter
Project ID PROJ02
Project Description Email client for IS
Project Start Date 030199
Project End Date 040499

Value Enter
Project ID PROJ03
Project Description Chg McCready app to ODBC
Project Start Date 050599
Project End Date 060599
4. Press F3 to exit the Add Project panel. Your main panel should look like this:

108
CA Plex 7.2.1

5. Press F3 again to exit the application.


For now, do not delete or change any of the projects you entered in the preceding steps. The following steps show you
how to do so.

Delete a Project
Follow these steps:
1. On the Edit Project panel, tab to the grid selector field for the project you want to delete.
NOTE
CA Plex uses the term grid for an System i subfile.
2. Enter 4 in the field, then press Enter.

Change a Project
Follow these steps:
1. On the Edit Project panel, tab to the field you want to modify (you cannot modify the primary key field).
2. Type over the existing value with the new value, and then press Enter.

Preserve Data
By default, each time you build your application, CA Plex rebuilds all of the objects you select in the Generate and Build
window, including the tables in your database. Because rebuilding a database table erases all data in the table, if you
leave your local model set up as it is, the next time you build, you will lose all of the data you just entered.
You can prevent the loss of this data by entering a TBL implement SYS No triple for the table. This keeps the table from
being rebuilt the next time you build the entity to which it is scoped (in this case, Project).
Remember, if you make any changes to an entity that affect its table, such as adding fields to it, you must set
the implement SYS value back to Yes, and regenerate the table. Any data you entered in the table will be lost. If you want
to preserve data entered after rebuilding, make sure you reset the implement SYS value to No.
To set the generation status for the Project entity table
1. From the Object Browser, drag Project.Physical Table to the source object field in the Model Editor.
2. From the verb list, select implement SYS.
3. From the target object field, select the value No, then press Enter.

109
CA Plex 7.2.1

4. Save your model.

Modify the User Interface


You can change the way your application looks. You can modify the panel design of the Project entity, it inherited from the
class libraries, to make it look better.

Why Panel Designer?


You probably noticed when you used the application as directed in Tutorial for Windows, it did not look right. The headings
for the columns all start with Project even though the panel title is Edit Project. The long column headings cause the
columns to extend all the way to the right edge of the panel, with wide gaps between the values.

You can fix the following problems using the Panel Designer:
• Shorten the column headings.
• Move the columns closer to each other for easier record reading.
• Add an entry to the Options area above the columns, in preparation to define the relationships between entities, in
which you define the Task entity.

Modify the User Interface Using the Panel Designer


User interface refers to all the panels with which your end users interact. Use the Panel Designer to modify the
appearance of your user interface.
Follow these steps:
1. Click the Entity button on the Object Browser.
2. Expand the Project entity, then expand the Grid Maintenance Suite function, and then expand the Edit Grid User
Interface function.
3. Right-click List Panel and choose Editor from the pop-up menu.
The Panel Designer appears, displaying three windows:
– Design Window: Shows you what the panel will look like when it is generated.
– Panel Palette: Shows you the various panel elements.
– Property Sheet: Enables you to make or change settings for the elements of the panel.
4. Arrange the elements so that they do not overlap, enabling you to work with the contents of each.

Use the Design Window


The Design Window is the Panel Designer’s main window. You can create or change a window and see how your
changes affect the panel’s appearance using the Design window. You can select, move, and resize fields and other user
interface elements using this window. When you make visual changes to the panel and its elements using other windows,
the changes appear here.
A panel’s elements are grouped into regions. A region is the equivalent of a DDS format.
See the panel’s main region used to add and edit projects.

110
CA Plex 7.2.1

The Panel Palette shows all the elements of the panel, such as fields, labels, and buttons, which are grouped under
folders and regions. Feel free to expand the folders and regions to see what they contain. Most of the visible elements are
contained in regions. Notice that you can see the five regions of the Panel Palette:
• Grid
• Title
• Function key text
• Selector text
• Pane
When a region is expanded, as the Grid region is in the following example, you can see the elements contained in that
region. In the case of the Grid region, this includes the Grid Selector, Project ID, Project Description, Project Start Date,
and Project End Date fields.

When represented on panels, fields contain more than one part, including at least one label and a control. Notice on the
preceding graphic that the Project ID field shows both a column heading and an Edit control. The label indicates whether
it is a Left Label, a Column Heading, or a Right Label. The type of label indicates if it appears to the left or right of the field
(left/right label), or as a column heading. The control is the part that end users interact with. The settings for the control
indicate how it appears.

Review the Property Sheet


The Property Sheet shows you the properties of the elements that you select in either the Design Window or the Panel
Palette, and enables you to change the settings for those properties. Among other things, you can change color, (in some
cases) size, and position. To see what you can change about an element, select it in the Design Window or the Panel
Palette, and check its properties on the Property Sheet:

The properties you can change depend on the type of element selected. For example, you can set the Allow Blank
property for a field, which determines if a blank field is a valid entry. But end users cannot enter text for a label, so if you
select a label on a panel, the Property Sheet does not display this property.
To visually indicate that the Project ID field is a key field, you will now change it so that its text appears in turquoise.

111
CA Plex 7.2.1

Change the text formatting for the Project ID field


Follow these steps:
1. Reopen the Panel Designer, if you have previously closed it.
2. Expand Edit Project in the Panel Palette. Expand the Grid region, and then the Project ID field.
Note the icons used. The

icon represents a region. Remember, a region is an area of a panel, and that there
are five regions on this panel. You will make changes in the Grid region, which is the
section that displays the four fields you defined in your first application in 20 minutes. The

icon represents a field. You expand the field icon to view or select the components (controls and labels) of the field.
3. Click the different regions
in
the Panel Palette.
NOTE
As you select a region, it is highlighted in the Design Window. When a region is highlighted, a dotted line
appears around its borders.
4. Select Edit control under the Project ID field.
This selects the window control part of the Project ID field. Notice that in the Design Window, the control is selected.
Notice also, that the Property Sheet changed to show the properties that you can modify for the edit control.
5. Click the Text Color property on the Property Sheet.
The current value for the property (Green) appears in the top area of the Panel Palette:

The area at the top may display as an edit box, edit box with a Three Dots button
,
or a combo box (as in the previous graphic), depending on the property.
6. Select Turquoise from the combo box displayed at the top of the Property Sheet.
7. Leave the panel open for the next steps.
Notice that the color of that field changes in the Design Window.
8. Leave the panel open for the next steps.
Consider the following scenario in case of WinC grid:
The Grid field font size should be less than or equal to Grid region font size if the Grid field type is not Combo box,.If a
Grid field has a font size greater than Grid region font size the field text will be partially visible.

Change Individual Controls


When you edit panels, you can make changes to individual elements, as you did in the previous steps. In this section,
you make additional changes to elements on a panel. Currently, the labels for the columns on the panel open in the Panel
Designer all start with Project, even though the panel’s title is Edit Project. Because this is redundant and takes up screen
space, you will delete the word Project from each of these labels.
Next, you will modify the properties of the fields in the Grid region.
Follow these steps:
1. Expand the Grid region In the Panel Palette, and then expand each of the fields under it.
2. Select Column Heading under the Project ID field.
3. Change the label’s text value from ID to Project ID in the Property Sheet. Click the Apply button.
Notice that the field’s label changes in the Design Window:

4. Repeat Steps 2 and 3 to add the word Project to the other three labels.

112
CA Plex 7.2.1

5. Click the Save toolbar button

to save the changes in your model without closing the Panel Designer.

Change Multiple Controls


When making changes to a panel, you may need to make a change to more than one control. In the following steps, you
will move the Description, Start Date, and End Date fields to the left to make space between the right edge of the End
Date field and the edge of the screen.
Follow these steps:
1. Select the Project Description field in the Panel Palette. Press and hold down Ctrl; then select the Project Start Date
and Project End Date fields.
Notice that the text in the title bar of the Property Sheet changes to Multi-Select. This indicates that there is more than
one component selected in the Design Window. Also, notice that the properties you can change are fewer when you
have multiple elements selected; only the properties that they have in common are available.
2. Drag the fields to the left in the Design Window, so that there is only a single space between the Project ID field and
the Project Description field.
NOTE
While dragging the cursor, it may change to a

symbol indicating that the fields cannot be dropped where you have positioned them. Move the mouse down
a bit and the cursor should return to normal.
The Design Window appears as follows:

3. Repeat this process to move the Project End Date field so that it has only a single space between it and the Project
Start Date field.
4. Keep the Panel Designer open for the next section.

Add Static Text


Later you will add the ability to assign tasks to projects. In preparation for this stage, you next add static text to your panel
that tells the end users how to get to the Add Tasks panel.
Follow these steps:
1. Right-click Selector text and select Create Static.
The Create Static dialog appears:

2. Enter 5=Work with tasks in the Name field. Then click OK.
3. Select the new static item under the Selector text region in the Panel Palette.
4. Notice that, in the Design Window, the selected static text is behind the text at the top of the region. Drag the static text
down and to the right so that it is to the right of 4=Delete.
Your panel appears as follows:

5. Close the panel design and save your changes.

Generate and Build the Function


Now that you have modified the panel that lists all of the projects, you are ready to regenerate and rebuild the function to
which it is scoped.

113
CA Plex 7.2.1

As you have only modified the panel scoped to Project.Grid Maintained Entity.Edit Grid User Interface, you need not to
generate the entire project. Open the Generate and Build window, and select Project.Grid Maintained Entity.Edit Grid User
Interface. Then, generate and build this function. This action generates and builds both the function and the panel scoped
to the function.
To see the changes you made, run the Edit grid user interface function. The panel appears as follows:

Exit the application.


More Information
• How to Integrate Your Generated Application
How to Integrate Your Generated Application
You had previously defined the Task entity, and then added processing enabling end users to add tasks to a project and
to assign employees to those tasks. You have an application with panels that enable you to add projects, add tasks to
projects, add employees, assign employees to tasks, and access tasks for a project. You can now integrate all of the
panels together with a top-level menu.
Follow these steps:

Create a Top-Level Menu


CA Plex creates standard OS/400 programs that you can call from any System i menu system. OBASE provides its own
menu system that you will use to create a top-level menu.
Follow these steps:
1. NChange the Object Browser to display functions.
This is the first time you will create an inheritance triple to inherit from a function.
2. Change the object type to function in the Model Editor, and add the following triple:
Project Manager is a OBASE/Default Objects.MDI Template
NOTE
To get to Default Objects.MDI Template in the Object Browser, display entities, make sure library objects are
showing, and expand OBASE/Default Objects.
This defines the unscoped function, Project Manager. Remember, to view unscoped functions in the Object Browser,
you must change the Object Browser to view functions. Until now, you have only worked with scoped functions, which
you viewed with the Object Browser set to show entities.
3. Expand the Project Manager function to show the objects it scopes.
Project Manager has two functions scoped to it:
4. Note information that displays information about the application, and MDI Frame Processing displays the top-level
menu.
It also scopes a panel called Common Menu, which is used primarily with non-5250 applications
5. Modify the top-level menu to add menu items to it.
6. Open Project Manager.MDI Frame Processing.MDI Frame.
7. Select the Selector text region in the Panel Palette.
8. Move the Selector text region to the center of the panel in the Design Window.
9. Add the following static text items to the Selector text region as discussed under Adding Static Text in the section
Modify the User Interface.
1. Work with projects
2. Work with employees
10. Rearrange the static texts to make them visible.

114
CA Plex 7.2.1

11. Add the following logical events to the panel:


Work with projects
Work with employeesFor more information, see To Add a Logical Event to the Edit Project Panel in the section How
to Define the Task Entity and Process Enabling?.
12. Add the grid selector values 1 and 2 to the panel, and associate them with the corresponding logical events.
Instead of adding them under the Grid region’s menu selector field, you must add them under the Selector text region’s
menu selector field.
13. Close the panel and save your changes.
14. Edit the function Project Manager.MDI Frame Processing so that the application calls the function Project.Grid
Maintenance Suite.Edit Grid User Interface when the Work with projects logical event is triggered. See Add
Functionality to Logical Events in Define Relationships Between Entities
15. Select the post point that follows the 0 Additional Events edit point.
16. Click the Action Diagrammer under the construct you just created.
17. Add another instruction to the function so that it calls the function Employee.Maintenance Suite.Maintenance UI when
the Work with employees logical event is triggered.
18. Close the function and save your changes.

Generate and Build Your Applications


Now, you are ready to generate and build your application and test it. After you complete these tasks, you will be finished
with this tutorial. Generate and build the Project Manager and all of its scoped objects.
How to Define, Generate, and Build a Project Entity

Test Your Generated Application


To test your generated application, see Test the Application.

Testing Your Generated Application


After you generated and built the application, run the Project Manager.MDI Frame Processing function.
Note that a top-level menu panel appears as follows:

Follow these steps:


1. Enter 1 and press Enter.

115
CA Plex 7.2.1

The Edit Project panel appears.


2. Navigate to the grid selector field for the first project.
3. Enter 5 and press Enter.
The Edit Task panel appears.
4. Note that only the tasks assigned to PROJ01 appear in this panel.

5. Close the application.

How to Define Entity Relationships Using Diagrammer


This scenario provides the tutorial on how Plex developers use the CA Plex diagramming tool to create an Entity
Attributes diagram. You also define the other two entities in your model (Employee and Task) and define the Employee’s
attributes and the relationships among all three entities.
Follow these steps to complete this scenario

The following diagram illustrates how you can define entity relationships using Diagrammer in CA Plex:

116
CA Plex 7.2.1

Figure 4: Scenario diagram to define entity relationships using diagrammer

More Information

117
CA Plex 7.2.1

• Understand the Diagrammer


• Create a Diagram
• Define Entities with the Diagrammer
• Define Attributes with the Diagrammer
• Define Relationships Between Entities
• Define Employee and Its Attributes
• Modify the Panel - Hide Fields on the Panel
• Generate and Build the Employee Entity
• Test the Application

Understand the Diagrammer


Most of the time, the first step in creating a database application is creating a data model. In the data model, you specify
how real-world entities are represented in a database.
With the project management application you are designing, the real-world entities map quite easily into database objects.
The application tracks projects, the tasks that make up those projects, and the employees that are assigned to those
tasks. Each of these is represented by one entity.
Note: Entity Attributes (EA) diagrams in CA Plex are a little bit different than they are in other applications. EA diagrams
typically only display entities and their attributes, but in CA Plex, relationships between entities are also displayed.
In CA Plex, EA diagrams provide a visual representation of the entities that are stored in a database, their attributes, and
the relationships between the entities. Diagrams enable you to visually communicate the specifics of an application to
other developers or business analysts, and in some cases, to your end users.
The following example shows how your EA diagram appears:

118
CA Plex 7.2.1

In diagrams, objects are represented by rectangles, rounded rectangles, and ovals. These objects are called nodes. A
relationship between two objects is represented in one of two ways:
• As a line (called a link) which joins the two nodes
• As a node within a node (called a sub-node)
In the diagram, you will create two objects:
• Rectangles that represent entities
• Rounded rectangles that represent attributes of those entities
Together, two nodes, and the link between them, or a node and its sub-node, are equivalent to a triple in an CA Plex
model. For example, you can see in the preceding graphic that the Project entity has four sub-nodes: Project ID, Project
Description, Project Start Date, and Project End Date. These correspond to the following triples, previously created.
Project known by Project ID
Project has Project Description
Project has Project Start Date
Project has Project End Date
When you define and change objects using the Diagrammer, your changes are reflected everywhere in the model (just
as if you had used the Model Editor or another editor to make the changes). Similarly, if you delete a triple in the Model
Editor, any corresponding links on diagrams are also removed. But the opposite is not true. If you delete a link using the
Diagrammer, the triples created when you created the link are not deleted.

119
CA Plex 7.2.1

Choose Between Editors


For much of the data modeling stage of your application development, you can use either the Diagrammer or the Model
Editor because they both create the triples that define your entities, the attributes of your entities, and the relationships
between entities. You can use the editor of your choice to create this part of your model.
For the purpose of this tutorial, however, use the Diagrammer to define the remaining two entities, their attributes, and the
relationships among all of the entities.

Create a Diagram
CA Plex supports many types of diagrams (including diagram types that you can make yourself), but this tutorial only
shows you how to create an Entity Attributes diagram.
Perform the following tasks in the diagram you create:
• Add the Project entity, which you already defined
• Define the Task and Employee entities
To create an Entity Attributes diagram
1. Open the Model Editor.
2. Enter the following triple:
Project described by Project Diagram
This creates the diagram object. Remember, you can drag the Project entity from the Object Browser to the Model
Editor, rather than typing it in manually.

3. Select Diagram from the object type list in the Object Browser.
4. Select Project Diagram from the list, and click the Editor toolbar button on the Object Browser.
The diagram opens with the Select Diagram Type dialog on top:

120
CA Plex 7.2.1

5. Select Entity Attributes and click OK.


You can now work in the diagram you just created. A diagram is like a canvas, on which you put nodes, sub-nodes,
and links between nodes, to represent your data model.
6. Click the Entity button
on
the Object Browser to display entities.
7. Drag the Project entity from the Object Browser to the upper-left corner of the diagram.
Note that the diagram creates a node for the Project entity. Also notice that it has an asterisk (*) after the name:

The asterisk indicates that the object has attributes that the diagram can show.

121
CA Plex 7.2.1

Next, you will change a diagram setting so that it shows the attributes of all entities represented by it.
8. Select Always Show Sub-Nodes from the Layout menu.
9. Click the Refresh button.
The diagram now displays the attributes you defined for the Project entity.

Notice that the node automatically resized to show all of its attributes.
The Project ID sub-node has a lighter color to indicate that it is a key. You will learn later how the Diagrammer uses
display characteristics to indicate foreign keys and other special attributes.

Define Entities with the Diagrammer


After you define Project, the first of three entities for the application you are building, you can proceed to the next step,
define the Employee and Task entities using the Diagrammer.
Follow these steps:
1. Reopen the diagram, if you have closed it.
2. Right-click the upper-right corner of the diagram, and select Create Node, and then select Entity.
The New Node dialog appears.
The caption on the dialog is Entity. The caption on this dialog shows you the type of object you are defining.

122
CA Plex 7.2.1

NOTE
When you create a node by right-clicking in the diagram, the node appears where you click the mouse.
3. Type Task and click OK.
NOTE
The Task node appears where you clicked your mouse.
4. Move your mouse to the lower-right corner of the diagram and repeat steps 2 and 3 to create a node for the Employee
entity.
Your diagram appears as follows:

Define Attributes with the Diagrammer


The Task and Employee nodes do not have asterisks, as the Project entity. This shows that these entities do not have
any attributes. This section discusses how to define a primary key and non-key attributes for both entities using the
Diagrammer.
Follow these steps:
1. Right-click the Task node and select Create Sub-Node, and then select Primary Key.
2. Type TASK ID in the New Node dialog and click OK.
The Diagrammer creates the sub-node:

123
CA Plex 7.2.1

3. Note that the sub-node is not contained within the Task node.
4. Right-click the Task node and select AutoLayout.
The AutoLayout function enlarges parent nodes so that they can hold all of their sub-nodes. It also organizes the sub-
nodes within the parent node. In this case, it enlarges the Task node, and puts the Task ID node inside it.
NOTE
When right-clicking entity nodes, make sure you are clicking the parent node, and not any of its sub-nodes.
5. Right-click the Task node and select Create Sub-Node, and then select Attribute.
6. Name the sub-node Task Description.
7. Repeat Steps 1 and 2 for the Employee entity to define a primary key called Employee ID. Repeat Steps 4 and 5 to
define the following non-key attributes:
– Employee Name
– Employee Billing Rate
– Employee Email
– Employee URL
8. Select the Employee and Task nodes and use Auto Layout

.
Make sure that each entity is in a corner of the Diagrammer window.
9. Open the Model Editor. If it is already open, click the Clear Focus toolbar

button:
This action, defining entities and their attributes in the Diagrammer, created corresponding triples in the model. In the
next section, you may define relationships between the entities (which also creates triples).

Define Relationships Between Entities


Relationships between entities can be both owned by and refers to relationships.

124
CA Plex 7.2.1

This section discusses how to define an owned by or a refers to relationship between entities.

Define an Owned By Relationship


Follow these steps:
1. Open the diagram if you had previously closed it.
2. Select the Task entity.
3. Hold down the Control key and right-click the Project entity. Select Create Link, and then select Owned By
An owned by link is created between the two entities.
NOTE
The link shows a one-to-many relationship between the two entities. This indicates that a project can have
many tasks, but that a task can belong to only one entity.
– • If the label owned by is not visible, you can turn on label display by clicking the View menu, Display Link Labels,
Link Names.
• If the link label appears on top of one of the nodes, click the label to select it and drag the label to a more
appropriate location.
4. Focus the Model Editor on the Task entity, which shows that a triple was added to your model when you created the
owned by relationship between Task and Project.
5. Set the Object Browser to display entities. If you do not see the Task entity, refresh the Object Browser.
6. Drag the Task entity from the Object Browser to the bottom section of the Model Editor. This shows all of the triples
associated with the Task entity.
Creating the relationship between the Project and Task entities has created the triple Task owned by Project.
7. Click the Clear Focus toolbar button. Clearing the focus in the Model Editor causes the editor to show all triples in the
model.

Define a Refers To Relationship


You can define the refers to relationship between the Task and Employee entities.
Follow these steps:
1. Select the Task node in the Diagrammer.
2. Hold down the Control key and right-click the Employee entity. Select Create Link, and then select Refers To.
A refers to link is created between the two entities.
NOTE
This creates a many-to-one relationship, indicating that an employee can be assigned to many tasks, but that
a task can have only one employee assigned to it.
3. Refresh the Model Editor.
NOTE
Creating the relationship between the Task and Employee entities created the triple Task refers to
Employee.
You have now defined relationships between the Project, Task, and Employee entities.
Defining these relationships caused the primary keys of the Employee and Project entities to become foreign keys of
the Task entity.
Next, you can change the diagram to display these foreign keys.
4. Select the Task entity in the Diagrammer.
5. Right-click the entity, and select Resolved Keys, and then select Show to display these foreign keys.
Your diagram changes to display the Employee ID and Project ID attributes in the Task entity.

125
CA Plex 7.2.1

NOTE
The two foreign keys have dashed borders. The Project ID node is displayed in the same color as the Task
ID node, as it becomes part of the Task entity’s key (because it results from an owned by relationship). This
type of attribute is usually called a parent key because it is the key of the parent entity. The Employee ID
node is darker because it is not part of the Task entity’s key.
6. Close the Diagrammer. Click Yes to save your changes.

Define Employee and Its Attributes


Using the Diagrammer, you have defined the Task and Employee entities. Now, you must define the Employee entity. You
will complete the definition of the Task entity as discussed in How to Define the Task Entity and Process Enabling?. After
that, you can generate and build the Employee entity, and then test that part of your application.
This section discusses the following topics:

Define the Employee Attributes


This section discusses how to add triples for Employee’s attributes to inherit structure and functionality from class library
fields.
Follow these steps:
1. Add the following triple i the Model Editor:
Employee ID is a OBASE/Code
NOTE
The is a verb you use in this step is different from the one that you used in the previous section. There are
several verbs that have the same name, but which have a different target object. Make sure to select the
verb that matches the target object (in this step, the is a FLD verb).
For more information on OBASE/Code, see Define Field Properties.
2. Add the following inheritance triples:
Employee Name is a OBASE/Narrative
Employee Email is a OBASE/Narrative
Employee URL is a OBASE/Narrative
Inheriting from OBASE/Narrative gives each of these fields a length of 25.
These fields may require more than 25 characters to store the whole name, email address, or URL. One of the
powerful aspects of inheriting from class libraries, though, is that you can change the default values.
3. Add the following triples to increase the field lengths (the numbers are displayed in red because they are literal
values):
Employee Name length 40
Employee Email length 50
Employee URL length 50
By adding these three triples, you effectively changed the database schema, the user interface, and all of the
processing for these values to use a different length for each field.
4. Add the following triple:
Employee Billing Rate is a OBASE/Price
Inheriting from Price causes Employee Billing Rate to store a number with two decimal places.

Define the Employee Entity


This section discusses how to add triples for Employee to inherit a user interface from class library entities.

126
CA Plex 7.2.1

Follow these steps:


1. Change the Object Browser to show entities again, and click Refresh.
2. Drag the Employee entity from the Object Browser to the body of the Model Editor. The Model Editor should look like
this:

3. Add the following triple:


Employee is a OBASE/User Maintained Entity
This inheritance triple provides Employee with user interface functionality from User Maintained Entity in the OBASE
class library.
4. Refresh the Object Browser, and then expand the Employee entity until the Object Browser looks similar to the
following example.

Notice that Employee inherited the function Maintenance Suite, which has the functions Change User Interface, Create
User Interface, Delete User Interface, and Maintenance UI scoped to it, each of which scopes a panel object. These
four functions display panels on which end users can add, change, and delete Employee data. You will see how the
functions interact when you generate and build the Employee entity later. (You may not use the two print functions.)

127
CA Plex 7.2.1

5. Add the following triple:


Employee is a OBASE/Referenced Entity
This gives Employee functionality that enables end users to select from a list of employees to assign to a task. This is
covered in more detail in the following section.
The inheritance triples you created in the previous steps provided the following to the Employee entity:
• Functions that let you add, change, and delete employees
• Ability to access a list of employees from the panel that lists tasks

Modify the Panel - Hide Fields on the Panel


This section discusses how to use the Panel Designer to make another type of change. You can change
Employee.Maintenance Suite.Maintenance UI.List Panel and Employee.Select Instance User Interface.List Panel so that
the panels display only selected Employee’s fields.
As the 5250 screen can only display 80 characters horizontally in its low-resolution mode, you cannot display all of
Employee’s attributes on a single line. You could move a couple of the fields to a second area on the screen. However,
users only need enough information to identify the employee they want to modify or delete. Hence, change the display so
that the Employee Email and Employee URL fields do not display on the panel.
As users typically use either the Employee ID or Employee Name to identify the individual, and may use the Employee
Billing Rate to decide whom to assign to a task, you may leave these fields visible on the panel.
To change the panel that lists Employees, follow these steps:
1. Open Employee.Maintenance Suite.Maintenance UI.List Panel.
2. Expand List Employee in the Panel Palette, and then Grid.
3. Right-click the Employee Email field and select Visible, and select No.
4. Repeat Step 3 to set the Employee URL field so that it does not display.
Notice that the fields no longer appear on the panel in the Display Window.
5. Edit the labels for the columns to remove the word Employee from each. For more information, see the section
6. Change an Individual Control. For more information, see Modifying the User Interface.
7. Move the fields so that there is only a single space between them.
The Design Window must appear as follows:

128
CA Plex 7.2.1

8. Close the panel.


9. Click Yes to save your changes.
The Select Instance User Interface panel has the same problem as the main Employee panel.
10. Open Employee.Select Instance User Interface.List Panel and hide the Employee Email and Employee URL fields,
change its column labels, and move the fields next to each other, as you did in the preceding steps.
When you are done, the Design Window appears as follows:

129
CA Plex 7.2.1

Generate and Build the Employee Entity


You have now:
• Defined the Employee entity and its attributes
• Changed the lengths of the Employee Name, Employee Email, and Employee URL fields
• Fixed problems in the panels
You are now ready to generate and build the Employee entity.
Follow these steps:
1. Open the Generate and Build window and select the Employee entity.
2. Generate and build this entity and all of its scoped objects.
The Employee entity expands, showing all of its scoped objects that can be generated; those that will be generated
are highlighted.
A Confirm Generate dialog appears, indicating the number of objects that are generated. Not all of the scoped objects
are selected. Click Yes.
For detailed instructions, see Generate and Build the Project Entity.

Test the Application


After you are done generating and building the entity, you are ready to test the Employee entity. To test the entity, run the
Employee.Maintenance Suite.Maintenance UI function.
This function lists all of the employees in your database. Because you inherited attributes from User Maintained Entity,
rather than Grid Maintained Entity, you have a group of functions for maintaining your Employee entity, rather than a
single function, as you did with the Project entity.

130
CA Plex 7.2.1

To work with employee data, run the Maintenance UI function and then access the other panels to add, change, and
delete employees.
The Edit Employee panel appears as follows:

Add Employees to the Entity


Follow these steps:
1. Press F6 to add employees to the entity.
The Add Employee panel appears. This panel is scoped by Employee.Maintenance Suite.Create User Interface.

2. Add the values for the following employees, pressing Enter between each:

Value Enter
Employee ID EMP01
Employee Name Randy Johal
Employee Billing Rate $45.00
Employee Email [email protected]
Employee URL http://www.anonycorp.com/~rjohal

Value Enter
Employee ID EMP02

131
CA Plex 7.2.1

Employee Name David Castro


Employee Billing Rate $32.00
Employee Email [email protected]
Employee URL http://www.anonycorp.com/~dcastrol

Value Enter
Employee ID EMP03
Employee Name Martha Kolman
Employee Billing Rate $55.00
Employee Email [email protected]
Employee URL http://www.anonycorp.com/~mkolman
3. Press F3 to close the panel after you add these employees.
4. Add the following triple to your model to keep the data you entered from being lost the next time you generate and
build the Employee entity:
Employee.Physical Table implement SYS No

Delete Employees From the Entity


Follow these steps:
1. Navigate to the Grid Selector column for Randy Johal on the Edit Employee panel.
2. Type 4 in the selector field, then press Enter.
The Display Employee panel appears:

This panel is scoped to Employee.Maintenance Suite.Delete User Interface.


3. Press Enter again.

Change Information About an Employee


Follow these steps:
1. Navigate to the Grid Selector column on the Edit Employee panel for the record you want to change.
2. Type 2 in the selector field then press Enter.
The Change Employee panel appears.

132
CA Plex 7.2.1

3. Navigate to the field you want to change.


4. Overwrite the contents of the field, then press Enter.
5. Exit the application.

How to Define the Task Entity and Process Enabling


You had previously created the Task and Employee entities and then specified relationships between them: Project owns
Task and Task refers to Employee. You must now add inheritance triples for the Task entity, and then add processing that
enables end users to add tasks to a project and to assign employees to those tasks.
To defiine Owned By Relationships, follow these steps:

Define Task and Its Attributes


You had previously defined Task in the Diagrammer, however, the Task does not have any functionality yet. In this section,
you will learn how to define the Task entity and its attributes.

Define the Attributes for the Task Entity


The first step in defining attributes for the Task entity is to add triples for the attributes to inherit structure and functionality
from class library objects.
Follow these steps:
1. Open the Model Editor and Object Browser, if they are not opened previously.
2. Add the following triples:
Task ID is a OBASE/Code
Task Description is a OBASE/Narrative
These are the same objects that the Project ID and Project Description fields inherited from.

Define the Task Entity


You define the Task entity by adding triples so that Task inherits a user interface and database functionality from class
library objects.
Follow these steps:
1. Refresh both the Model Editor and Object Browser, and click the Entity button

on the Object Browser if entities are not already showing.


Notice that the Task and Employee entities are both visible in the Object Browser.
2. Drag the Task entity from the Object Browser to the body of the Model Editor. The Model Editor should look like this:

133
CA Plex 7.2.1

These are the triples that CA Plex added to your model when you created the diagram previously as discussed in How
to Define Entity Relationships Using Diagrammer .
3. Add the following triples:
Task is a OBASE/Grid Maintained Entity
You created this same triple for the Project entity. For more information, see Add Functionality to the Project Entity. It
gives Task basic user interface and database functionality.
4. Add the following triple:
OBASE/Child
This triple gives Task special processing based on its relationship with its owning entity, Project. You used the
Diagrammer to define the triple, Task owned by Project, which describes the relationship between the entities. The
Task is a OBASE/Child inheritance triple provides the Task entity with cascade delete functionality. This functionality
causes all tasks owned by a project to be deleted when the owning project is deleted.
5. Select the Task is a OBASE/Child triple in the Model Editor by clicking in the center column.
6. Click the Editor button on the toolbar

.
The Template Editor appears.
7. Use the Template Editor to specify the owner of an entity that inherits from OBASE/Child.

8. Click in the right-most column, and enter Project.


9. Close the Template Editor. Click Yes to save your changes.
10. Refresh the Model Editor. Notice that CA Plex added the following triple:
Task replaces OBASE/Parent
...by Project
This reflects the change you made in the Template Editor. The second line (...by Project) is called a continuation triple.
The indentation and ellipsis before the continuation verb indicate that the triple qualifies or modifies the triple above it.

Create a Key Code on a Panel to Define Restrictor Processing


When an end user opens the Edit Task panel from the Edit Project panel, the Edit Task panel should not list all of the tasks
for all of the projects, as this would be confusing. It is better to show only the tasks that were created for a specific project.

134
CA Plex 7.2.1

The functionality that you set up to accomplish this is called restrictor processing, because it restricts database access
functions so they only display the instances associated with a particular key value, in this case the primary key of the
project the end user selected.
Adding a key code to a panel involves three steps:
1. Add a static to the panel to tell the end users what the key code is.
2. Create a logical event on the panel.
3. Add a list value to the grid selector.
You have previously added the static text telling the end user what key code to use to open the Edit Task panel. See Add
Static Text in the section Modify the User Interface. In the following steps, you will create the logical event that causes the
panel to appear, create a grid selector value for the panel, and then add a key code to the Edit Project panel. Then, add
functionality so that when an end user enters that key code, the project calls Task.Grid Maintenance Suite.Edit Grid User
Interface, the function that displays the Edit Task panel.

Create a Logical Event


A logical event is a construct you define to specify what happens in response to physical events, such as when the end
user presses a function key or enters a subfile option. You can map a logical event to more than one physical event. For
example, you can map a logical event, ClosePanel to two physical events: pressing Enter or pressing F3.
Follow these steps:
1. Open Project.Grid Maintenance Suite.Edit Grid User Interface.List Panel.
2. Expand the Panel Palette so that you can see the Events folder.
3. Right-click the Events folder, and select Create Event.
The Create Event dialog appears:

4. Enter Modify Tasks and press OK.


You have now created a logical event. Later, you will add functionality to the Project.Grid Maintenance Suite.Edit Grid
User Interface function to tell it what to do when the Modify Tasks logical event is triggered.
5. Leave the panel open so that you can perform the following tasks.

Create a subfile Option


You create subfile options so end users can enter a value in the subfile option field on the panel (the left-most field on the
Edit Project panel) to perform an action (in this case, open the Edit Task panel).
The following graphic shows you the Edit Project panel with a 5 in the subfile option field for the first project.

135
CA Plex 7.2.1

NOTE
CA Plex uses the term grid selector for the System i subfile option.
Follow these steps:
1. Expand the Grid region in the Panel Palette, then the Grid Selector field, and finally, the List folder.
The Panel Palette appears as follows:

2. Right-click the List folder and select Create Value.


A subfile option value, called Value, is added under the List folder.
3. Select the new value:

136
CA Plex 7.2.1

4. Specify the following settings in the Property Sheet:

Value Enter
Text 5=
Event Modify Tasks
Value Five
5. Close the panel and save your changes.

Add Functionality to Logical Events


Next, you will modify Project.Grid Maintenance Suite.Edit Grid User Interface so that when the Modify Tasks logical event
is triggered, the function calls the Task.Grid Maintenance Suite.Edit Grid User Interface function.
Follow these steps:
1. Right-click Project.Grid Maintenance Suite.Edit Grid User Interface on the Object Browser and select Editor.
The action diagram opens, with the Select Edit Point dialog over it. Before you can make a change or addition to a
function, you must specify where you want to make the change. This dialog enables you to select the edit or collection
point into which to insert new constructs.
2. Define your events.
To define your events in the Events Handler, select the post point after Edit Point 1 Additional events (which is under
Edit Point 0 Additional events).

137
CA Plex 7.2.1

The Action Diagrammer consists of three windows. If these windows overlap, drag or resize them so that you can work
with all of them at once.

3. Expand Panel in the Action Diagram Palette, and then Events.

138
CA Plex 7.2.1

The Action Diagram Palette is a container for all the instructions you can use in an action diagram, grouped by
similarity. The Panel folder holds all of the syntax elements you use when working with panel functionality.
4. Note the Modify Tasks logical event in the Events group created previously; see Creating a Logical Event.
5. Drag the Modify Tasks logical event from the Action Diagram Palette to the input line at the top of the main window.
The main window automatically adds the text Event: to the line when you drop the event, indicating that you are adding
the functionality for an event.
6. Press Enter.
The Action Diagrammer adds the statement in the input line to the body of the Action Diagram:

139
CA Plex 7.2.1

You specified that the function will do something when the Modify Tasks logical event is triggered. Next, you specify
what the function does.
7. Drag Task.Grid Maintenance Suite.Edit Grid User Interface from the Object Browser to the input line of the Action
Diagrammer (verify that you are dragging from Task, and not Project).
The Action Diagrammer now adds the syntax Function: to input line, so that the function calls the Task.Grid
Maintenance Suite.Edit Grid User Interface function when the logical event is triggered.
8. Press Enter.
The Parameter Mapping dialog appears:

When you call one function from another, often you need to pass information. In this case, when you call the function
Task.Grid Maintenance Suite.Edit Grid User Interface, you need to tell it which Project is selected in the Edit Project
panel so that Task.Grid Maintenance Suite.Edit Grid User Interface knows which tasks to display on its panel.
Next, you indicate which variable in the Project.Grid Maintenance Suite.Edit Grid User Interface function to map it to.
9. Click Map Parameter.
The Select Field dialog appears displaying all of the values CA Plex could use for the Project ID field. As you want to
see the tasks assigned to the project that an end user selected on the Edit Project panel, you must select a Project ID
field that comes from the grid on that panel.

140
CA Plex 7.2.1

10. Select the Project ID field that appears below the Grid entry and click OK. This indicates that the function will use the
Project ID selected in the Grid region on the Edit Project panel to determine which tasks to display.
11. Click OK on the Parameter Mapping dialog. The Action Diagrammer appears.
The Action Diagrammer should look like this:

NOTE
If you need to change the parameter mapping in the future, open this action diagram and double-click the
Call line.
12. Close the Action Diagrammer and save your changes.
13. Save your model.

Generate and Build the Task Entity and Project.Grid Maintenance Suite.Edit Grid User Interface
Now that you have set up a way to edit the tasks for a project, you only have to generate and build the following to see the
results of your work.
Follow these steps:
1. Generate and build the Task entity and all of its scoped objects, because you have fully defined this entity

141
CA Plex 7.2.1

2. Generate and build the Project.Grid Maintenance Suite.Edit Grid User Interface, because you added a key code to the
Edit Project panel to display the Edit Task panel.

Test the Application


See Test Your Fully Functional Application discussed next.

Test Your Fully Functional Application


You now have a fully functional application. You can enter projects and tasks, and also assign employees to those tasks.
To test the application, follow these steps:
1. Run Project.Grid Maintenance Suite.Edit Grid User Interface.
2. Navigate to the grid selector field for Proj01 and enter 5 in the field.
3. Press Enter to open the Edit Task panel. The Edit Task panel appears:

4. Press F6 to open the Add Task panel.


The Add Task panel appears. This is the panel scoped to Task.Grid Maintenance Suite.Create User Interface.
5. Notice that the Project ID field is already filled.

6. Enter the following data for a task:

142
CA Plex 7.2.1

Value Enter
Task ID TASKA
Task Description Create a data

The third field you need to fill, Employee ID, requires an exact match to the ID for the employee to whom you want to
assign the task. However, you may not know to whom you want to assign a task or an employee’s ID, so perform the
next step.
7. Navigate to the Employee ID field and press F4.
The List Employee panel appears.

Remember, you have already changed this panel to hide the Employee Email and Employee URL fields, for more
information, see Hide Fields on Panels in Modify the Panel - Hide Fields on the Panel.
8. Navigate to the grid selector field for Martha Kolman and enter 1.
9. Press Enter.
The Add Task panel reappears with the Employee ID filled in:

10. Press Enter to accept the task’s settings.

143
CA Plex 7.2.1

11. Repeat the preceding steps to add the following tasks:

Value Enter
Task ID TASKB
Task Description Verify model with clients
Employee Martha Kolman

Value Enter
Task ID TASKC
Task Description Decide which libs. to use
Employee Martha Kolman
12. Press F3 to close the Add Tasks panel, and again to close the Edit Task panel.
13. Type a space on the Edit Project panel to remove the 5 from the grid selector region for PROJ01.
14. Navigate to the grid selector field for PROJ02 and enter 5.
15. Press Enter, then enter the following tasks for this project:

Value Enter
Task ID T130
Task Description Architect email module
Employee David Castro

Value Enter
Task ID T131
Task Description Test email functionality
Employee David Castro

Add Functionality to the Project Entity


You can give the Project entity a user interface and functionality to interact with a database using inheritance.
Follow these steps:
1. Click the Entities toolbar button if the Object Browser is not displaying entities.
NOTE
No plus sign (+) to the left of the Project entity indicates that there are no objects scoped to it.
To add these triples, you must set the source object type to Entity in the Model Editor. You can change the object type
directly. But, when you drag an object from the Object Browser, it sets the object type and then shows all of the triples
for that object.
2. Drag Project from the Object Browser to the source object box of the Model Editor.
Similar to using the Inspect toolbar button, this action changes the Model Editor so that it only shows triples related to
the Project entity, changes the object type (assuming it was not already set to Entity), and puts Project in the source
object box.
3. Select is a ENT from the verb list.

144
CA Plex 7.2.1

NOTE
The is a verb that you use in this step is different from the one that you used to specify in inheritance for
Project’s fields. There are several verbs that have the same name, but have a different source and target
object. CA Plex only lets you select the verb that matches the target object (in this step, the is a ENT verb).
For more information about the types of is a verbs, search for is a in the online help index.
4. Enter EditDetail in the target object box, and press Enter.
You just created the triple Project is a FOUNDATI/EditDetail. This action indicates that Project inherits the structure
and functionality of the EditDetail pattern in the FOUNDATION pattern library. You can find the FOUNDATION/
EditDetail pattern in the Object Browser by verifying that library objects are displayed (by clicking the Show/Hide
Library Objects toolbar button) and scrolling down. For more information, select the EditDetail pattern in the Object
Browser, and press Shift+F1.
5. Click the Refresh toolbar button on the Object Browser.
By inheriting from EditDetail, the Project entity now has some scoped objects.
6. Click the plus sign (+) to the left of the Project entity and then click the Edit function to expand the Project entity and
the Edit function.

Project inherited one function, Edit, with a scoped panel and a caption, and two views, Fetch and Update. These
objects give Project a user interface, and enable it to store data to and retrieve data from a database.
Specifically, CA Plex performs the following actions:
– The Edit function displays the panel scoped by it.
– The Caption and Panel objects, which are scoped by the Edit function, store the layout of the Edit Projects panel.
– The Fetch and Update views scope functions that read and write database records.
7. Indicate how the Project entity stores information. Your application uses a relational database, so you need processing
that creates and maintains database tables. Set Project to inherit from STORAGE/RelationalTable for that functionality.
The Model Editor should still have Project in the source object box, and is a ENT showing in the verb list.
8. Drag STORAGE/RelationalTable from the Object Browser to the target object box, and press Enter to create the
following triple:
Project is a STORAGE/RelationalTable
9. Click the Refresh button on the Model Editor to see all the triples that you have defined for the Project entity.
10. Click the Refresh button on the Object Browser.
The object browser appears as follows:

145
CA Plex 7.2.1

11. Note that the Project entity has inherited an object, Physical Table from STORAGE/RelationalTable. This action
defines the table that is created in the database when you generate the application. The fields that you defined for the
Project entity are stored in this table.
Microsoft Office Access does not support views. However, the ODBC driver supports the SQL CREATE VIEW
statement, and creates a query in Microsoft Office Access.
Generating and building a view in CA Plex creates a query in Microsoft Office Access. Microsoft's technical support
described this situation as an undocumented feature. We do not recommend that you use it in CA Plex. Instead, set all
views to have VW type SYS = Table Access, so that views are implemented.
12. Drag the view Project.Fetch from the Object Browser to the source object box of the Model Editor.
13. Select type SYS from the verb list.
14. Select Table-access in the target object box, and press Enter.

15. Create the same triple for the view Project.Update.

146
CA Plex 7.2.1

How to Create a Wizard to Add a Project


This scenario discusses how you define a wizard that enables end users to add a Project. A wizard provides end users
an easy way to define a new project and all of the information that goes with it. This scenario is an example to show how
quick and easy it is to create sophisticated user interfaces by inheriting from patterns.
As Plex developers, you will create the wizard and define the following parts in a wizard:
• One where you specify information about the new project
• One where you add the tasks that are part of the project
This scenario gives you the first opportunity to work with the Action Diagrammer, which you use to modify inherited code.
To complete this scenario, follow these steps:

The following diagram illustrates how you can create a wizard:


Figure 5: How to Create a Wizard

147
CA Plex 7.2.1

More Information
• Define the Wizard
• Modify the Wizard Parent Panel
• Modify the First Part of the Wizard
• Modify the Second Part of the Wizard
• Add Commit and Rollback Processing
• Generate and Build Project Wizard
• Test Your Wizard

Define the Wizard


To create a wizard, you inherit from two patterns in the UISTYLE pattern library. You have not used this library directly, yet.
You create the wizard using a parent function that contains a child site, and two child functions that display panels inside
the child site.

The parent function is an unscoped function. It does not appear under either the Project or Task entities, as
Project.Edit and Task.Edit do. To view unscoped functions in the Object Browser, click the Functions toolbar

button .
Wizards are linear. In other words, you run each function in a specific order. You must design the sequence of a wizard
before creating its parts. After you determine the order of the parts, you use FNC comprises FNC triples to set up the
order. This wizard uses the Edit functions for the Project and Task entities, and uses them as the parts of the wizard.
After you define the wizard functions, the user interface appears as follows:

148
CA Plex 7.2.1

Follow these steps:


1. Drag the Project entity from the Object Browser to the Model Editor.
This changes the source object type of the Model Editor to Entity, and shows all of the triples currently defined for the
Project entity.
2. Add the following triple to define the first function in the wizard sequence:
Project function Add Project
Note: Double-clicking a target object in the Model Editor focuses on the object concerned. To reverse the double-click,
press the Esc key.
3. Double-click Add Project in the body of the Model Editor (in blue) to define the details of this function. Now add the
following triples:
Project.Add Project is a FNC UISTYLE/FrameChild
Project.Add Project is a FNC UISTYLE/EditInsert
Project.Add Project replaces VW UISTYLE/UIStyle.Update
...by VW Project.Update
Note: Remember to select Function in the Object Browser if you are dragging and dropping.
The Project.Update view can be found by expanding the Project entity in the Object Browser.
When you inherit from FrameChild, the panel scoped to your function becomes a child panel, which you can display in
a child site on the parent panel of the wizard.
The UISTYLE/EditInsert pattern provides a dialog that lets you enter a record, which is then validated before insertion
in the database.
The previous replaces VW triple specifies which view is used by the Add Project function to display and update
records. There are a number of replaces verbs available for functions—make sure you select replaces VW.
4. Add the following triple to define the second function in the wizard sequence:
Task.Edit is a FNC UISTYLE/FrameChild
Note: To get the Task.Edit function into the source object box, drag it from the Object Browser.
As you have created the Task.Edit function previously, adding the is a triple modifies the function so that it can run as
part of wizard.
5. Set the object type to Function in the Model Editor.
6. Add the following triples:
Project Wizard is a FNC UISTYLE/FrameWizard
Project Wizard comprises Project.Add Project
Project Wizard comprises Task.Edit

149
CA Plex 7.2.1

You have now created an unscoped function called Project Wizard.


When you inherit from FrameWizard, you get a panel with Back, Next, and Cancel buttons; a caption. Also, you get
some code that performs a wizard’s generic functions, such as moving back and forth through the parts.
Comprises triples specify which functions are called by the FrameWizard and appear as actual parts of wizard.
Note: The sequence of these two triples is important because it determines the sequence in which the parts appear at
run time. If necessary, you can change the sequence of triples by dragging and dropping them in the Model Editor.
7. Save your model.

Run the Basic Wizard


The series of triples you entered in the previous section provide the basic definition for the wizard. It is not yet complete
—there are some user interface refinements and additional processing we need to add. However, it is useful to generate,
build and run the wizard now. This lets you see how the basic wizard works and it helps you understand any additional
changes you make.
Since you last built the model, you defined two new functions, Project Wizard and Project.AddUpdate. You also modified
the function Task.Edit to inherit from UISTYLE/FrameChild. You have not yet generated and built the Task entity.

Generate and Build the Task Entity


Follow these steps:
1. Do one of the following:
– If the Generate and Build window is not already open, click the New Gen and Build toolbar button

to open it
– If the Generate and Build window is already opened then reload it
.
2. Select the following objects:
– The Project.Add Project function
– The Project Wizard function
– The Task entity (make sure it is collapsed so that all of its scoped objects are also generated and built)

3. Generate and build these objects. For detailed instructions, see Generate and Build the Project Entity.

Test the Wizard


Follow these steps:
1. Select Project Wizard in the Generate and Build window.
2. Click the Run toolbar button
.
3. Select Plex r7.0 Tutorial.dsn when prompted for a data source and click OK.
The first part of the wizard appears:

Try out the wizard and follow these steps:


– To create a new Project record, enter the required values and click Apply. Clicking Next action must cause the
record to be created. Then, the Apply button would not be needed at all.
– The Project Description is not a multi-line edit control and the date fields do not have spin controls.
– After you click Next, the controls on the second part of the wizard, do not fit properly on the dialog.
– Finally, after you create a Project record and click Next, the value you entered in the Project ID field does not
appear in the Project ID field on the second part of the Wizard.

150
CA Plex 7.2.1

These limitations are addressed later.


4. Close the wizard.

Modify the Wizard Parent Panel


When you inherit from the pattern UISTYLE/FrameWizard, the panel scoped by it has a child site in which the child panels
of the wizard are displayed.
You determine the size that the child site in a wizard needs to be by opening each of the panels that are displayed in
the site, and noting their size. You record the largest height and width of the child panels, and set the child site to those
dimensions.
The child site defined on the panel is too small to hold the panel scoped by Task.Edit, which measures 454 by 311 pixels
(you find a panel’s size by opening the panel and looking in the Property Sheet). Also, the child site extends to the bottom
of the panel, which means that the child panels overlap the buttons unless you move the button region.
Follow these steps:
1. Open Project Wizard.Panel (double-click Panel) using the Object Browser.

2. Select Panel (the top-level element) in the Panel Palette.

3. Change the Size property to 475,400 in the Property Sheet to make the whole panel bigger.
4. Expand Panel in the Panel Palette and select the ChildSiteP region.
This is the child site region, where the child panels appear.
5. Change the Size property to 454,311 in the Property Sheet.
6. Select the FrameParentP region in the Panel Palette.
This region is the beveled box that holds the Back, Next, and Cancel buttons.
7. Drag the box below the child site in the Design Window. To drag the entire region, first position the mouse pointer over
the small yellow box that appears in the top-left corner of the region when it is selected.
The panel appears as follows:

151
CA Plex 7.2.1

8. Save your model and close the Panel Designer.

Modify the First Part of the Wizard


Modifying the first part of the wizard results in changes that:
• Permit the value entered for the Project ID in the first part of the wizard to be available in other functions that comprise
the wizard
• Cause the Next button to request creation of a Project record and, if successful, to move to the next part of the wizard
• Hide the Apply button on the first part of the wizard and makes some other minor enhancements
Do the following:

Add a Field to a Variable


Adding fields to variables is equivalent to declaring variables in many programming languages. You cannot reference a
field in an action diagram until you add it to one or more variables.
Use the following procedure to add the Project ID field to the SharedData variable.
Follow these steps:
1. Open the function Project.Add Project.
2. Click Cancel on the Select Edit Point dialog.
3. Expand the Local variable group

in
the Variable Palette, and then select the SharedData variable:

152
CA Plex 7.2.1

4. Set the Object Browser to display fields.


5. Drag the Project ID field from the Object Browser onto the SharedData variable in the Variable Palette.
6. Expand the SharedData variable:
Refresh and notice that the variable now contains the Project ID field. This adds the following triples to the model:
Project.Add Project local Project ID
...for UIBASIC/SharedData
The Project ID could have been added to the SharedData variable by entering these triples in the Model Editor using
drag and drop in the Variable Palette. The result is the same whichever method you use.
7. Keep the Action Diagrammer open for the next section.

Update the Shared Data

Follow these steps:

1. Enter Insert inserted in the input line of the Action Diagrammer, and press F4.
The Action Diagrammer moves to the Insert Inserted Pre Point. (Pre Points are explained in more detail later.)
2. Select the Pre Point and press the space bar on the keyboard to expand it.
3. Click the line below the Pre Point so that it has focus. This is where you add a line of code. The body of the action
diagram appears as follows:

The Insert Inserted Pre Point corresponds to the point at which a new Project record was successfully inserted into the
database.

153
CA Plex 7.2.1

4. Copy the data from the Project ID field in the InsertP region (located in Panel, Project.AddProject in the Variable
Palette) into the SharedData variable so that the next part of the wizard can use it.
5. Type the following statement in the input line in the Action Diagrammer and then press Enter.

Set SharedData<Project ID> = InsertP<Project ID>


This statement copies the data from the Project ID field in the InsertP region into the SharedData variable, so that the
next wizard part can use it. Instead of typing the entire statement you could have constructed it using drag and drop
techniques, as explained in the next step.

Make the Next Button Add a Record


This section discusses how to add some processing that causes the Next button on the Wizard to trigger the creation of a
new Project record. Bear in mind that:
• The Next button is part of the Project Wizard function (inherited from UISTYLE/FrameWizard)
• The processing for adding a record is in the Add Project function (inherited from UISTYLE/EditInsert)
The Next button is needed to trigger an event in a different function. Fortunately, the wizard patterns provide the entire
infrastructure required—only a few lines of code need to be added.
When the Next button is clicked, it triggers an event in the Add Project function causing the Add Project panel to be
hidden (and then the Task.Edit panel to be shown in its place). The Add Project function has edit/collection points
(inherited from UISTYLE/FrameChild) that enable us to intervene in this processing.
Follow these steps:
1. Enter Set release control flag in the input line in the Action Diagrammer, and press F4.
The Action Diagrammer moves to the Pre Point before the Set Release Control Flag Edit Point.
2. Select the Post Point following this Edit Point and expand it by pressing the space bar.

This Post Point corresponds to when end users click the Next or Back buttons to move to a different part of the wizard.
At that stage, this you want to create a Project record using the values entered by the user. All the processing required
to validate the entered values and then create the record is provided in a subroutine called Process Insert. You simply
need to call this subroutine using a Go Sub statement.
3. Enter the following statement into the input line and press Enter:
Go Sub Process Insert
There is one further refinement required. The creation of the record may fail for a variety of reasons. For example,
the user may not have entered all the required values or they might try to create a record using the key of an existing
record. In these circumstances, you need to prevent the wizard moving to the next screen. There is a simple flag you
can set to control this—the ReleaseControl field.

154
CA Plex 7.2.1

There are a set of fields, Environment fields that indicate whether the creation of a record was successful. The
following If instruction uses a compound condition separated by OR operators to test these fields.
Because this instruction is quite long, it is shown on three lines, but you need to enter the entire instruction on one line.
You can type the entire line or drag or drop the required objects from the Variable Palette (see the following example).
4. Enter the following instruction immediately after the previous Go Sub statement:

If Environment<*Validation> IS <*Validation.*Abnormal>
OR Environment<*Returned status> IS <*Returned status.*Abnormal>
OR Environment<*Call status> IS <*Call status.*Abnormal>

NOTE
It is often easier to enter long action diagram statements by dragging the necessary parts from the palettes
rather than typing them. In this example, the state *Validation.*Abnormal was dragged from the Variable
Palette to the input line.
5. Enter the following statement inside the If construct you created in the previous step:

Set FrameChildL<ReleaseControl> = <ReleaseControl.No>


This statement prevents the wizard from moving to the second part if the creation of the Project record fails.
NOTE
You can find the FrameChildL variable in the Local variable group in the Variable Palette.

Check Your Modifications


You have now added all the necessary code to the Add Project function. As a final check:
1. Select Show Local Modifications from the View menu (or use CTRL+SHIFT+L).
This restricts the display to show only the code you added. Unless you made a mistake your action diagram should
look like the one below. This picture includes some additional comments in the code.
NOTE
Show Local Modifications is only available from the View menu when the Action Diagram Panel is open.

2. Select Show Full Logic from the View menu (or use CTRL+SHIFT+F).
This resets the display of the Action Diagrammer.
3. Keep the Add Project action diagram open for a later section.

Hide the Apply Button


The Apply button is no longer required on the Add Project function’s panel. In this section you hide it. At the same time,
some other improvements are made to this panel.

155
CA Plex 7.2.1

You should have the Add Project action diagram open. Here is a quick way to switch to the panel associated with an
action diagram:
1. Select Edit Panel from the View menu
(or
press F11).
The Add Project panel design appears as a white box without the usual title bar and border. This is because this panel
is a Child Panel that can only be run within a site on another panel.
2. Select the Apply button on the Design window. Click the right-mouse button and set the Visible property to No using
the pop-up menu. This is an alternative to setting this property on the Property Sheet.

3. Change the Project Description edit control into a multi-line edit control and add a spin control to the date fields. You
made these same changes to the Project.Edit panel previously.
4. That completes the changes to the Add Project function and its panel. Close the Action Diagrammer and the Panel
Designer and save your changes.

Modify the Second Part of the Wizard


You now modify the Task.Edit function to improve the way it works in the wizard. Recall from running the basic wizard; you
must restrict the display of tasks to show only the tasks for the project currently being added. The ID of the current project
is available in global memory (as you added it to the SharedData variable of the AddProject function.)
Follow these steps:

Add Project ID to the SharedData and Restrict Variables


1. Locate the Task.Edit function in the Object Browser and click the Editor toolbar

button .

2. Cancel the Select Edit Point dialog.

156
CA Plex 7.2.1

3. Open the Variable Palette.


4. Expand the Local variable group and then expand the DetailKey variable. Note that the Project ID field is available in
this variable.
5. Drag and drop the Project ID field from DetailKey to the Restrict variable. Then drag and drop it again to the
SharedData:
You have now added the Project ID field to the SharedData and Restrict variables. This adds the following triples to
the model:
Task.Edit local Project ID
...for STORAGE/Restrict
Task.Edit local Project ID
...for UIBASIC/SharedData
Note: For this exercise, Project ID is dragged from the DetailKey variable for convenience—it could have also been
dragged from the Object Browser and the result would have been the same.

Define Restrictor Processing


When end users use the wizard, they add a project in the first part, and then add tasks for that project in the second part.
The second part uses the Edit function scoped to Task, which contains a list of Task records. This list should not include
all of the tasks for all of the projects. Instead, only the tasks you are adding for the new project entered in the first part
should appear.
The functionality you set up to accomplish this is named as restrictor processing because it restricts database access
functions so they only display the records associated with a particular key value—in this case, the primary key of the
project.
Adding restrictor processing involves three steps:
1. Informing Task.Edit that you only want it to display the tasks owned by a specific project.
2. Specifying which project’s tasks you want it to display.
3. Calling the database access function that returns the list of tasks with the right Project ID.
To use a restricted BlockFetch function:
1. Open the Model Editor if it is not already open.
2. Drag Task.Edit from the Object Browser to the body of the Model Editor.
3. Add the following triple:
Set Restrict<Project ID> = SharedData<Project ID>
Go Sub Reload Grid
(Make sure you select the replaces FNC verb.)
BlockFetch is a function that selects all the rows defined by the Task Fetch view. The triple informs CA Plex to use a
different version of the BlockFetch function. BlockFetchSet only reads a specific set of rows.

Restrict the Display of Tasks


You have now added the Project ID field to the Restrict variable in the Task.Edit function. Remember that Task.Edit is the
function that the wizard uses to display its second part.
Next, you add action diagram statements to restrict the display of tasks on the second part of the wizard. The first step is
to put the Project ID field into the Restrict variable.
Follow these steps:
1. Click the Action Diagrammer to bring the Task.Edit action diagram into focus.
2. Ensure that Show Full Logic is selected on the View menu.

157
CA Plex 7.2.1

3. Select Edit Points from the Block

menu (o
use CTRL+SHIFT+E).
4. Scroll down and select the End Show Panel Post Point, then click OK. This is Post Point that immediately follows the
End Show Panel Post Point:

The Select Edit Point dialog provides a conventional way to locate and focus on a particular Pre or Post Point.
5. Enter the following lines of code within the End Show Panel Post Point:
Set Restrict<Project ID> = SharedData<Project ID>
Go Sub Reload Grid
The Reload Grid subroutine reads the database to retrieve rows to display on the grid. Because you use the Restrict
variable to read only the tasks for a single project, the grid only shows those rows. Adding the Project ID field to the
Restrict variable, and then setting its value, is like setting up a display filter.
6. Save your model and close the Action Diagrammer.

Add Commit and Rollback Processing


When end users use a wizard, you give them the option to go back and change things, or to cancel the whole process
before they click Finish. If they change their minds and cancel out of the wizard before clicking Finish, you do not want
anything added to the database.
You can define your wizard so that it remembers what end users enter, but does not write anything until they complete the
process. In database terms, you commit the changes when you are ready to write the records (the end users click Finish).
The opposite of commit is rollback, which lets you cancel any changes in memory without making any changes to the
database. You can use this when end users click Cancel.
Follow these steps:
1. Set the Object Browser to display functions.
2. Drag the Project Wizard function from the Object Browser to the body of the Model Editor, and then add the following
triple:
Project Wizard commit SYS Parent
This enables the Project Wizard function to commit and rollback the database.
3. In the Object Browser, select Project Wizard and click the Editor button.
The Action Diagrammer appears, with the Select Edit Point dialog over the Action Diagram window:

158
CA Plex 7.2.1

4. Select the Post Point that follows the Process Finish Request Edit Point, and click OK.
The Process Finish Request Edit Point corresponds with the end user clicking the Finish button.
The Action Diagrammer appears with the Post Point highlighted:

5. Type Commit in the input line of the window, and press Enter.
The statement is added to the body of the window:

In Step 2 you added the triple Project Wizard commit Parent. This indicated that you want to do commit/rollback
processing. Adding the Commit statement indicates when you want the transaction committed.
6. Double‑click the up arrow ( ) next to the Post Point name in the action diagram.
7. Enter Start cancel request in the input line, and press F4.
The Action Diagrammer moves to the Pre Point before the Start Cancel Request Edit Point. This Edit Point
corresponds to the end user clicking Cancel on the wizard.
8. Double-click the Post Point after the Edit Point.
9. Add the statement Rollback.
10. Save your model and close the Action Diagrammer.
Now, when end users cancel out of the wizard, no records are written to the database, and when the end users click
Finish, the records are written to the database. In the next section, you generate, build, and test the wizard.

Generate and Build Project Wizard


Since you last generated, you have modified Project.Add Project and Task.Edit. You also modified the panel scoped by
the Project Wizard function.

159
CA Plex 7.2.1

Note: Remember that when you change a panel, you must generate and build the function that scopes it before you can
see the change. You do not generate or build panels directly.
1. Select the functions Project.Add Project, Task.Edit, and Project Wizard on the Generate and Build window.
2. Select Generate and Build from the Build menu.
For more information on generating and building, see Generate and Build Your Project Entity.

Test Your Wizard


Now you can test the wizard to see how the changes and additions you made work.
For best results, make sure you have entered some Employee records into the database before you test the wizard. See
Add Employee Records in Define Relationships Between Entities.
Follow these steps:
1. Select Project Wizard in the Generate and Build window.
2. Click the Run toolbar button.
3. Select Plex r7.0 Tutorial.dsn when you are prompted to select a data source and click OK.
The wizard appears:

In the next step, you create a new project by entering a Project ID and a description.
Note: You made all of the fields except Project ID (the key field) optional, so you do not have to enter a project start
and end date.
4. Enter Proj04 in the Project ID field.
5. Enter the following text in the Project Description field:
Port client to Java, to enable staff to view email from a browser.
6. Click Next.
The second part of the wizard appears. Notice that the Project ID field is already filled.

160
CA Plex 7.2.1

7. Enter Task01 in the Task ID field.


8. Enter the following in the Task Description field:
Setup client
9. Double-click the Employee ID field.
The Selector dialog appears:

10. Select an employee from the grid on the left, and click Select.
11. Click Apply on the wizard.
At this stage, you can enter more tasks if you want.
12. Click Finish.
You have now successfully tested your wizard.
In this scenario, you have:
• Defined a wizard for adding a new project and the tasks that belong to it
• Added action diagram statements so that the wizard functions could share information with each other
• Added commit and rollback processing so that end users can cancel the wizard and undo any records added

Create a Property Sheet


A property sheet uses panel frames to host child functions within a parent function. As a Plex developer, you will create
property sheets to maintain employees, projects, and tasks.
This section contains the following topics:

161
CA Plex 7.2.1

The following diagram illustrates how to create a property sheet:


Figure 6: Scenario Diagram to Create a Property Sheet

More Information

162
CA Plex 7.2.1

• Define the Property Sheet


• Create a Function to Work with Projects and Tasks
• Modify the Parent Panel
• Set the Tab Text
• Set the Caption
• Generate and Build Functions
• Test Your Property Sheet

Define the Property Sheet


Defining a property sheet is similar to defining a wizard. A function is created that inherits from UISTYLE/FrameProperty,
which gives it the property sheet user interface, and then you specify the functions to use for the tabs on the property
sheet. You inherit from UISTYLE/FrameChild to define the functions for each tab.
Follow these steps:
1. Set the Model Editor object type to Function, and then add the following triple:
Project Property Sheet is a FNC UISTYLE/FrameProperty
As with the function Project Wizard, you create the function Project Property Sheet as an unscoped function.
2. Add the following triple:
Employee.Edit is a FNC UISTYLE/FrameChild
This triple enables you to use the edit function scoped to Employee on a tab of the property sheet. It turns the scoped
panel into a child panel.
3. Add the following triple:
Project Property Sheet comprises FNC Employee.Edit
This triple associates Employee.Edit with the first tab on the property sheet. You will associate a function that displays
both projects and tasks with the second tab later.

Create a Function to Work with Projects and Tasks


You have added the ability to add, delete, and update employee records from the property sheet. Next, you need a way to
maintain projects and tasks. You could make both Task.Edit and Project.Edit FrameChild functions, and then put each on
its own tab on the property sheet. As you want to work with tasks together with the project they belong to, it makes more
sense to see them both on the same tab.
To make this work, create a new function that shows both project and task data.
Follow these steps:
1. Drag the Project entity from the Object Browser to the Model Editor, and then add the following triple:
Project function FNC Maintain Projects
This defines a new function that is scoped to the Project entity. You customize this function to work with projects and
tasks.
2. Double-click Project.Maintain Projects in the body of the Model Editor to focus on the triples for that object. (The body
of the Model Editor actually clears, as no triples are defined for Maintain Projects function, yet.)
3. Add the following triple:
Project.Maintain Projects is a FNC FOUNDATION/EditDetail.Edit
The EditDetail.Edit function is in the Object Browser under the FOUNDATION/EditDetail entity. Inheriting from
EditDetail.Edit provides the parts that the function needs to work with tasks. The Edit function calls database access
functions that are scoped to the Fetch and Update views scoped to EditDetail.
Later, add replacement triples so that your function calls the database access functions and views for your Task
entity instead of calling the functions and views in the original pattern.
You are not inheriting from Task.Edit instead of inheriting from EditDetail.Edit as you have already customized
Task.Edit for the wizard. Some of the changes you made will not work for the property sheet. Because your new

163
CA Plex 7.2.1

function works with both projects and tasks together, you define restrictor processing in a slightly different way.
Therefore, you inherit directly from the original pattern to define your function.
4. Add the following triples:
Project.Maintain Projects is a FNC UIBASIC/Grid2
Project.Maintain Projects is a FNC UISTYLE/FrameChild
You inherit from Grid2 because EditDetail.Edit already has a region, GridP, and you want two grid regions in the new
function. You must inherit from Grid2 to get a separate Grid2P region. Otherwise, with two functions both having GridP
regions, they would become a single one in the new function.
To call the correct database access functions, replace the pattern views that the original function expects with the
Fetch and Update views scoped to your Task entity. Because you are replacing views, use the verb replaces VW in
the next step.
5. Add the following triples:
Project.Maintain Projects replaces VW FOUNDATION/EditDetail.Fetch
...by VW Task.Fetch
Project.Maintain Projects replaces VW FOUNDATION/EditDetail.Update
...by VW Task.Update
Before you add the replacement triples, Maintain Projects calls the abstract functions scoped to EditDetail.Fetch and
EditDetail.Update.
After you add the replacement triples, Maintain Projects calls the functions scoped to Task.Fetch and Task.Update.

Inheriting from Grid2 provides the parts that are needed to work with projects: a grid to display them on the panel, and
calls to template database access functions to read the records to display.
Next, you replace the abstract view Grid2 with the Fetch view from Project, so that the BlockFetch function reads the
right records to display on the Project grid.
NOTE
In the next step, after dragging Project.Maintain Projects to the source object box of the Model Editor, you
must change the Object Browser to show entities to find UIBasic.Grid2.
6. Refresh your Model Editor, and then add the following view replacement triple:
Project.Maintain Projects replaces VW UIBasic.Grid2
...by VW Project.Fetch

164
CA Plex 7.2.1

You have previously modified Task.Edit in How to Create a Wizard? so that it would use BlockFetchSet instead of
BlockFetch to retrieve only the tasks for the project that you specify. Do the same for Project.Maintain Projects, so that
the task grid only loads the records that match the selected project.
7. Add the following function replacement triple:
Project.Maintain Projects replaces FNC EditDetail.Fetch.BlockFetch
...by FNC Task.Fetch.BlockFetchSet
8. Refresh the Model Editor to see the triples you defined for Project.Maintain Projects:

After you create a function, follow these steps:

Add Action Diagram Code


Now that you have created the function, you need to add a bit of code so that the project parts can interact with the task
parts. You will be adding code to:
• Load the Project grid when the Maintain Projects tab is displayed
• Restrict the display of tasks so that only the tasks that belong to the selected project are listed
• Load the Project ID field of the Task detail region when you add a new task
Use the following procedure to modify Project.Maintain Projects.
Follow these steps:
1. Open the action diagram for Project.Maintain Projects.
The patterns in UIBASIC are more primitive than the patterns in FOUNDATION. They do not make any assumptions
about how you want to use them. The patterns in FOUNDATION are intended to be ready to use with a generate and
build. So, when you use patterns from the UIBASIC Pattern Library, you have to add some initialization and setup
code to the part of the function that inherits from Grid2. Otherwise, projects will not appear on the list until you click the
Refresh button.
2. Click Cancel in the Select Edit Point dialog.
3. Type End Initialize in the input line, and press F4.
The following processing is added in the End Initialize Post Point because the grid should be loaded after the rest of
the panel is initialized, but before it is displayed.
4. Double-click the Post Point below the End Initialize Edit Point.
This is the first Post Point that already has content:

165
CA Plex 7.2.1

You can only add code at the end of a Pre or Post Point, below any statements that are already there.
5. Click below the Go Sub Reload Grid line, and type the following statement:
Go Sub Reload Grid2This statement loads the project grid when the panel is initialized.
6. Expand the Local variable group in the Variable Palette.
7. Drag the Project ID field from the Object Browser to Position Grid2.
8. Navigate to the End Initialize Grid2 Post Point.
9. Type the following statement within the End Initialize Grid2 Post Point:
Set PositionGrid2<Project ID> = <Project ID.*Blank>
NOTE
You can find the PositionGrid2 variable in the Local variable group.
This statement tells the function to read the database starting with the first project. If you did not add this statement,
the function that reloads the grid would start wherever it stopped the last time it read projects.
10. Expand the Local variable group in the Variable Palette.
11. Drag the Project ID field from the Object Browser to the Restrict variable.
12. Navigate to the Post Point below the Process Selected Grid2 Row Edit Point.
13. Type the following statements:
Set Restrict = Grid2P Go Sub Reload GridThis sets the values of the fields in Restrict variable equal to the
corresponding fields in the currently selected row in the project grid. This means that you only get a list of the tasks for
that project from the database, and then it reloads the project grid. Remember, when the function loads the task grid, it
uses the BlockFetchSet function, which checks the Restrict variable to determine which tasks to load.
14. Navigate to the Post Point below the End Reload Grid2 Edit Point.
15. Enter the following statement:
For Each Selected Grid2P
16. Type the following statements within the new construct:
Set Restrict = Grid2P Go Sub Reload GridThese statements display the tasks associated with any selected projects
in the Grid2P region.
17. Select Show Local Modifications from the View menu to verify that you entered all the required code, Use the space
bar to expand each construct.
Your action diagram appears as follows. This example includes extra comments in the code:

166
CA Plex 7.2.1

18. Reset the action diagram display by selecting Show Full Logic from the View menu.
19. Save your model and close the action diagram.

Modify the Panel


The panel scoped by Maintain Projects inherited panel elements from the panel scoped to Grid2 and Task.Edit. Next, you
will reposition the elements on the panel.
Use the following procedure to modify the panel scoped to Maintain Projects.
Follow these steps:
1. Open Project.Maintain Projects.Panel.
You may need to refresh the Object Browser to display the panel:

Because you made it a child panel, you have no title bar or dialog frame. You can see the panel elements that it
inherited from Task.Edit.Panel, but you cannot yet see the elements inherited from Grid2.Panel.
2. Drag the bottom edge of the dialog in the Design Window, to make it about twice as tall.
3. Select DetailP, GridP, GridButtonP, DetailButtonP, and Panel in the Panel Palette:

167
CA Plex 7.2.1

4. Drag the selected elements to the bottom of the panel in the Design Window.
Note: There is a second grid region—it is behind the one you previously moved down. Your panel appears as follows;

5. Expand Grid2P, and select the Project Description field in the Panel Palette.
6. Open the Properties
icon .
Change the Width property of this field to 400.
7. Increase the width of the entire dialog so that there is some space between the detail region at the bottom and the
right edge.
8. Increase the width of the grid at the top of the dialog so that it is about as wide as the bottom section.
9. Expand the GridP region and select the Project Id field in the Panel Palette. Right-click and use the pop-up menu to
set the Visible property to No. It is not necessary to display the Project Id in the grid as we are restricting the grid to the
tasks for a single project.
10. Select Panel at the top in the Panel Palette.
11. Note the size of the panel (it should be roughly 460, 540). You may need this information later.
12. Save your model and close the panel.

168
CA Plex 7.2.1

Add the Function to the Property Sheet


Now that you have defined the function that end users use to work with projects and tasks, you must add it to the property
sheet.
Follow these steps:
1. Drag the Project Property Sheet function from the Object Browser to the body of the Model Editor, and add the
following triple:
Project Property Sheet comprises Project.Maintain Projects
This adds the Maintain Projects function to the property sheet. The order of the comprises triples is important. The
first comprises triple sets the function that displays the first tab, and the second one sets the function for the second
tab.
If the Project.Maintain Projects function is the target of the first triple, then do the following steps.
2. Click the middle column of the Project Property Sheet comprises Project.Maintain Projects triple to select the entire
triple.
3. Drag the triple onto the Project Property Sheet comprises Employee.Edit triple.
This reorders the triples.
Next, you modify the parent panel so that the child site is large enough to display both the employee tab and the project/
task tab. See How to Create a Wizard to Add a Project.

Modify the Parent Panel


You have modified the wizard panel in How to Create a Wizard to Add a New Project. Now, its child site is large enough to
display the child panels. You can change the panel scoped to the Project Property Sheet function so that it can display the
panels scoped to Employee.Edit and Project.Maintain Projects.
Follow these steps:
1. Open Project Property Sheet.Panel:

2. Expand Panel in the Panel Palette and then select ChildSiteP.


The size of the panel is 400, 300 (width, height). The size is much shorter than the height of the panel scoped to
Project.Maintain Projects, and much narrower than the width of the panel scoped to Employee.Edit.
3. Modify the size of ChildSiteP. Make it 515 pixels wide (the width of the panel scoped to Employee.Edit). Make it 540
pixels tall (the height of the panel scoped to Project.Maintain Projects).
The child site now extends past the right and bottom edges of the dialog.
4. Drag the right edge of the dialog in the Design Window to make it little wider than the child site. Then drag the bottom
edge below the bottom edge of the child site to display the OK, Cancel, and Apply buttons.
The buttons are currently hidden behind the child site. The panel appears as follows:

169
CA Plex 7.2.1

5. Expand Controls in the Panel Palette and select TabStrip1, which is the part of the panel that contains the actual tabs.
FrameProperty inherited it from a function in the ActiveX Pattern Library named ACTIVE/TabStrip.
6. Drag the tab strip right and bottom edges down in the Design Window so that it is slightly larger than the child site.
Move both edges by grabbing the bottom right handle that appears in the middle of the child region when you select
the tab strip.
7. Expand FrameParentP in the Panel Palette and select OK, Cancel, and Apply.
8. Drag the buttons to the bottom right corner of the panel in the Design Window.
9. Save your model and close the Panel Designer.

Set the Tab Text


By default, the property sheet uses the unscoped name of each child function for the labels on the tabs. Remember that
you used Employee.Edit for the first tab and Project.Maintain Projects for the second tab. The property sheet you created
has the text Edit on the employee tab and Maintain Projects on the project and task tab:

To override this and specify tab labels yourself, you can add FNC name NME triples to specify the text to display on that
function’s tab in the property sheet.
To specify text for the tabs on the property sheet:
1. Set the object type to Function in the Model Editor, and add the following triples:
Employee.Edit name NME Employees
Project.Maintain Projects name NME Projects and Tasks

170
CA Plex 7.2.1

2. Save your model.


When you generate and build the property sheet function, the first tab will read Employees and the second tab will read
Projects and Tasks:

Set the Caption


The last step in creating the property sheet is specifying a meaningful caption for the title bar (you inherited a caption
when you inherited from FrameProperty). You can change the contents of the message object, which then changes the
caption on the dialog.
Follow these steps:
1. Set the Object Browser to display functions.
2. Expand Project Property Sheet.
3. Select Caption and click Edit

.
The Message Editor appears:

4. Select the &(1:) text, and replace it with:


Maintain Employees, Projects, and Tasks.
5. Save your model and close the Message Editor.

Generate and Build Functions


You have defined the Project Property Sheet and Project.Maintain Projects functions, and have modified the
Employee.Edit function.
Generate and build these three functions:

171
CA Plex 7.2.1

Test Your Property Sheet


You now have a fully functional property sheet. You:
• Added restrictor processing so that when you select a project from the Projects and Tasks tab, only the tasks that
belong to the selected project appear
• Changed the tab text and the dialog caption
Follow these steps:
1. Select the Project Property Sheet function in the Generate and Build window and click the Run button
.
2. Select Plex r7.0 Tutorial.dsn from the Select Data Source dialog.
The Maintain Employees, Projects, and Tasks property sheet appears.
There are two Apply buttons:
– One on the Employee tab—Detail region applies a new or changed employee record
– One at the bottom of the property sheet—Processes all of the action diagram code that clicking the OK button
processes, but does not close the property sheet
3. Select the Projects and Tasks tab:

4. Select Proj04 from the grid at the top.


5. Note that the task you created for Proj04 appears in the bottom portion of the property sheet.

172
CA Plex 7.2.1

6. Select Proj02 from the grid at the top.


7. Note that the Project ID field in the task detail region fills in.
8. Add the following task information:

Value Enter
Task ID Task01
Task Description Design the server functionality
Employee ID Emp03
9. Click the Apply button in the Detail region.
10. Click OK to close the dialog.

How to Use Group Model and Local Model Licensing in CA Plex


Group model licensing is an optional feature that enables Independent Software Vendors (ISVs) to protect their group
models from unauthorized use. CA and its business partners must have informed you which of their group models are
licensed during the sales transaction.
The first time you reference or open a licensed group model, the licensing dialog appears identifying the group model as
licensed. The licensed group models require an authorization code.
If the licensed group model author enables the trial license feature, you will receive a trial license for a temporary period.
You must request and enter your authorization code before this period ends. If enabled, the trial license feature lets you
immediately use the group model while you wait for your authorization code. If this feature is not enabled, you cannot use
the model until you receive your authorization code. After you receive your authorization code, enter it in the Licensing
dialog.
You can get your authorization code using the email or fax facility in the CA Plex Licensing dialog.

173
CA Plex 7.2.1

The information about whom you should get your Authorization Code from is stored in the licensed group model. If you
use the email or fax facility, this information automatically appears. You can also select About Group Model from the Help
menu to view this information.
For more information about navigating to a licensed group model’s licensing dialog, see Access the CA Plex Licensing
dialog. Use these instructions, where applicable, to maintain the license of a licensed group model.
This article contains the following sections:

Local Model Licensing


In addition to the group model license, the vendor can opt to secure any local models that use a licensed group model.
This means that a license check is performed each time a local model is opened that uses objects from the licensed group
model. You must have a valid authorization code on your workstation to use such local models.

Access the Group Model Licensing Dialog


Use the Group Model Licensing dialog to enter your authorization code for a licensed group model.
To access the Group Model Licensing dialog
1. Start CA Plex.
2. Log on to your host group model.
3. Select the licensed group model, and then select About Group Model from the Help menu in the Group Model window.
4. Click License.
If a licensed group model is unauthorized, the dialog automatically appears the first time the model is opened.

Group Model License Transfer


Group model licenses are highly secure and specific to a specific PC. You cannot use the same authorization code on
more than one PC. Instead, you can transfer a group model license to another workstation. You can either transfer the
license directly across the network or indirectly using a floppy disk.

Make a Direct Transfer


Use this method to transfer a license to an unlicensed version of the group model that exists on a different PC on your
network.
Follow these steps
On the target PC, attempt to access the target copy of the group model (the unlicensed version) at least once, thus
creating the license directory. Make sure that you close it before performing the license transfer.
WARNING
Never transfer a license to an open copy of CA Plex; it disables the license.
1. Share the license directory of the target copy of CA Plex (Windows\Oblicense) on the target PC with full permissions,
so the license files can be copied.
2. Map the directory path for the target copy of the CA Plex license directory.
NOTE
UNC path names are not supported; for example, \\MyServer\Windows\Oblicense. You must map to the
target PC using a drive letter, for example, K:\Windows\Oblicense.
3. Log on to your host group model on the source workstation.
4. Select the licensed group model on the Group Model window and select About Group Model from the Help menu.
5. Click License, Direct License Transfer.

174
CA Plex 7.2.1

The Direct License Transfer dialog opens,


6. Enter the path to the target PC’s Windows\Oblicense directory (Remember, the path must begin with a drive letter).
NOTE
This is either the root OBLICENSE directory for CrypKey 4.2, or the OBLICENSE\61 directory for CrypKey
6.1.
7. Click OK to transfer the license.
A message box displays the results of the transfer.

How to Make a Floppy Disk License Transfer


Use the floppy disk method to transfer the license between two PCs that cannot communicate over the network.
NOTE
When transferring the license to a different PC on your network, we recommend using the direct transfer
method.
Using this method requires advance planning. Before you begin the transfer process, the trial license on the target PC
(unlicensed version) must be expired. This is because the target PC needs to be registered before you transfer the
license. You cannot register the PC until the trial license has expired.
For this transfer, you need an ordinary floppy disk with 180 bytes of free space.
The following sections explain how to transfer a license from your office PC to your home PC, and back again to the office
PC:

Prepare for the Transfer


Before you can transfer your license, you must prepare your home PC and office PC for the transfer.
To prepare for the transfer
1. Install CA Plex on your office PC and enter the authorization code for the group model.
2. Install CA Plex and the group model on your home PC and attempt to access the group model. Wait until the trial
license expires before continuing.

Transfer the License


Use the following procedure to transfer a group model license from your office PC to your home PC.
To transfer a group model license to your home PC
On your home PC:
1. Start CA Plex and attempt to access your target group model. This creates a new set of license files in the Oblicense
directory, which are necessary to register the home PC.
2. Insert a blank disk into your home PC and create two directories: A:\HOME and A:\OFFICE.
NOTE
You can name these directories anything you want. For these instructions, we are using HOME and OFFICE
directories.
3. Log on to your host model, select the license group model and select About Group Model from the Help menu.
4. Click License, and click Transfer in the Group Model Licensing dialog.
5. Click Register Target PC in the CA Plex License Transfer dialog.
6. Enter A:\HOME in the Register License Transfer dialog, and click OK.
Your home PC is now registered. A registration file is placed in the HOME directory. The Office directory is still empty.

175
CA Plex 7.2.1

On your office PC:


1. Insert the disk into your office PC. Start CA Plex and access the CA Plex License Transfer dialog.
2. Click Transfer License to Floppy in the CA Plex License Transfer dialog.
3. Enter A:\HOME in the Transfer License to Floppy dialog, and click OK.
A message box displays the status of the transfer.
4. Click OK.
The group model on your office PC is now unlicensed -- the license is on the disk. To return the license to this machine
the next day, you must register the office PC now.
5. While still in the CA Plex License Transfer dialog, perform the registration procedure to register your office PC.
6. Enter A:\OFFICE in the Register License Transfer dialog, and click OK.
Both directories on the disk now contain data. The HOME directory contains the license. The OFFICE directory contains
the office PC’s registration information. The registration information is required for returning the license to your office PC.
NOTE
At this point, you cannot register the office PC again. If you try to register it again the following message
appears:
Source directory already contains registration file.

You cannot transfer a different license to the office PC at this time. If you do, you will be unable to transfer the original
license back to the office PC. This is because the site code on the office PC changes when you transfer a different license
to the PC. If you attempt to transfer the original license back to the office PC, it will not work with the new site code.
On your home PC:
1. Insert the disk in your home PC and access the Group Model Licensing dialog.
2. Click Transfer.
3. Click Transfer License to PC in the CA Plex License Transfer dialog.
4. Enter A:\HOME in the Transfer License to PC dialog, and click OK.
The license on the disk is transferred to your home PC. The HOME directory is now empty and your office PC is not
licensed.
To return the license to your office PC, transfer the license to the OFFICE directory.

Enter the CA License Key


To complete the licensing of CA Plex, place the information in the Execution Key from the ALP Key Certificate in the ca.olf
file on the machine running CA Plex.If you have access to the World Wide Web, you can get your updated ca.olf file by
going to. Otherwise, follow the directions in this article.
Create the CA License Key File
If the ca.olf does not exist in the CA_LIC folder (usually located in Program Files\CA\SharedComponents), create a new
ca.olf file.
Follow these steps:
1. Create a new file using a text editor.
2. Copy all of the information from the Execution Key into the new file.
3. Click Save and select the CA_LIC directory. The ca.olf file is created. Now follow the instructions to edit an existing CA
license key file.
Edit an Existing CA License Key File
If the ca.olf file exists, open it using a text editor of your choice and make the edits.Follow these steps:
1. Open the ca.olf file using a text editor, such as Notepad.

176
CA Plex 7.2.1

2. Replace all lines beginning with ID_ with the ID_ lines indicated in the Execution Key.
3. Go to the bottom of the file and immediately following any existing FEATURE lines, add the FEATURE line from the
Execution Key.
NOTE
Do not remove any existing FEATURE lines
4. Select Save As from the File menu to save the edited ca.olf file in the CA_LIC folder.
NOTE
The FEATURE line can wrap to a second line on the certificate, but it must be entered on a single line with
no carriage return in the ca.olf file.

How to Create, Import, and Use Windows Communication Foundation


Services in CA Plex
This scenario describes how as a CA Plex Developer, you can create, import, and use Windows Communication
Foundation (WCF) services in your CA Plex application. The CA Plex WCF Service Generator plug-in lets you generate
WCF Services from Service Connectors modeled in your application.
As a CA Plex Developer, you can create, import, and use Windows Communication Foundation (WCF) Services in CA
Plex.
Follow these steps to complete this scenario:
• Create a basic WCF service
• Import and use WCF services in .NET client applications
• Change the WCF service hosting Type
The following diagram illustrates how to create, import, and use WCF Services:

177
CA Plex 7.2.1

Figure 7: Scenario to create import and use WCF services in CA Plex

Prerequisites
Install the following prerequisites to create, import, and use WCF Services in the CA Plex:
• CA Plex r6.1 or higher
• Visual Studio 2008 or higher
• Microsoft .NET Framework 3.5 or higher
NOTE
Install Visual Studio in the following scenarios:
• When you want to open the WCF projects that are created for your services
• When you want to create .NET based client applications that use your WCF services
NOTE
If you are writing client code in other environments and languages, then Visual Studio is not required.
Example:
Your client code could be Java that is developed within the Eclipse IDE.
Ensure to meet the following conditions for creating the WCF services on your CA Plex applications:
• Deploy and test your CA Plex application in a client-server environment. You can create the WCF services for any of
the following CA Plex server application platform languages:
– C#
– Java
– Any System i language (RPGIV, RPG400, SQLRPGIV, SQLRPG400)
• Assign all functions within your local model to the Package objects.

178
CA Plex 7.2.1

NOTE
This best practice applies for any CA Plex server application that is generated for either .NET or Java.
However, this best practice is important for applications that you want to model services for System i
applications.
• Deploy all functions within your local model that you want to call through WCF in the Code Library objects. The WCF
generator interrogates the contents of Code Library objects that are deployed for your application to generate the
necessary contract interfaces.

Create a Basic WCF Service


This example details how you can build and deploy the WCF sample model that is located in the \Samples\Dot NET WCF
support directory. However, you can adapt the same process to deploy any of the CA Plex generated applications that
meet the prerequisites.
Complete the following tasks to create a basic WCF service process:
1. Generate, build, and test your Plex client-server application.
2. Create a Plex connector for the Plex functions that you want to call.
3. Add Service Connector specific implementation triples to your Plex Connector.
4. Define the WCF endpoints that you want to expose.
5. Associate the Service Connector Package object with a Code Library.
6. Configure the CA Plex .Net Runtime template configuration file.
7. Run the Code Library Wizard.
8. Review the generated and build the WCF services.
9. Review your configuration files.
10. Run your WCF service.
11. Invoke an operation on your WCF service.
Follow these steps:
1. Generate, build, and test your Plex client-server application.
Start with a fully functioning Plex client-server application and that the functions you want to expose as service
operations execute in the Plex environment correctly.
NOTE
For more information about the SalesSystem.mdl sample model, see the Dot NET Support and Code
Libraries sample model document.
2. Create a Plex connector for the Plex functions that you want to call.
a. Use the Component Modeling capabilities in CA Plex to create a CA Plex Connector that is generated as a WCF
service.
NOTE
You create the object model hierarchy similar to creating an EJB or COM Connector interface within CA
Plex.
The following diagram shows the basic triples that are required to model a Plex Connector interface.

b. Enter similar data in your model.

179
CA Plex 7.2.1

NOTE
In this example, no Service-specific triples have been added yet. You can add implementation triples to
generate this as a COM object, an EJB, a WCF service, or even some other form of service object. You
can review the object hierarchy in the Plex Object Browser.
3. Add Service Connector specific implementation triples to your Plex Connector.
Add implementation triples to the Package object to define the specifics of the WCF Service Connector that you
generate.
The following diagram shows the implementation triples that are required to be added at Package level in the
SalesSystem sample model.

The PkgTypeSys and PkgLanguageSys triples define the Package that is generated as a WCF service to the WCF
generator.
The PkgServiceHostTypeSys triple defines the type of service hosting to generate around your WCF Service
components. You can use the following possible values of this triple:
– • ApplicationGenerates a managed application host for your WCF Service. After the WCF service is generated
and built, an executable (.exe) file is created for you to double-click and start your WCF service.
• IISGenerates a WCF service suitable for deployment in Microsoft Internet Information Server (IIS). After the
WCF service is generated and built, you can host it inside of IIS or in the Visual Studio ASP.NET Development
Server.
• None (Default)Does not create any host wrapper for your WCF service. This option lets you deploy your WCF
service in a custom host environment. You can run WCF services generated without host code under the WCF
Service Host utility (shipped as part of the Microsoft .NET Framework).
• ServiceGenerates a Windows Service application host for your WCF service. After your WCF service is
generated and built, an executable (.exe) file is created for you to install as a Windows Service, which you can
start to run your WCF service. Various support batch files are also generated to simplify the installation of this
service.
• WASGenerates a WCF service suitable for hosting under the Windows Activation Services (WAS) environment
(not currently supported).
NOTE
The WAS option is not implemented yet and generates your WCF service in the same way as the None
option.
In this example, the host type of None has been selected, which means you cannot run the WCF service stand-
alone; however, you can still run it through tools shipped with the .NET Framework and through Microsoft Visual
Studio.
4. Define the WCF endpoints that you want to expose.
a. Define the specifics of the endpoints that your WCF services expose such as name, protocol, and address. Use a
new triple defined at Interface level, IntEndpointBindingNme, to affect the generation of endpoint information.
The following diagram shows an example of the use of this new triple, and the two continuations that are
associated with it.

180
CA Plex 7.2.1

The endpoint binding name defines the location where clients can connect to your WCF service after it is hosted.
The specific endpoint information consists of the protocol and address of the endpoint, represented by two
continuation triples defined against the endpoint name.
a. a. • Protocol
Defines the basic calling mechanism that clients use to call your WCF service. You can use the following
possible values:
Http
Uses for making calls through HTTP as SOAP messages (wsDualHttpBinding).
Msmq
Uses for making calls through MSMQ (netMsmqBinding).
NamedPipes
Uses for making calls through Named Pipes (netNamedPipeBinding).
Tcpip
Uses for making calls through TCPIP (netTcpipBinding).
• Address
Defines the literal stored against this Label object contains an address to which the WCF Service can be
contacted.
Note: The address can be an absolute address (example, an entire address, including protocol, machine
name, and port numbers) or relative address (example, just a sub address that is combined with the default
base address where the service is deployed).
b. Type an HTTP protocol, and set the large property of the address Label object to http://localhost:8090, as shown in
the following diagram.

181
CA Plex 7.2.1

Note the following:


• You can enter multiple IntEndpointBindingNme triples against an interface. Thus, you can publish the same
WCF service and can make it available in a number of different locations.
• You can enter a maximum of one AddressLbl and ProtocolSys continuation triple against any endpoint. The
AddressLbl and ProtocolSys continuation triples are entirely optional against an endpoint. If either of these
continuation triples are not present for an endpoint, the default endpoint details specified in the WCF generation
options are used for endpoint configuration.
• If you do not enter any IntEndpointBindingNme triples against an Interface, then a default endpoint is created for
you. This endpoint uses the default base address and protocols specified during the WCF Service generation.
• If you enter an absolute address in the AddressLbl target label, the form of the address must match the protocol
that is used against the endpoint binding. For example, if you select TCPIP as the binding protocol, your
absolute address format must be of form net.tcp://<servername>.
5. Associate the Service Connector Package object with a Code Library.

182
CA Plex 7.2.1

Use an existing Code Library for deployment or use a new Code Library that is used for generating and deploying
service interfaces. You can associate this using the new CdlServicePkg triple. The following diagram shows the
Service Connector added to the Code Library already created for the SalesSystem model.

NOTE
The Code Library must be implemented with a language of C# when creating WCF service objects.
6. Configure the Plex .Net runtime template configuration file.
Your generated WCF service contains a copy of the Plex runtime, which the WCF uses to run. This runtime uses
a configuration file named Plex.ObRun.dll.config. The Plex .NET Runtime uses the runtime settings information
contained in this file when running the WCF service. The template version of this file is located in the \...\ob.Net
\<configuration> directory, where <configuration> is either ‘Release’ or ‘Debug’. The configuration option is dependent
on which compile option you take during the WCF service generate and build process.
a. Ensure that the Default environment contains all the information required to access your .Net server application.
b. Ensure to correct the AssemblyList and default database UDLFileName properties are set for your C# application.
NOTE
These settings should be same as you used in Step 1 when you ran your original application.
c. Enter the details of the servers where your application is deployed for the System i and Java server applications.
If you do not have FncLocatedOnNme triples against your server functions, set the server details in the Default
server location settings for the relevant platform.
Note the following:
• Ensure to enter the same information for your server connections that you have used for any WinC.ini or
Java.properties file, to make a server connection.
• If you have FncLocatedOnNme triples to define your servers, you can add locations in your configuration file
that relate to the servers you want to contact.
• After you change the default Plex.ObRun.dll.config file, it is copied and used for every WCF service that
you generate and build. You can edit the config file that gets copied into your WCF service. However, if you
regenerate your WCF service, the changes you made are overwritten by the template version.
d. Save your modified configuration file.
7. Run the Code Library Wizard.
a. Select Tools, Code Library Wizard from the main Plex menu to launch the Code Library Deployment Wizard.
b. Select the Code Library object that you have associated your newly modeled service with as the one you want to
deploy.
c. Complete the deployment steps until you get to the Plug-in Options step.

183
CA Plex 7.2.1

d. Select the WCF Services plug-in from the drop-down menu.


You see a list of options that are used for deployment.

e. Set the following WCF-specific settings:


• DefaultBindingProtocol
Defines the default protocol that is used for any endpoint that does not have a ProtocolSys triple defined against
it.
Note: The value is string based.
Example: You can specify a custom protocol binding to be used for your endpoints in this field.
Default value: wsDualHttpBinding.
• DefaultHostType
Defines the default WCF host type to generate for each Service Connector you are generating that does not
have a PkgServiceHostTypeSys triple. You can choose the same as you choose for a triple.
• EndpointBaseAddress
Defines the base address where service endpoints without AddressLbl triples can be contacted. This base
address can also be used for all endpoints where you may have specified a relative address in the AddressLbl
literal.
f. Retain all the default values and click Next to complete the Code Library Wizard deployment.
8. Review the generated and build the WCF services.
a. The Code Library Deployment Wizard creates the following items upon deployment:

184
CA Plex 7.2.1

• Any Code Library assemblies that were selected to be created.


• The WCF services for each Code Library that were associated with a Service Connector Package.
b. Review the WCF source code that was generated during deployment.
A directory named .\Services\Wcf is created within which, a sub-directory that is named after the Services
Connector Package is created.
This directory contains all the source and other support files for the WCF implementation of the Service Connector.
Depending on the service host type selection for your service connector, the source is generated accordingly.
Example: The following diagram shows the output for the SalesSystem sample model, where the service host type
was set to None.

The WCF services and their associated Visual Studio projects are created and then the Code Library Wizard compiles
these projects. Based on your host type selection, the code library is compiled and the output of the compile process.
The actual output created by the compile process resides in the .\bin subdirectory under the main WCF project
directory.
9. Review your configuration files.
The Visual Studio solution file, which is available in the .\Services\Wcf directory, contains the service that you have
generated.
a. Double-click the Visual Studio solution.

185
CA Plex 7.2.1

The files that are generated for your WCF service displays in the Solution Explorer.
b. Review the endpoint information that has been generated for this service based on the triples in the App.config file
(step 3).
You can see the following line of code or lines if you have configured multiple endpoints:
<endpoint address ="http://localhost:8090" binding="wsDualHttpBinding" name="OrderWebEndpoint"
contract="OrderService.IOrder" />

NOTE
The Plex.ObRun.dll.config file, which is part of this project is a copy of the file that you configured in step 4.
The WCF service uses this file to make calls into the Plex runtime. Ensure to configure this file correctly so
that your application runs properly. When you encounter runtime errors, your probable diagnosis must be the
configuration file.
10. Run your WCF service.
a. Select Debug, Start Debugging.
The two processes, WCF Service Host and WCF Test Client tool are launched.
b. Double-click the WCF Service Host icon in the system tray
The WCF Service Host main window displays the running services.
The WCF Test Client tool (second process), appears after the WCF service is started.
NOTE
This tool queries the WCF service through the metadata exchange endpoint (also known as the ‘mex
endpoint’) exposed for the service and displays the WCF service details and all the operations that can
be called on it.
c. Double-click the method that you want to call.
A parameter entry page appears on the right-hand side of the screen displaying the input parameters for the
operation you selected. These parameters are based on the Data Contracts generated for the operation, and were
derived from the function in the Plex model. The endpoint operation calls your CA Plex server function with these
parameters.
d. Initialize all the input parameters available on the right-hand side of the WCF Test Client interface to call the
function.
e. Initialize each input variable class that are passed for the operation, since the Data Contracts for Plex WCF
Services are generated as nested-classes for each variable.
f. Select one of the values from the drop-down next to each input variable class name (example, each grid entry that
contains the word ‘(null)’).
This selection initializes the inner-classes that contain the actual input fields that you pass to the operation.
g. Set the values for your call.
The following WCF Test Client interface displays when you are ready to call your service.

186
CA Plex 7.2.1

11. Invoke an operation on your WCF service.


a. Click Invoke to call the operation on the service.
The call results display in the Response window.
b. Select Debug, Stop Debugging to close the client and the service.

Import and Use WCF Services in .NET Client Applications


After you confirm that the WCF service works as expected, you can create client applications that consume your service.
The following section details creating client applications that call WCF services.
The pre-requisite to create client applications is to have an understanding of creating C# applications using the Visual
Studio project templates.
Example:
Complete the following tasks to show how a sample project that ships under the Visual Studio Clients directory are
created:
1. Create a Visual Studio Project.
2. Add the controls to the Form.
3. Add a Service Reference for the WCF service.
4. Add C# code to call your WCF service.
5. Compile and run your client application.

187
CA Plex 7.2.1

Follow these steps:


1. Create a Visual Studio Project.
a. Open a new instance of Visual Studio and create a new C# Windows Forms Application project that is named
WindowsClient, in a Visual Studio Clients solution.
NOTE
Ensure that the project targets the .NET Framework 3.5 or above.
After the project is created, a form named Form1.cs appears in the design view.
2. Add the controls to the Form.
a. Add the following controls to the form, and set the properties as shown.
• DataGridView (Name: dgvOrders)
• Button (Name: btnGetOrders, Text: Get Orders)
b. Resize the layout to look as follows:

a. Double-click the button to add a clicked event for it.


3. Add a Service Reference for the WCF service.
a. Select Project, Add Service Reference.
b. Type the metadata exchange endpoint address, as specified in the Review the generated and build WCF services
(step 8) and click Go.
NOTE
Hint: You can copy the metadata exchange endpoint address by selecting the running service in the
WCF Service Host application, right-clicking on the service, and selecting Copy Metadata Address from
the popup menu.
The Visual Studio queries the service and displays the operation endpoints that it exposes.
c. Expand the Order service to see the IOrder interface, and select the interface to see the GetOrderHeaders
operation that it exposes.
d. Change the namespace name as OrderServiceReference and click OK to create a client-side stub to interact with
your deployed WCF service.

188
CA Plex 7.2.1

After you created the client WCF stub code, the OrderServiceReference node appears under the Service References
section of your project. This contains the client code that your program needs to interact with and call operations on
your running WCF service.

189
CA Plex 7.2.1

4. Add C# code to call your WCF service.


Add the following code to the top of the Form1.cs source file, immediately after the using statements.
// Add a reference to the namespace that contains the service client stub.
using WindowsClient.OrderServiceReference;
Now change the btnGetOrders_Click method as follows:
private void btnGetOrders_Click(object sender, EventArgs e)
{
// Create an instance of the WCF Service via the client stub.
OrderClient myOrderClient = new OrderClient();

// Create the input DataContract for the operation we wish to call.


HeaderBlockFetch_Input input = new HeaderBlockFetch_Input();

// WORKAROUND: This gets around the inner-class initialization issue.


HeaderBlockFetch_Input._Control control = new
HeaderBlockFetch_Input._Control();

190
CA Plex 7.2.1

HeaderBlockFetch_Input._Position position = new


HeaderBlockFetch_Input._Position();

// Set up the input parameters for the call.


control.Position = "Y";
position.ORDERNUMBER = 1;

// WORKAROUND: This gets around the inner-struct issue.


input.Control = control;
input.Position = position;

// Call the operation on the service stub.


HeaderBlockFetch_Output output = myOrderClient.GetOrderHeaders(input);

// Do whatever you want with the output.


dgvOrders.DataSource = output.FetchedData;
}
5. Compile and run your client application.
a. Ensure that your WCF service is up and running and select Debug, Start Debugging to run your project.
b. Click Get Orders.
The DataGridView control populates the results of the call.

NOTE
– In this example, Multi occurrence variables are returned as array types that can be used like any collection
within .NET.
– If you change any information on an endpoint, refresh the client-side stub code that is used to interact with the
service. This change includes:
• Modifying the parameter interface of a function call.
• Changing the protocol that is used to communicate with the service (example, changing from HTTP to TCPIP
means, regenerating the client-stub).
– If you change the service contact address, regenerate the client stub (you can manually modify the generated
client-stub code to change the address, however, CA does not recommend this manual change).
6. Close the client application and the running WCF service.

191
CA Plex 7.2.1

Change the WCF Service Hosting Type


After you create the client applications that call the WCF services, you can change the WCF service hosting type. The
following section details how you can host your WCF services using the different hosting types.
The basic steps for developing WCF services with different host types remain the same; however, configuring and running
the WCF services after they are generated differs for each host type.
Follow these steps:
1. Reuse the client code that you developed in the Import and Use WCF Services in .NET Client Applications section, to
call any of these services, after they are running.
2. Model your WCF Service as detailed in creating a basic WCF service. To change the WCF hosting type, choose your
hosting type using the PkgServiceHostTypeSys triple. Use the descriptions of each hosting type to decide the required
hosting type to use. All other service modeling concepts are the same for all hosting types. Enter the same endpoint
information for all hosting types.
3. Use the Code Library wizard to deploy your WCF service as detailed in creating a basic WCF service. After the
deployment is complete, from the source output directory, open the Visual Studio that relates to the WCF service you
just generated. Notice that different files are generated into your project depending on the project type.
Note: For a detailed description of each hosting type, the files that they generate, and how to deploy and run each WCF
host type, see the following sections:
• Application Hosting
• IIS Hosting
• Windows Service Hosting

Application Hosting
The WCF Services that use the Application hosting type are hosted by a basic .NET managed application that runs as
a console executable program. The following diagram shows the example that is used in creating a basic WCF service,
which is generated as a managed application.

192
CA Plex 7.2.1

The Program.cs file contains a main entry point for the WCF Service Host process. The Main() method that is contained
within this source file starts up the WCF service, when the process starts. After the process starts, the WCF service
manages connection to the service from client programs.
Follow these steps:
1. Ensure that your modeled Service Connector has a PkgServiceHostTypeSys of the application.
2. Generate and build your WCF service using the Code Library Deployment Wizard.
3. Ensure that the Plex .NET runtime configuration information is correct in the deployed application.
4. Review the Plex.ObRun.dll.config file in the compiled WCF service output directory.
5. Double-click the WCF service executable that is located in the .\bin\Debug or .\bin\Release directory where the service
gets compiled by the Code Library Deployment Wizard.
A console window displays the information that the WCF service is ready to be called.
NOTE
You can also run the WCF service using the Visual Studio debugger.
6. Call your WCF service by writing a client application.
NOTE
For more information, see the Import and Use WCF Services in .NET Client Applications section.

IIS Hosting
The WCF services that use the IIS hosting type generate in an IIS-friendly project that differs slightly from the other project
types. You can review the major differences by looking at the project in the Visual Studio Solution Explorer.

193
CA Plex 7.2.1

The following list outlines the major differences between the IIS and other hosting types:
• The Data Contracts that are generated for the operation methods are grouped into a subdirectory called App_Data.
• The WCF service that is generated for each Component object generates a .svc file that hooks the service into IIS.
This file points IIS to source files that define the WCF service.
• The WCF service class file is generated as a code-behind page associated with the .svc file.
• The WCF service configuration information is generated into a Web.config file, as opposed to an App.config file.
Follow these steps:
1. Ensure that your modeled Service Connector has a PkgServiceHostTypeSys of IIS.
2. Generate and build your WCF service using the Code Library Deployment Wizard.
3. Open the solution for your generated WCF service in Visual Studio.
4. Ensure that the Plex .NET runtime configuration information is correct in the deployed application.
5. Review the Plex.ObRun.dll.config file in the compiled WCF service output directory.

194
CA Plex 7.2.1

NOTE
You can run this host type using the Visual Studio ASP.NET Development Server that ships with Visual
Studio.
6. Select Debug, Start Debugging to debug the project.
An instance of the ASP.NET Development Server starts to run the application in.
7. Select Yes to add the debug capability for your application.
After the WCF service is hosted in the ASP.NET Development Server, Internet Explorer points to the root directory of
the web application.
8. Select the .svc file that is created for the WCF service.
The browser displays some basic information about the deployed service instance.

NOTE
The ASP.NET Development Server starts the WCF service on a unique port number. In this example, the
port number is 58952. You can use this port when calling any operations on the WCF service or when
querying the metadata exchange endpoint associated with the service.
9. Call your WCF service by writing a client application.
NOTE
Since the ASP.NET Development Server instance has allocated a non-used port, use this port for the metadata
exchange endpoint when importing the service for use. For more information, see the Import and Use WCF
Services in .NET Client Applications section.

195
CA Plex 7.2.1

Windows Service Hosting


The WCF services that are hosted using the Windows Service hosting type generates a host wrapper that compiles as
an executable. This executable can be installed and run as a Windows Service. You can review the major differences by
looking at the project in the Visual Studio Solution Explorer.

The following list outlines the major differences between the Windows Service and other hosting types:
• Two batch files are generated to simplify the installation and uninstallation of the Windows Services created by this
project type. The InstallService.cmd and UninstallService.cmd are copied from the source directory to the directory
where the WCF service executable is created. You can double-click the command files to install and uninstall the WCF
service.
• The ProjectInstaller.cs, ProjectInstaller.Designer.cs, and ProjectInstaller.resx files contain the programmatic code
required to install the WCF service as a Windows Service. The code in these files is invoked when the install and
uninstall batch files are called.
• The Program.cs, Service.cs, Service.Designer.cs, and Service.resx files contain the programmatic code that is
required to run the Windows Service and host the WCF services inside it.

196
CA Plex 7.2.1

Follow these steps:


1. Ensure that your modeled Service Connector has a PkgServiceHostTypeSys of Service.
2. Generate and build your WCF service using the Code Library Deployment Wizard.
3. Ensure that the Plex .NET runtime configuration information is correct in the deployed application.
4. Review the Plex.ObRun.dll.config file in the compiled WCF service output directory.
5. Double-click the InstallService.cmd file that is located in the .\bin\Debug or .\bin\Release directory where the service
gets compiled by the Code Library Deployment Wizard.
The following image shows a successful installation, after you press any key to exit the install batch process.

6. Locate your newly installed Windows Service in the Computer Management tool, under the Services node (the service
is named after the Code Library to which is associated).

197
CA Plex 7.2.1

7. Select Action, Start to start the service.


The Windows Service starts and is now ready to accept client requests.
8. Call your WCF service by writing a client application.
NOTE
For more information, see the Import and Use WCF Services in .NET Client Applications section.

Best Practice
As a best practice, use the exception handling when calling operations on the WCF services. Ensure to enclose every
operation call with a try/catch block that monitors the exceptions raised, based on the WCF fault contracts that are defined
on an interface. You can add error handling to the C# code while importing and using WCF Services in .NET Client
Applications.
Follow these steps:
1. Add a reference to the System.ServiceModel namespace to your client application that lets you monitor the fault
exceptions in your runtime.
// Add a reference to the WCF runtime namespace (for exception handling).
using System.ServiceMode
2. Modify the btnGetOrders_Click() method where the WCF service call is made.
private void btnGetOrders_Click(object sender, EventArgs e)
{
// Create an instance of the WCF Service via the client stub.
OrderClient myOrderClient = new OrderClient();
// Create the input DataContract for the operation we wish to call.
HeaderBlockFetch_Input input = new HeaderBlockFetch_Input();
// WORKAROUND: This gets around the inner-class initialization issue.
HeaderBlockFetch_Input._Control control = new
HeaderBlockFetch_Input._Control();
HeaderBlockFetch_Input._Position position = new
HeaderBlockFetch_Input._Position();
// Set up the input parameters for the call.

198
CA Plex 7.2.1

control.Position = "Y";
position.ORDERNUMBER = 1;
// WORKAROUND: This gets around the inner-struct issue.
input.Control = control;
input.Position = position;
try
{
// Call the operation on the service stub.
HeaderBlockFetch_Output output= myOrderClient.GetOrderHeaders(input);
// Do whatever you want with the output.
dgvOrders.DataSource = output.FetchedData;
}
catch (FaultException<PlexRuntimeException> ex)
{
// Report the Message, Environment<*Call status> and
// Environment<*Returned status> as passed back from the server.
// These values are held in the Detail portion of the FaultException.
String title = "Plex Function Call Exception";
String message1 = "Message: " + ex.Detail.Message;
String message2 = "\nEnvironment<*Call status>: " +
ex.Detail.CallStatus.ToString();
String message3 = "\nEnvironment<*ReturnedStatus>: " +
ex.Detail.ReturnedStatus;
// Show the message.
MessageBox.Show(message1 + message2 + message3, title);
}
}

Generate WCF Services for Non C Functions


The Plex .NET runtime fully supports the calling of Plex-generated Java and System i functions. However, set a
generation option in your Plex build file to generate the necessary C# parameter interface classes suitable for marshalling
input and output parameters to those functions.
Follow these steps:
1. Close the local model that you are using.
2. Open the build file, which is associated with your local model in a notepad.
3. Add the following entries that are shown to the top of the file.
[Service generation options]
Create C# interface classes=1
4. Save and close the build file.
5. Reopen the local model and generate the Plex functions that you want to call using the WCF service.
This generates the _ObIn and _ObOut classes for each function that want to call using the WCF service.
The rest of steps to create the WCF service remain the same.
Note: You can retain the build file option that is switched on. You get the _ObIn and _ObOut classes for any non-C#
function you generate, though it is not called using the WCF. If you switch this option off and if you add another method to
the WCF service, then repeat the steps to generate the necessary parameter interface class.

199
CA Plex 7.2.1

How to Deploy .NET ClickOnce in CA Plex


This scenario describes how as a CA Plex Developer, you can deploy .NET ClickOnce in your CA Plex application. In
earlier releases, you can select an entry function for a Code Library. When you compile a C# Code Library containing
an entry function, an executable is created for it, which calls the specified function. You can now model your application
deployments completely through Code Libraries without having to create an executable through the Generate and Build
window. You need not create an executable for the C# function. However, you can still call it using the CA Plex .NET
Runtime Bootstrap executable, named PlexRuntimeLauncher.exe. This executable is shipped with CA Plex. You can use
this executable to call both .NET Client and Server functions. This method is useful if you want to call Plex generated C#
functions through a scheduler or a scripting environment.
As a CA Plex Developer, you can deploy .NET ClickOnce in your CA Plex application. You can now model your
application deployments completely through Code Libraries without having to resort to creating executables through the
Generate and Build window.
In addition, you can deploy the ClickOnce in Microsoft Visual Studio, using the code library project files that are generated
through the Code Library Wizard. ClickOnce is a Microsoft deployment technology that enables you to create self-
updating Windows-based applications that can be installed and run with minimal user interaction.
The following diagram illustrates how you can deploy .NET ClickOnce in your application:
• Build a .NET executable using the code library wizard
• Build a ClickOnce deployment with Microsoft Visual Studio
• Redeploy your updated .NET application with the ClickOnce deployment
Figure 8: Scenario diagram to deploy .NET ClickOnce in CA Plex

Prerequisites
You must have the following prerequisites to deploy the .NET ClickOnce:
• CA Plex r7.2.1
• Microsoft Visual Studio 2010 Professional or later

200
CA Plex 7.2.1

Build a .NET Executable using the Code Library Wizard


In this section, you define an entry function of your application, so you can create a C# Visual Studio project file (.csproj)
to create an executable (.exe) for the code library using the Code Library Wizard.
Example:
You can now build a .NET executable using the predefined sample model that is located in the \Dot NET ClickOnce\
folder. The sample model has two predefined entities that scope two functions. These entities and the functions they
contain are organized into package objects. The P_Tier1 and P_Tier2 packages are associated with two separate code
library objects, as shown in the following screen:

Based on this design, if you build functions with the Code Library Wizard, you get two assembly DLLs. For more
information about the code library objects, see the Code libraries and .NET section from the CA Plex User Guide.
In CA Plex r7.1, you can specify an entry function for a code library. In other words, you can specify an executed function
when you run the code library, after it is built into an Assembly. To define the specific function as the code library’s entry
function, use the CDL entry function FNC triple.
Follow these steps:
1. Specify the Tier1.Main function as an entry function for the CL_Tier1 code library.
2. Open the model editor and drop the CL_Tier1 code library into the source object field.
3. Select entry function FNC as the verb and drop Tier1.Main function to the target object field and click Enter to add a
new triple.

201
CA Plex 7.2.1

NOTE
Now you are ready to generate and build the application. Use the Code Library Wizard to build your
functions, so you can generate the function source code from within Plex.
4. Select the P_Tier1 and P_Tier2 packages, right-click, and select Generate.
The packages are promoted.
5. Select Yes to generate the source code.
The source is generated.
6. Select Tools, Code Library Wizard… to launch the Code Library Wizard to compile all the functions defined in the
two code library objects.
7. Create an .exe file for the entry function.
8. Click Next in the Code Library Deployment Wizard.
9. Select all code libraries in the Select Code Libraries dialog and click Next.
10. Click Next in the Build Properties dialog.
11. Click Next in the Plugin Options dialog.
The compilation starts and you can see the .exe is built in addition to the assembly for code library CL_Tier1.
12. Click Next after compilation is complete in the Code Library Creation dialog.
The Windows explorer pops-up displaying the build target folder.
13. Confirm the output artifacts that are created for your application (the assemblies, executable files, configuration files,
and other runtime support files).
Note: Now you have the CL_Tier1.dll assembly containing the main application logic and CL_Tier1.App.exe, an
executable created for the code library with an associated configuration file.
14. Click Finish to complete the code library completion.
NOTE
The two assemblies CL_Tier1.dll and CL_Tier2.dll, and one .Exe file CL_Tier1.App.exe is displayed in the
windows explorer pop-up that was launched.
15. Double-click the CL_Tier1.App.exe to run the application.
You have now generated, built, and run CA Plex .NET Client application with multiple assemblies with an entry executable
using the Code Library Wizard.

Build a ClickOnce Deployment with Microsoft Visual Studio


In this section, you use Microsoft Visual Studio 2010 to build a ClickOnce deployment application. If you are using the
latest version of Visual Studio, the images or menu options may differ from this example.
Before you start, create and share a C:\deploy folder, so you can access the folder with \\localhost\deploy.
Example:
Use the Microsoft Visual Studio 2010 or later to create a ClickOnce deployment application.

202
CA Plex 7.2.1

Follow these steps:


1. Open Windows Explorer and navigate to the C:\Users\Public\Documents\CA\Plex\7.1\Samples\Dot Net ClickOnce\Gen
\Src folder.
The following three.csproj files that were created using the Code Library Wizard are listed in the folder. Use these
project files to create a ClickOnce deployment of the application
– CL_Tier1.App.exe.csproj
– CL_Tier1.scproj
– CL_Tier2.csproj
2. Start Visual Studio 2010 and open the CL_Tier1.App.exe.csproj file.
This file automatically creates a solution file.
3. Click the

icon.
The Save File As dialog opens.
4. Provide the solution file name and click Save to save your solution.
5. Add the other two assembly projects to the solution that you saved.
a. In the Solution Explorer, select the CL_Tier1.App.exe project, right-click, and select Add, Existing Project….
The Add Existing Project dialog opens.
b. Navigate to the C:\Users\Public\Documents\CA\Plex\7.2.1\Samples\Dot Net ClickOnce\Gen\Src folder and select
CL_Tier1.csproj and CL_Tier2.csproj, and click Open.
The Visual Studio Solution Explorer displays the three projects as shown in the following screen:

6. Add references to the assembly projects against the executable project.


a. In the Solution Explorer, select the CL_Tier1.App.exe project, right-click, and select Add Reference….
WARNING
Adding reference is mandatory for successful deployment of ClickOnce with the application.
The Add Reference dialog opens.
b. Select the Projects tab and select the two projects that are listed and click OK.

203
CA Plex 7.2.1

The Visual Studio Solution Explorer opens listing the newly added references when you expand the References
under the CL_Tier1.App.exe project.

7. (Optional) Customize your ClickOnce deployment by adding extra options.


8. Deploy the CL_Tier1.App.exe project using the ClickOnce.
a. In the Solution Explorer, select the CL_Tier1.App.exe project, right-click, and select Publish....
The Publish Wizard opens.
b. Specify the location to publish the application as C:\deploy\myapplication and click Next.
c. Select one of the installation modes and click Next.
d. Select The Application will check for updates from the following location option and set the location to \
\localhost\deploy\myapplication\ and click Next.
e. Click Finish.
After the successful deployment, Visual Studio opens Windows Explorer and displays the packaged application.
9. Install and run the application.
a. Double-click the Setup.exe.
b. Follow the installation instructions to install the application.
c. After the successful installation, close the application and Visual Studio.

Customize Your ClickOnce Deployment


Add the following extra options to customize and publish your ClickOnce deployment.
To do this, select the CL_Tier1.App.exe project in the Solution Explorer. Right-click , and select Properties. The project
properties dialog opens.
Do the following:
• Option to set a particular .NET framework as a prerequisite:
1. a. Select the Publish Tab on the left pane and click Prerequisites… on the right pane.
The Prerequisites dialog opens.
b. Select the Microsoft .NET Framework 4 (x86 and x64) check-box.
c. Select the Download prerequisites from the component vendor's web site option and click OK.

204
CA Plex 7.2.1

• Option to enable the application to check for updates each time before it runs:
1. a. Select the Publish Tab on the left pane and click Updates… on the right pane.
The Application Updates dialog opens.
b. Select the The application should check for updates check-box.
c. Select the Before the application starts option and click OK.
• Create a desktop icon for the application. Do the following:
1. a. Select the Publish Tab on the left pane and click Options… on the right pane.
The Publish Options dialog opens.
b. Click Manifests on the left pane and select Create desktop shortcut check-box on the right pane and click OK.

Redeploy your Updated .NET Application with the ClickOnce Deployment


In this section, change the application in the Plex model, recreate the ClickOnce deployment, and run the already
deployed application.
Follow these steps:
1. Add a feature to the application that you have already deployed.
a. Open the Plex model and add Fnc3 function to the Tier2 entity.
b. Add the following triples in the Plex Model Editor:
Tier2 FNC function FNC Fnc3.

Tier2.Fnc3 FNC is an FNC UIBasicShell.

c. Double-click the panel, Tier1.Main.Panel in the Object Browser.


The Panel Designer dialog opens.
d. Add a new button Fnc3 in the Panel Designer.
The Event Mappings dialog opens.
e. Select Pressed from the Physical Event pane and map it to CallFnc3 logical event and click OK.

205
CA Plex 7.2.1

f. Open the Action Diagram for the Tier1.Main function and add code to call Tier2.Fnc3 when the CallFnc3 logical
event occurs.
g. Save the model in the Generate and Build dialog, and generate the two functions Tier1.Main and Tier2.Func3.
2. Use the Code Library Wizard to compile the source files.
a. Follow the steps 6 through 13 from building a .NET executable using the Code Library Wizard.
You now have the recompiled assemblies Tier1.dll and Tier2.dll.
3. Rebuild the ClickOnce deployment.
a. Open the CL_Tier1.App.exe.sln solution file in C:\Users\Public\Documents\CA\Plex\7.2.1\Samples\Dot Net
ClickOnce\Gen\Src folder with Visual Studio.
b. Right-click the file and select Publish… to recreate the ClickOnce deployment.
All your customized settings are saved while building a ClickOnce deployment and are available for you now.
c. In the Publish Wizard dialog, click Finish to republish the application.
The Visual Studio opens Windows Explorer and displays the directory that the packaged application has deployed
to.
4. Install and run the application.
a. Double-click the desktop shortcut icon

206
CA Plex 7.2.1

5. Check updates.
1. a. The application looks for a newer version.
NOTE
This occurs because you have customized and enabled an option to check for updates each time before
the application runs.
b. You are prompted to confirm to install the application updates on your local system.
c. Follow the instructions to redeploy the application updates.
NOTE
If you have Windows 8 installed, you might get an extra security pop-up. Choose to run the application to
continue with the redeployment.
After the successful installation, the updated application is ready for use.
You have now changed the .NET application functionality and then redeployed your updated application with ClickOnce.

How to Import and Use Web Services in CA Plex


As a CA Plex Developer, you can import and use Web Services in your CA Plex application models.
You must have the following prerequisites that are installed to import and use Web Services in the CA Plex application
model:
• CA Plex r7.2 (latest version)
• Visual Studio 2010 Professional
• Microsoft .NET Framework 4.0
Follow these steps to complete this scenario:

If you see any errors, follow the steps discussed under Troubleshooting.
The following diagram illustrates how you can import and call Web Services from your application:

207
CA Plex 7.2.1

Figure 9: Scenario diagram to Import and Use Web Services in CA Plex

Run the Web Service


You must run the Web service if it is not already running at a remote location.
This example uses a custom Stock Price web service, which you will build and deploy using Visual Studio 2010.
Follow these steps:
1. Start Visual Studio 2010 and select File, Open, Web Site and type the full location to the StockQuoteWebService
folder under the samples directory.
Note: The relative path for this folder from the samples directory is \Samples\Web Service Import
\StockQuoteWebService.

208
CA Plex 7.2.1

NOTE
This web service is simple to import and offers the following defined web method:
public double GetQuote(string symbol)
This web service takes a stock symbol that is passed as a string, and uses the Yahoo! Stock Quote CSV API to return
quote data for that symbol. The web service then parses this data and returns the last available traded stock price for
that symbol as a numeric double.
2. Select Debug, Start Debugging to run the web service.
The ASP.NET Development Server starts and hosts the web service. The Service.asmx page opens in a browser
displaying the available web service operations on the running service.
WARNING
Ensure to note the Service.asmx page URL path, which you require for the WSDL to run the web service.
NOTE
Example: The Service.asmx page URL in this example is http://localhost:60999/StockQuoteWebService/
Service.asmx, however, this URL path may differ on your machine. The path differs because the port used
by the ASP.NET development server that hosts the web service allocates the port number at runtime.

209
CA Plex 7.2.1

3. Click the GetQuote hyperlink to test calling that operation.


The list of input parameters that are required for the call displays. In this example, the symbol you want to get the
quote for displays.

210
CA Plex 7.2.1

4. Type a valid symbol and click Invoke to call the web service.
The SOAP response message displays the output from the call and the web service starts running on your machine.

Import the Web Service into Your CA Plex Local Model


After you start the web service to run on your machine, import the same into your CA Plex local model.
Follow these steps:
1. Open the local model WebServiceImportSample.mdl.
This local model is initially blank, but has the FOUNDATION and all other dependent libraries attached.
2. Select Tools, Import, Web Service Import.
The CA Plex Web Service Import Tool dialog opens.

211
CA Plex 7.2.1

3. Type the web service address that you started to run and click Go to start the web service discovery process.
NOTE
Since, the service is an ASP.NET based web service, navigating to this address returns the WSDL
associated with the web service.
After the web service returns the WSDL, the CA Plex Web Service Import Tool parses the web service description that
is returned, and lists the details on the web service in the tree hierarchy on the left-hand side of the dialog.
If you select any part of the WSDL containing the HTML documentation, then the documentation displays in the
browser pane on the right-hand side of the dialog.
4. Select the GetQuote operation and notice how the description matches with what you see in your browser.

5. When you add the web service to your local model, it imports as a Package object with a series of scoped objects that
describe the various parts of the web service.
6. Type StockQuoteWebServiceRef as the package name that you are importing into your CA Plex local model, and click
OK to import the web service.
A message prompts that 65 objects have been displayed into your local model.
7. Click OK.
The CA Plex Web Service Import Tool dialog closes and your CA Plex local model opens.
8. After you import the web service, focus the Plex Object Browser on objects of type Package, and click Refresh or (F5).
Review the objects, which were created from the web service WSDL document.

212
CA Plex 7.2.1

The following table explains the relationship between the WSDL document objects and the CA Plex objects created
that represent them.

WSDL 2.0 Object Plex Object Example Comments


Service Package StockQuoteWebServiceRef The top-level container, which
describes the grouping of
functions exposed on the web
service.
Endpoint The endpoint defines the
address where the web service
is located. This is stored in the
narrative for the Package object
in Plex.
Interface Component StockQuoteWebService The WSDL interface defines a
group of operations, which the
web service exposes. Because
there is not the concept of
components which contain
multiple interfaces in WSDL,
each interface is represented as
a component object in Plex.

213
CA Plex 7.2.1

Operation Function GetQuote An operation defines one


discrete unit of functionality
which may be called against the
web service. This is the object
that Plex developers will want to
invoke via action diagram Call
statements.
Types Field GetQuoteReturn The types describe the
symbol data passed to and from an
operation. These can be thought
of as the input and output
parameters of a traditional
function call.

When you review the triples that are associated with the imported web service Package, Component, Function, and Field
objects, you can see some other important information about them.
• The Package, Component, Function, and Field objects are all associated with each other using the standard scoping
triples (example, PkgComponentCom, ComMethodFnc, and so forth).
• The parameters against the function use the standard FncInputFld and FncReturnsFld triples.
NOTE
There will never be any dual or output fields against web service operations imported into Plex; the SOAP
request always maps to input parameters and the SOAP response always maps to the return value against
the call.

214
CA Plex 7.2.1

Workaround:
To use the System.Value.Double and System.Value.String values in C# panel functions, add the following two triples to
your model to define the fields:
System.Value.Double decimal places NBR 2
System.Value.String length NBR 12

Save your model before continuing. You have now successfully imported the web service into your Plex local model.

Call a Web Service Operation from an Action Diagram


After you imported the web service into your CA Plex local model, call the web service from your action diagram code.

215
CA Plex 7.2.1

Creating a simple UI enables you to set the symbol to retrieve the stock price for and display the returned share price as
output from the call.
Follow these steps:
1. Type the following triples in the Plex Model Editor, to create a simple function that contains the panel and has a local
variable defined.

2. Edit the TestStockQuote.Panel panel by dragging the two fields that are scoped to the GetQuote function and dropping
them onto the panel design surface. When prompted, add the three fields to the InputP single instance region on the
panel.

3. Add a button to the UI to call the web service operation.


4. Name the Get Quote button and map it to a logical event called GetQuote.

216
CA Plex 7.2.1

5. Save and close the Panel design.


6. Edit the action diagram for the TestStockQuote function.
7. To call the web service operation within the action diagram, reference the web service component from the action
diagram using the Object Reference Field, a special type of field.
NOTE
You can create object reference fields manually in your model, by creating field and adding
FldReferenceCom and FldTypeSys/Object triples. However, you can also create object reference fields
automatically by dragging the Component, which represents the web service into a local variable in the AD
Variable Palette.

217
CA Plex 7.2.1

A dialog prompts you to enter some details on the object reference field that you intend to create.
8. Type StockQuoteRef as name in the Select Reference Field dialog and click OK.

218
CA Plex 7.2.1

A new object reference field is created and added to the Local variable that is used by the function.
If you drill down into the object reference field, you can see the GetQuote service operation is now visible within the
action diagram.

219
CA Plex 7.2.1

9. Call this web service operation as you call any other Function object within Plex, so that you can perform the following
tasks:
– Add the standard Call statements to call the web service operation. All parameters can be mapped as you call any
other call statement.
– View the return parameters that are available in the same way that any other output parameters are within the
action diagram; under the Calls variable group.
– Check whether a call succeeded or failed by monitoring the Environment<*Call status> after the call has been
executed.
10. Add the following AD code to the Pre Point Events to perform the following tasks:
– Call the web service operation
– Map the input parameters to the InputP variable
– Monitor whether the call succeeded or not
– Update the returned value into the InputP variable

220
CA Plex 7.2.1

11. Save and close the action diagram.

Generate, Build, and Run a Web Service-enabled CA Plex .NET Application


After you call the web service from an action diagram, you must now generate, build, and run your CA Plex application,
which uses a web service.
Follow these steps:
1. Open the Generate and Build window.
The two objects to generate appear:
– TestStockQuote
Defines the function that you have just created in calling a web service operation from an action diagram.
– StockQuoteWebServiceRef
Defines the web service package that is imported into your CA Plex model. For the CA Plex .NET Runtime to
invoke the web service, generate a wrapper which translates the CA Plex call into web service SOAP request/
response messages.
2. Generate and build both the objects.
3. Create an .Exe for the TestStockQuote function.
NOTE
This step is required only for CA Plex r7.0. For CA Plex r7.2, you can use the new Generic Bootstrap
Executable for .NET to run the function from the generate and build window without creating an .Exe.
4. Run the TestStockQuote function from the Plex generate and build window.
5. Type a stock symbol and click Get Quote.

221
CA Plex 7.2.1

The CA Plex application calls the web service, which returns the stock quote back to the application to be displayed on
the panel.

How to Use ActiveX Controls in WinC and C# Client Applications


This scenario describes how as a CA Plex Developer, you can host ActiveX controls in WinC and C# Client applications.
This scenario provides you with the following items:
• An introduction to the CA Plex .NET Client solution.
• A sample model with data to run the Crystal reports sample application.
• An understanding of how to write source code that interacts with ActiveX controls you have hosted on your panels.
• An understanding of hosting ActiveX controls in WinC and C# Client applications.
As a CA Plex Developer, you can host ActiveX controls in WinC and .NET Client applications.
The following diagram illustrates how you can host ActiveX controls on the CA Plex panels:

222
CA Plex 7.2.1

Figure 10: Use ActiveX Controls

Prerequisites
To host the ActiveX controls in your .NET Client applications, ensure that you have .NET Client knowledge.
NOTE
For more information about the .NET Client and hosting ActiveX controls in .NET Client applications, see the
sample document -- An Introduction to CA Plex .NET Client. The sample document is at ...\Documents\CA\Plex
\7.2.1\Samples\Dot Net Client\ folder.
To run the samples that are contained in this sample model, have the correct ActiveX controls that are registered on the
systems that you want to run the samples on.
If you want to run the .NET Client examples that are contained in this sample, you require a valid license for the CA Plex
Option for Enterprise .NET. If you do not have a license for this option, then a 30-day trial license is granted the first time
that you generate a CA Plex function of language C# that scopes a panel.
In addition, install the prerequisites that are shown in the following table, to run each sample function:

223
CA Plex 7.2.1

• The WinC and C# columns show which variants that each function is implemented in.
• The ActiveX Version column shows the name and version of the product that contains the ActiveX controls that are
used to test this sample.
• The ActiveX Name(s) column shows the names of the ActiveX controls that must be registered on your system to run
the samples.
NOTE
In some cases, more than one control is required for a given sample.
• The Install From column shows a recommended source from which you can obtain the necessary information for
installing and configuring the ActiveX controls.

Function Name WinC C# ActiveX Version ActiveX Name(s) Install From


Active Slider Yes Yes Microsoft Visual Comctl32.ocx http://www.microsoft
Basic 6.0 Common .com/en-us/downloa
Controls d/details.aspx?id=10
019
Global Scripting Yes No Microsoft Excel 2013 Excel.exe Any Valid MS Office
Install
PlexCrystalReportVi Yes Yes Crystal Reports for CRViewer.dll MS Visual Studio
ewer Visual Studio 2005 Craxddrt.dll 2005 Professional
(version 10.2) Install
PlexPdfViewer Yes Yes Adobe Reader XI http://get.adobe.com
(version 11.0.03) /reader/

Generate, Build, and Run the WinC Samples


You can generate, build, and run four different ActiveX sample functions that require six individual ActiveX controls in the
WinC applications.
Example:
The following example showcases how you can:
• Host the standalone ActiveX controls on a WinC panel.
• Instantiate non-graphical ActiveX controls using Global Scripting in VBscript source code.
• Use VBScript source code objects to interact with these ActiveX controls.
• Run the PlexCrystalReportViewer function.
• Enable interaction of multiple controls inside the same script.
Follow these steps:
1. Ensure that you configured the Beginners ActiveX.mdl local model for the base variant.
The Model Configuration dialog displays the configuration that you have set.
2. Generate and build the 13 functions in the WinC Samples subject area.
The functions are generated and built without any errors or warnings.
3. Run the Active Slider function by highlighting it in the Generate and Build window and select Build, Run.
The ActiveX Control Sample dialog opens.
4. Move the slider to see the font size change, modify the Min and Max settings, and click OK.
5. Host the standalone ActiveX controls on a WinC panel using the following example:
a. Open the Active Slider function and the Active Slider.Top App panel in the Plex model.
This standalone panel hosts two ActiveX controls -- TabStrip and Slider controls, which are shipped with
comctl32.ocx.
Note the following:

224
CA Plex 7.2.1

• The font size changes because the Slider control has the Change physical event mapped to a logical event. In
the Action Diagram, the logical event calls Active Slider.DoChange, which changes the TabStrip font size based
on the current Slider value. This shows how you can process events associated with ActiveX controls.
• The Slider Min and Max properties are set in the Active Slider.SetMinMax source code. This shows how you can
set ActiveX control properties based on Plex field values.
6. Run the Global Scripting function. This example shows you how you can instantiate non-graphical ActiveX controls
using Global Scripting in VBscript source code.
a. To create an ActiveX object to interact, use the CreateObject function as follows:
Set objXL = CreateObject("Excel.Application")
The object is now created.
b. Set the properties and calling methods that the object supports to interact with it in the same way as other ActiveX
controls. In this example, the script is creating a simple workbook with a set of values, creating a chart from these
values, and rotating the chart.
NOTE
If you close the Excel spreadsheet before the rotation completes, you are prompted with a VBScript error.
7. Before you run the PlexCrystalReportViewer function, ensure that you have run the Dot Net Client sample and added
some sample data.
NOTE
If you are not licensed to use the CA Plex Option for .NET Enterprise, you can still generate and build the
sample in the WinC or WinC/WinNTC variant and add data.
The MDI Parent dialog shows some sample Order Header data added to the Dot Net Client sample:
a. Run the PlexCrystalReportViewer function.
The Panel dialog opens prompting you to enter your ODBC connection details.
b. Provide the same details that you used for the Dot Net Client sample and click OK.
The main function launches.
c. Load a report to run by selecting File, Open… and navigating to a Crystal Report .RPT file.
A sample report is shipped with the sample model in the ...\Beginners ActiveX\Resources\OrderHeaderReport.rpt
location.
d. Select the report to load into the viewer.
The CA Plex Viewer dialog opens displaying the sample report.
8. Review the PlexCrystalReportViewer.Scripts.Crystal_OpenReport script.
Note the following:
– The two ActiveX controls -- CrystalDesignRuntime.Application and Crystal ActiveX Report Viewer Control 10.2 are
required to run this sample.
– The CrystalDesignRuntime.Application is not hosted on a panel and is created dynamically in the script using the
VBScript CreateObject function, similar to the Global Scripting function.
– The Crystal ActiveX Report Viewer Control 10.2 is hosted on the panel as a Standalone ActiveX control, similar to
the Active Slider function.
9. Run the PlexPdfViewer function.
This function works similarly to the PlexCrystalReportViewer example.
a. Select File, Open… and navigate to a PDF document to open.
The selected document opens in the Adobe PDF Reader ActiveX Viewer.
10. Review the PlexPdfViewer.Scripts.AcroPDF_LoadFile script.
This script shows you how you can call ActiveX control methods, passing Plex field values as parameters.
You have now generated, built, and ran four different ActiveX sample functions that required six individual ActiveX
controls.

225
CA Plex 7.2.1

Generate, Build, and Run the C# Samples


Use the following example to generate, build, and run C# samples using the ActiveX controls.
Example:
The following example showcases how you can:
• Host the standalone ActiveX controls on a C# panel.
• Manipulate non-graphical controls in C# source.
• Generate .NET managed wrappers for non-graphical controls using the Tlbimp.exe tool.
• Compare and contrast the C# code to interact with the controls.
Follow these steps:
1. Ensure that you configured the Beginners ActiveX.mdl local model for the .NET Client.
The Model Configuration dialog displays the configuration that you have set.
2. Generate and build the seven functions in the C# Samples subject area.
The functions are generated and built without any errors or warnings.
3. Run the Active Slider function by highlighting it in the Generate and Build window and select Build, Run.
The ActiveX Control Sample dialog opens.
4. Move the slider to see the font size change, modify the Min and Max settings, and click OK.
5. Host the standalone ActiveX controls on a C# panel using the following example:
a. Open the Active Slider function and the Active Slider.Top App panel in the Plex model.
This standalone panel hosts two ActiveX controls -- TabStrip and Slider controls, which are shipped with
comctl32.ocx.
Note the following:
• The font size changes because the Slider control has the Change physical event mapped to a logical event. In
the Action Diagram, the logical event calls the source code object Active Slider.WpfDoChange, which changes
the TabStrip font size based on the current Slider value. This shows how you can process events associated
with ActiveX controls.
• The Slider Min and Max properties are set in the source code Active Slider.WpfSetMinMax. Compare the
syntax of Active Slider.WpfSetMinMax with Active Slider.SetMinMax. This shows how you can set ActiveX
control properties based on Plex field values and also an example of how C# and VBscript syntax differs.
6. Run the PlexCrystalReportViewer function.
Before you run the PlexCrystalReportViewer function, ensure that you had run the Dot Net Client sample and added
some sample data.
NOTE
If you are not licensed to use the CA Plex Option for .NET Enterprise, you can still generate and build the
sample in the WinC or WinC/WinNTC variant and add data. If you have already created a sample, you can
reuse it.
The MDI Parent dialog shows some sample Order Header data added to the Dot Net Client sample:
a. Run the PlexCrystalReportViewer function.
The Panel dialog opens prompting you to enter your ODBC connection details.
b. Provide the same details that you used for the Dot Net Client sample and click OK.
The main function launches.
c. Load a report to run by selecting File, Open… and navigating to a Crystal Report .RPT file.
A sample report is shipped with the sample model in the ...\Beginners ActiveX\Resources\OrderHeaderReport.rpt
location.
d. Select the report to load into the viewer.
The CA Plex Viewer dialog opens displaying the sample report.
7. Review the PlexCrystalReportViewer.Scripts.WPFCrystal_OpenReport script.
Note the following:

226
CA Plex 7.2.1

– The two ActiveX controls -- CrystalDesignRuntime.Application and Crystal ActiveX Report Viewer Control 10.2 are
required to run this sample.
– The CrystalDesignRuntime.Application is not hosted on a panel and is created dynamically in the script.
a. In a C# sample, you need to reference an ActiveX class wrapper class.
b. Create this ActiveX wrapper class for the ActiveX using the Microsoft Type Library Importer (Tlbimp.exe) tool.
The sample model folder contains a batch file (GenerateTlbWrapper.bat) that shows how you can create an
ActiveX wrapper for a control that you want to create dynamically.
c. After the type library wrapper is created for your ActiveX type library, add it as a reference to the .NET build
properties so that it can be referenced by your C# source.
– The Crystal ActiveX Report Viewer Control 10.2 is hosted on the panel as a Standalone ActiveX control, similar to
the Active Slider function.
8. Run the PlexPdfViewer function.
This function works similar to the PlexCrystalReportViewer example.
a. Select File, Open…
b. Navigate to a PDF document to open.
The selected document opens in the Adobe PDF Reader ActiveX Viewer.
9. Review the PlexPdfViewer.Scripts.WPFAcroPDF_LoadFile script and compare it with
PlexPdfViewer.Scripts.AcroPDF_LoadFile. This script shows you how you can call ActiveX control methods from
C# source code, passing Plex field values as parameters. It also shows the differences in syntax between C# and
VBscript source code required to interact with ActiveX controls.
You have now generated, built, and ran the C# ActiveX sample functions using the ActiveX controls.

Auto Deploy CA Plex WCF Services to Internet Information Services


This scenario discusses how CA Plex developers can configure the environment for deploying CA Plex WCF Service to
Internet Information Services (IIS) using CA Plex Code Library Wizard. This scenario also covers the runtime configuration
to allow IIS deployed WCF Service to access SQL Server databases with Windows Authentication.
Note: This documentation assumes there are two machines, one used for the IIS with Microsoft SQL Server installed in it
(referred as Server) and the other running CA Plex (referred as Client).
Follow these steps to complete this scenario:

The following scenario diagram illustrates how to auto-deploy CA Plex WCF Service to IIS:

227
CA Plex 7.2.1

Figure 11: Auto Deploy CA Plex WCF Services to Internet Information Services

228
CA Plex 7.2.1

Verify the Prerequisites on the Server


Internet Information Services (IIS) can be installed as part of most versions of the Windows operating system. The version
of IIS that can be installed on each operating system is listed in Microsoft Support knowledge base article KB224609. We
recommend that you use at least IIS 7.5 running on Windows 7 /2008 R2.
The prerequisites for the Server (IIS Machine) are as follows:
• Verify that All IIS Related Features are Enabled
• Install the Web Deploy Tool
• Install, Configure and Access Microsoft SQL Server With Windows Authentication
• Configure IIS and SQL Server to Use Windows Authentication

Verify that All IIS Related Features are Enabled


For IIS 8.5 on Windows 8.1—Click Start, Control Panel, Programs and Features, and select Turn Windows Features on
or off. Make sure that ALL of the features in the following list are enabled in the Turn Windows Features on or off dialog
and click OK to confirm your selection.
• .NET Framework 4.5 Advanced Services
– ASP.NET 4.5
– WCF Services
• HTTP Activation
• Message Queuing (MSMQ) Activation
• Named Pipe Activation
• TCP Activation
• TCP Port Sharing
• Internet Information Services
– Web Management Tools
• IIS Management Console
• – Worldwide Web Services
• Application Development Features
• .NET Extensibility 3.5
• .NET Extensibility 4.5
• Application Initialization
• ASP
• ASP.NET 3.5
• ASP.NET 4.5
• ISAPI Extensions
• ISAPI Filters
• Server-Side Includes
• WebSocket Protocol
• – • Common HTTP Feature
• Default Document
• Directory Browsing
• HTTP Errors
• Static Content
• – • Health and Diagnostics

229
CA Plex 7.2.1

• Custom Logging
• HTTP Logging
• Logging Tools
• Performance Features
• Static Content Compression
• – • Security
• Basic Authentication
• Request Filtering
• Windows Authentication
• – Windows Process Activation Service
– .NET Environment
– Configuration APIs
– Process Model

Note: Do not modify the settings for other features that have been previously enabled in the Turn Windows Features on or
off dialog.
Windows proceeds to install and configure the necessary components based on your selection. Reboot, if required.
For Windows Server 2008 R2, follow these steps:
1. Click Start, Server Manager icon.
2. Click Add roles and features.
3. Continue with the default selections on the wizard.
4. Click Select a server from the server pool and click Next.
5. Check the Web Server (IIS) box and click Next.
6. Check the following role services and click Install:
– Common HTTP Features
• Default Document
• Directory Browsing
• HTTP Errors
• Static Content
– Health and Diagnostics
• Custom Logging
• HTTP Logging
• Logging Tools
– Security
• Windows Authentication
– Application Development Features

230
CA Plex 7.2.1

• .NET Extensibility 3.5


• .NET Extensibility 4.5
• Application Initialization
• ASP
• ASP.NET 3.5
• ASP.NET 4.5
• ISAPI Extensions
• ISAPI Filters
• Server-Side Includes
• WebSocket Protocol
– .NET Framework 4.5 Advanced Services
• WCF Services
• HTTP Activation
• Message Queuing (MSMQ) Activation
Windows proceeds to install and configure the necessary components based on your selection.

Install the Web Deploy Tool


Use the following procedure to install the Web Deploy Tool to deploy WCF service to IIS.
Follow these steps:
1. Navigate to the following Microsoft Website.
2. Click Free Download and complete the installation.
3. Open Web Platform Installer.
4. Click in the search bar in the In Web Platform Installer, type Recommended and press Enter.
5. Select Recommended Server Configuration for Web Hosting Providers, and then click Add.
6. Click Install.
7. Click I accept on the Prerequisites page.
8. Click Finish after the installation process has completed.

Install, Configure and Access Microsoft SQL Server With Windows Authentication
Use the following procedure to install and access Microsoft SQL Server with Windows authentication.
Follow these steps:
1. Install Microsoft SQL server to the Server machine.
2. Add your Window User to access SQL Server with Windows Authentication.
3. Open Microsoft SQL Server Management Studio and connect to the SQL Server on the Server.
4. Expand Security.
5. Right-click Logins and select New Login.
The Login - New dialog opens.
6. Enter Login name as your Windows User ID.
7. Select the default database your want to use to build a Table and View from CA Plex.
Otherwise, you can use the default database, master.
8. Click OK to apply your changes and exit the dialog.

231
CA Plex 7.2.1

Configure IIS and SQL Server to Use Windows Authentication


You must allow your IIS to access SQL Server configuration using a known, trusted Windows credential. Proceed to the
next section to understand how to configure IIS and SQL server configuration.
Note: Alternatively, you can change your connection string to use SQL authentication.
Complete the following tasks:
• Configure IIS
• Configure SQL Server

Configure IIS
Use the following procedure to configure IIS.
Note: You must have administrator access to your computer to configure IIS.
Follow these steps:
1. Open the Internet Information Services Console.
Note: To open IIS console, click Start, Run, type inetmgr and click OK.
The Internet Information Services Manager window opens.
2. Select the top-level server node and double-click the Authentication icon to open the Authentication page.
3. Make sure that Anonymous Authentication is Enabled.
4. Right-click Anonymous Authentication and select Edit. Select Application Pool Identity and click OK to exit the
Anonymous Authentication Credential dialog.
5. Select Application Pools under the root server node to open the Application Pools page.
By default, you must be using an application pool called DefaultAppPool.
6. Right-click DefaultAppPool and select Advanced Settings to open the Advanced Settings dialog. Do the following to
configure the application pool:
a. Scroll down to locate and select the Identity property.
b. Click the ellipsis (…) next to the name listed.
The Application Pool Identity dialog opens.
c. Select NetworkService from the list of built-in accounts and click OK.
d. Click OK to exit the dialog.
7. Open Windows Explorer, locate and right-click the folder C:\inetpub\wwwroot and select Properties. Set the folder
permissions to your local machine. To change the folder permissions, do the following:
a. Select the Security tab and click Edit.
b. Click Add to add a new credential.
c. Make sure that the local machine name is selected in the From this location field, enter Network Service as the
object name, and click Check Names.
The object entry now changes to an underlined NETWORK SERVICE entry, indicating that the credential is
available.
d. Click OK to confirm the changes and exit the dialog.
e. Make sure that all permissions for the NETWORK SERVICE credential are selected in the Permissions for
wwwroot dialog. Click OK.
8. Click Advanced in the Security tab. To set advanced security settings, do the following:
a. Select Change Permissions.
The Permissions dialog opens.
b. Check the Replace all child object permission entries with inheritable permission entries from this object box.
c. Click Apply. A confirmation message displays. Click YES to confirm your selection.
9. Click OK twice to save your changes.

232
CA Plex 7.2.1

Configure SQL Server


Use the following procedure to configure SQL Server.
Follow these steps:
1. Log on to SQL Server Management Studio.
2. Expand the Security folder, right-click Logins and select New Login.
3. Select Search next to the Login name and search for the NETWORK SERVICE credential on the local machine. Select
the credential and click OK to confirm the credential details.
4. Select the Server Roles tab. Make sure that both public and sysadmin values are selected. Click OK to confirm the
new credential.
You have successfully configured the NETWORK SERVICE credential to be used for running the IIS default application
pool and also to be accepted as a valid Windows credential by your SQL Server instance.

Verify the Prerequisites on the Client


Following are the prerequisites on the Client (machine on which CA Plex is installed):
1. Verify that Microsoft Visual Studio 2010 Shell (Isolated) Redistributable Package is Installed on the Client.
Note: This prerequisite is needed ONLY if Visual Studio 2010 is not installed on the Client.
If Visual Studio 2010 is not installed, the following error message is displayed when you run Code Library Wizard:
error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications
\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that
the file exists on disk.
To troubleshoot, search and download Microsoft Visual Studio 2010 Shell (Isolated) Redistributable Package from
Microsoft Download Center (http://www.microsoft.com/en-us/download) and continue with the download.
2. Verify that Web Deploy 3.5 is Available
If Web Deploy 3.5 is not installed on the Client, the following error message is displayed when you deploy WCF
Service to IIS.
error MSB4057: The target "Package" does not exist in the project.
To troubleshoot, search and download Web Deploy 3.5 from Microsoft Download Center.

Auto Deploy WCF Service to IIS Using the Code Library Wizard
This section discusses how to auto deploy WCF Services to Internet Information Services (IIS) using the Code Library
Wizard.
Follow these steps:
1. Generate, build and test your Plex client-server application.
Important! You must start with a fully functioning Plex client-server application so that the functions you want to
expose as service operations execute in the Plex environment correctly.
Do the following:
a. Get the SalesSystem.mdl sample model up and running.
Follow the steps as outlined in the sample model ‘Dot NET Support and Code Libraries’.
The sample models are available in the following directory:
• SalesSystem.complete.iis.mdl
Samples\Dot NET WCF Web Service Deployment\
b. Make sure that when you set up ODBC DSN to build Table and View, the ODBC driver must indicate the SQL
Server on the IIS Server machine and use Windows Authentication.
Note: To understand and learn about WCF service and required modeling concept, refer the sample model ‘Dot
NET WCF Support’.

233
CA Plex 7.2.1

2. Deploy the WCF Service to IIS with Code Library Wizard:


You must run the Code Library Wizard to deploy Order Code Library with OrderService Package deployed to IIS:
a. Run the Code Library Deployment Wizard. Click Tools, Code Library Wizard.
b. Click Next.
c. Select Order Code Library and click Next.
d. Click Next.
e. Select WCF Services from the drop-down list in the Plugin Options page.
f. Expand IISProperties.
g. Set the Deploy to IIS property to True.
h. Enter the name of the server on which you have IIS set up, your Windows User Name and Password. Click Next
The IIS deployment process gets triggered. The process includes the following steps:
1. Compile Code Library Order as Assembly that contains Functions
2. Compile Package OrderService as IIS deployable Assembly
3. Package all required files to be deployed to IIS including Code Library Order Assembly
4. IIS deployment
Note the Code Library Creation page display a message to indicate that the Code Library creation is complete.
If you receive any error, see Troubleshooting.

Verify the Availability of the Deployed WCF Service


Do the following tasks:
• Confirm that the WCF Service is deployed to IIS
• Launch the WCF Service From Internet Explorer
• Run the WCF Service from SoapUI
• (Optional)Perform Troubleshooting

Confirm that the WCF Service is Deployed to IIS


Use the following procedure to confirm if the WCF Service is available in IIS.
Follow these steps:
1. Start Internet information Service (IIS) Manager on the Server.
2. Navigate to Sites, Default Web Site on the left pane and locate the WCF Service.
You can see OrderService deployed under Default Web Site as follows:

234
CA Plex 7.2.1

Launch the WCF Service From Internet Explorer


Use the following procedure to confirm if the WCF Service is actually deployed.
Follow these steps:
1. Open Internet Explorer on your Client machine (where CA Plex is installed)
2. Type the following URL and click Go.
http://<Your Server Name>/OrderService/Order.Component.svc
The web page for the WCF Service is displayed:

235
CA Plex 7.2.1

Run the WCF Service From SoapUI


There are various ways to test Soap-based Web Service. This section discusses how to test using SoapUI 5.1.
Use the following procedure to confirm if the WCF Service actually runs.
Note: Instructions to download and additional information about SoapUI are available at SoapUI.
Follow these steps:
1. Run the SoapUI on the Client (on which CA Plex is installed).
2. Select File, New Soap Project to create a new project for your service.
The New Soap Project dialog opens. Project Name is automatically filled; you may change it if you want.
3. Enter the Initial WSDL as follows:
http:// <Your Server Name>/OrderService/Order.Component.svc?wsdl
4. Click OK.
A new Soap project is created.
5. Expand the tree on the left pane.
6. Double-click Request 1.
7. Enter Y for ord:Position, and enter 0 for both ord:RowsFetches and ord:ORDERNUMBER.
8. Click the Run button to submit the request.
Process of requesting a service operation includes the following:
a. SoapUI invokes OrderServcie Web Service Operation.
b. The Web Service Operation invokes CA Plex function.
c. The CA Plex Function accesses SQL Server.
d. The data is returned to SoapUI as Soap Envelop.
The right pane shows the requested service.data as follows:

236
CA Plex 7.2.1

See Troubleshooting if the requested service data is not returned.

Troubleshooting
This section lists the error messages and action to be taken against each message under the following topics:
• Code Library Wizard Error messages
• Runtime Troubleshooting

Code Library Wizard Error messages


Error on IIS deployment: The remote name could not be resolved: 'Your Server Name' [C:\Documents and
Settings\All Users\Documents\CA\Plex\7.2.1\SAMPLES\Dot NET WCF Support\GEN\Services\Wcf\OrderService
\OrderService.csproj]
Cause:
Indicates that a wrong Server name is entered, for example Server does not exist.
Solution:
Enter a correct Server Name and run the Wizard again.
Error on IIS deployment: Unable to connect to the remote server [\Documents and Settings\All Users\Documents
\CA\Plex\7.2.1\SAMPLES\Dot NET WCF Support\GEN\Services\Wcf\OrderService\OrderService.csproj]
Error on IIS deployment: No connection could be made because the target machine actively refused it
130.200.243.109:80 [C:\Documents and Settings\All Users\Documents\CA\Plex\7.2.1\SAMPLES\Dot NET WCF
Support\GEN\Services\Wcf\OrderService\OrderService.csproj]
Cause:
The Target Server does not have IIS running. (The server exists but IIS is not set up.)
Solution:
Make sure IIS is set up on the target server and run the Wizard again.
Error on IIS deployment: Site 'Your Web Site' does not exist. [C:\Documents and Settings\All Users\Documents
\CA\Plex\7.2.1\SAMPLES\Dot NET WCF Support\GEN\Services\Wcf\OrderService\OrderService.csproj]
Cause:
An incorrect Web Site name is entered.

237
CA Plex 7.2.1

Solution:
Make sure to enter correct Web Site Name and run the Wizard again.
Error on IIS deployment: The remote server returned an error: (401) Unauthorized. [C:\Documents and Settings
\All Users\Documents\CA\Plex\7.2.1\SAMPLES\Dot NET WCF Support\GEN\Services\Wcf\OrderService
\OrderService.csproj]
Cause:
You entered wrong User Name or Password OR the User you entered does not have required Authority to do remote IIS
deployment.
Solution:
Make sure enter correct User Name and password OR If the User Name and Password is correct, make sure the User is
a part of administrator group on the IIS server machine. And run the Wizard again.

Runtime Troubleshooting
WCF Service Connector operations return an Environment<*Returned status> of ERR if they perform any
database transaction
Also, you may see the following message in the WCF Service runtime application log:
8/6/2014 1:49:15 PM Type=0 [PLEX0021] Cannot connect to a Database. Please
check your property value of UDLFileName, User and Password setting and UDL
file ;Server=(local);Database=;MultipleActiveResultSets=True;Server=localhost;Trusted_Connectio
exists and has correct settings.
8/6/2014 1:49:15 PM Type=0 Login failed for user 'USER001-WIN81$'.

Cause:
Your SQL Server database did not authorize the Windows user credentials hosting the IIS process.
Solution:
Make sure that you follow and complete the steps described in Install, Configure and Access Microsoft SQL Server With
Windows Authentication and Configure IIS and SQL Server to Use Windows Authentication.
Calling GetOrderHeaders a second time passing ‘N’ in the Control<Position> field does not return the expected
records.
If your sample data includes more than six orders and you have successfully called the GetOrderHeaders SOAP
operation passing ‘Y’ in the Control<Position> field and retrieving the first 6 orders, you can subsequently pass ‘N’ in
Control<Position> to get the next set of records. However, calling GetOrderHeaders a subsequent time does not return
any data. Also, Environment<*Returned status> will be set to INF.
Cause:
The WCF Service Connector is hosted using a binding protocol (basicHttpBinding) that does not support sessions to be
stored in IIS for a client. Hence, the SQL result sets created by the CA Plex .NET runtime for the Order.Header.BlockFetch
function are not stored between client calls.
Solution:
The solution depends on whether the overhead of introducing session management for your WCF Service Connector is
acceptable to you or not.
Perform one of the following steps to resolve this problem:

238
CA Plex 7.2.1

• Change your WCF Service Connector to use a SOAP 1.2 compliant protocol that supports sessions (for example
wsHttpBinding or wsDualHttpBinding). You can change the binding protocol that your generated WCF Service
Connectors use by setting the DefaultBindingProtocol property in the Code Library Wizard on the WCF Service
Connector plugin page.
• Change the WCF Service Connector operation to use a CA Plex function that does not rely on storing SQL result sets
between calls. In this example, change the service operation OrderService.IOrder.GetOrderHeaders to call the function
Order.Header.Fetch.StatelessBlockFetch. ]

Auto Publish CA Plex WCF Services into a CA API Gateway

This scenario discusses how CA Plex developers can auto publish CA Plex WCF Service Connectors into a CA API
Gateway.
Follow these steps to complete this scenario:

The following diagram illustrates how to auto publish CA Plex WCF Services into a CA API Gateway:

239
CA Plex 7.2.1

Figure 12: Auto Publish CA Plex WCF Services into a CA API Gateway

240
CA Plex 7.2.1

Install, Connect, and Configure your CA API Gateway Server


Verify that you have configured your local machine to connect to your CA API Gateway server correctly.
Follow these steps:
1. Make sure you have installed and configured your CA API Gateway server correctly. The Gateway is available in three
different form factors as follows:
– As software that can be installed on servers running Red Hat Enterprise Linux version 4 or 5, SUSE Linux
Enterprise Server 10, Sun Microsystems Solaris 10 (both x86 and SPARC).
– As a 64-bit appliance that requires minimal additional configuration. This version is described in the CA API
Installation and Maintenance Manual (Appliance Edition).
– As an XML virtual appliance (OVA file) running under VMware. Initial configuration and setup of this product is
described in the CA API Gateway XML Virtual Appliance Getting Started.
The XML virtual appliance (OVA file) is the most common form factor, especially if you are running CA API in
VMware ESX Server or Workstation for evaluating or education purposes.
2. Install the CA API Policy Manager Desktop Client software.
You can download the CA API Policy Manager desktop Client install from the CA API Support Portal at http://
www.ca.com/us/securecenter/ca-api-gateway.aspx.
3. Launch the CA API Policy Manager after completing the installation for CA API Policy Manager Client.
4. Enter a User Name, Password and Gateway as necessary and click OK.
5. Type the Server Name to connect to a CA API Gateway of your choice, for example gateway.domain.com.
Note: You may use either the Server Name or the IP Address. However, we recommend using the Server Name to
connect to your CA API Gateway.
For CA Plex to successfully publish services into the CA API Gateway, an administrative internal service called
'Gateway Management Service [/wsman]' must be installed into it. This is the CA API Gateway internal service used to
manage the CA API Gateway from an external program.
To publish this service into the Gateway:
a. Select Tasks, Publish Internal Service.
The Publish Internal Service dialog appears.
b. Select Gateway Management Service as the internal service to publish, and leave the Routing URI default value as
‘/wsman’.
c. Select Finish to publish the Gateway Management Service into the gateway.
A SOAP Service called 'Gateway Management Service [/wsman]' is listed in the Gateway Service Explorer in the lower
left window of the CA API Policy Manager user interface. You are now ready to publish a Plex-generated WCF Service
Connector into the Gateway.

Confirm That You Can Deploy Your CA Plex WCF Service to IIS
Make sure that you have a WCF Service Connector that can be deployed successfully into IIS using the Code Library
Wizard.
To verify that you have IIS correctly configured and that you can run a CA Plex WCF Service deployed into it, follow the
steps discussed in the scenario, Auto Deploy CA Plex WCF Services to Internet Information Services. You can use the
same sample local model that the Auto Deploy CA Plex WCF Services to Internet Information Services scenario used to
publish into the CA API Gateway.
Note: You can use the Code Library Wizard to publish your WCF Services into the CA API Gateway at the same time as
deploying to IIS. However, make sure that the WCF Service is successfully running in IIS before publishing that service
into the CA API Gateway to obtain better results.

241
CA Plex 7.2.1

Publish the Service to Your CA API Gateway Server


You can publish a Plex-generated WCF connector into one or more CA API Gateway server using the Code Library
Wizard.
Follow these steps:
1. Run the Code Library Wizard for each CA API Gateway you want to use.
2. Continue with the wizard to open the Plugin Options page.
3. Select the WCF Services from the dropdown list in the Plugin Options page.
The WCF Service Generator Plugin options are displayed.
4. Enter the following information under the Deployment CA API Properties section for the CA API Gateway you want to
use:
– Gateway Name
Type the same gateway name that you used for the CA API Policy Manager Client.
– Password
Type the password associated with the User Name you want to use when connecting to the CA API Gateway.
– Publish to CA API
Set this to True so that the Code Library Wizard will publish WCF Services into the CA API Gateway after they have
been deployed into IIS.
– User Name
Type the user name with administrative privileges to manage the CA API Gateway into which you published the
service.
5. Complete the remaining steps in the Code Library Wizard to compile your Code Libraries, and to generate, compile
and deploy the WCF Services associated with each Code Library. If the deployment to IIS succeeds then the WCF
Services are published into the CA API Gateway as SOAP Services.
Once each WCF Service has been published into the CA API Gateway, a unique Service ID is generated by the CA
API Gateway for it. CA Plex maintains a record of each CA API Gateway that a WCF Service has been deployed into
along with the associated Service ID. This information is stored in the CAAPIConfig Source Code object created under
the modeled Service Connector Package in the local model.
WARNING
Do NOT manually update or modify the contents of the CAAPIConfig Source Code object unless necessary.
For example, you may need to manually update the file if you renamed your CA API Gateway after you
have published services into it. Verify that you have saved a backup copy of the Source File content before
you modify it. Save any model changes after you have successfully generated, compiled, deployed, and
published your services using the Wizard.
NOTE
The CA Plex local model is not automatically saved after the Code Library Wizard is completed.
After you complete these steps, call your CA Plex WCF Service through the CA API Gateway after you complete these
steps.

Review the Properties of a Published Service


You can view details about a service that you have published into a CA API Gateway.

Example 1:
You can view the Service ID associated with a service published into the CA API Gateway.
Follow these steps:
1. Launch the CA API Policy Manager Client.
2. Log on to the CA API Gateway to which you published the service.

242
CA Plex 7.2.1

3. Locate the published service in the CA API Gateway Explorer.


4. Right-click the published service and select Service Properties.
The Published Service Properties dialog is displayed.
5. Locate the Service ID entry.
The Service ID matches the value stored in the CAAPIConfig Source Code object that is associated with the Service
Connector in the Plex model.

Example 2:
You can view the HTTP Details for a service published into the CA API Gateway.
Follow these steps:
1. Launch the CA API Policy Manager Client.
2. Log on to the CA API Gateway to which you published the service.
3. Locate the published service in the CA API Gateway Explorer.
4. Right-click the published service and select Service Properties.
The Published Service Properties dialog is displayed.
5. Select the HTTP/FTP tab.
The Gateway URL that receives requests for this service is displayed.in the Service Resolution section, under the
Custom resolution path.
The [port] value will vary depending on how the open ports are configured in the CA API Gateway. The default port
numbers are as follows.
– If the URL protocol is http; use 8080 as the port number.
– If the URL protocol is https, use 8443 as the port number.
Use http and port number 8080 to connect to the service unless you prefer to update the policy file assertions with the
published service and call it via https. For example, if you have deployed a WCF Service called OrderService into a
CA API Gateway called gateway.domain.com; you can use the following URL to address the service via the Gateway:
http:// gateway.domain.com:8080/OrderService
You can now call the WCF Service via the CA API Gateway.

Call the Published Service Using SoapUI


You can call a published service using SoapUI. If the SoapUI project already exists then you can reuse the same project
to access your service via IIS by changing the address to access the service. Following is an example.
Assume that you deployed a WCF Service called OrderService into an IIS server called iisserver.acme.com. When
creating a SoapUI project to call the service, you must have used a WSDL at the following address:
http://iisserver.acme.com/OrderService/Order.Component.svc?wsdl
You have now published that service into the CA API Gateway gateway.domain.com. You can also use the following
address to reference the WSDL associated with the service:
http://gateway.domain.com:8080/OrderService?wsdl
To access a service published into the CA API Gateway via SoapUI, you must change its endpoint address in SoapUI.
Follow these steps:
1. Open SoapUI:
2. Double-click one of the service operation requests.
3. Select [add new endpoint...] from the endpoint address drop-down list.
The Add new endpoint dialog opens.
4. Enter the address of your service and click OK.

243
CA Plex 7.2.1

For example, change:


http://iisserver.acme.com/OrderService/Order.Component.svc
to:
http://gateway.domain.com:8080/OrderService
5. Click the Submit Request arrow icon to call the service via the CA API Gateway.
This action executes the published service in the same way as it was called using the IIS server address.

Troubleshooting
This section lists the Code Library Wizard error messages and action to be taken against each message.
Error on CA API publishing: Failed to publish SOAP Web Service 'Your Server Name’ into CA API Gateway ‘Your
Gateway Name' - See next error for details. com.l7tech.gateway.api.Accessor$AccessorNetworkException:
Unknown host: ‘Your Gateway Name’
Cause:
Indicates that you entered an incorrect Gateway name, for example Server does not exist or CA API Gateway is not up
and running.
Solution:
Make sure CA API Gateway has been set up, enter the correct Gateway name, and run the Wizard again.
Error on CA API publishing: Failed to publish SOAP Web Service 'Your Server Name’ into CA API Gateway ‘Your
Gateway Name’- See next error for details.com.l7tech.gateway.api.Accessor$AccessorSOAPFaultException:
SOAP Fault: Policy Falsified
Cause:
Indicates that you entered a wrong user name or an incorrect password.
Solution:
Enter the correct user name and password. Run the Wizard again.
Error on CA API publishing: Failed to publish SOAP Web Service 'Your Server Name’ into CA API Gateway ‘Your
Gateway Name’- See next error for details.
com.l7tech.gateway.api.Accessor$AccessorRuntimeException: java.io.IOException: Service Unavailable
Cause:
Indicates that the CA API Gateway web management internal service cannot be contacted for the gateway into which you
tried publishing your services.
Solution:
Make sure that the ‘Gateway Management Service [/wsman]’ internal service has been successfully published into the CA
API Gateway as described in Install, Connect, and Configure your CA API Gateway Server.

Tutorials
• Tutorial for Java: Discusses how to develop Java applications using CA Plex.
• Tutorial for System i: Provides the steps to create a simple model from the design stages through adding data to your
finished application.
• Tutorial for Windows: Shows how to create a simple Windows application that accesses data using open database
components (ODBC).
This section contains the following tutorials:
More Information

244
CA Plex 7.2.1

• Tutorial for Java


• Tutorial for System i
• Tutorial for Windows
Tutorial for Java
250
Download Tutorial for Java.
NOTE
Request you to ignore any blank pages that show in this PDF. These are intentionally blank pages included for
the use of PDF downloads.

Tutorial for System i


250
Download Tutorial for System i.

Tutorial for Windows


250
Download Tutorial for Windows.
NOTE
Request you to ignore any blank pages that show in this PDF. These are intentionally blank pages included for
the use of PDF downloads.

245
CA Plex 7.2.1

Running
You can restore a product library under a different name or generate, build, and run the Tutorial Reference model in CA
Plex.
This section discusses the following topics:
More Information
• How to Restore the Product Libraries Under a Different Name
• How to Use The Tutorial Reference Model

How to Restore the Product Libraries Under a Different Name


You can choose to restore the product library under a different name instead of the default PLEX721. If you change
the default name, you will need to manually update several references to the library name as described in the following
sections:
• Update the Job Description
• Modify Files on the PC

Update the Job Description


To restore the product library under a different name instead of the default PLEX721, manually update the job description.
After restoring the library, enter the following command to update its JOBD:
CHGJOBD JOBD(library-name/PLEX721)
INLLIBL(QTEMP library-name YTUTORIAL YTUTREFER APPINTOBJ
QGPL)

Modify Files on the PC


The following instructions explain how to change certain default settings in CA Plex to use the name of the CA Plex
System i product library that you specified (Library-name in this example) instead of the default name (PLEX721).
To modify files on the PC
1. Open a text editor, such as WordPad.
2. Modify the following files on the PC to reflect the unique System i library names that you used for the new version:
NOTE
The following files are copied to your personal Documents folder (in the CA\Plex\7.2.1 sub-folder) when you
first run CA Plex. If you have already run CA Plex, you may also want to update the copies in your personal
Documents folder.
3. Using the same change for Obsyrt.ini, modify the following:
– \Bin\Ob721rc.INI
– \Bin\Ob721rcd.INI

How to Use The Tutorial Reference Model


This section discusses how to use the tutorial reference model. The tutorial reference model, tutrefer.mdl, is located in
the Plex tutrefer subdirectory. The file started as the tutorial.mdl file, and has all of the information in it that you add when
doing the tutorial.

246
CA Plex 7.2.1

The model uses its own data source, and that data source has a corresponding database. So, you can work with the
tutorial reference model without conflicting with the tutorial model, or its data. Because it is separate from the tutorial
model, you can also use the reference tutorial model to experiment with. As you read about functionality in the online
help, you can use the tutorial reference model to try out CA Plex features. Before experimenting with this model, make a
backup copy of it, so that you can revert to the shipped version.
This section discusses the following topics:
More Information
• Generate, Build and Run Tutorial Reference Model
• How to Integrate the Application for the Tutorial Reference Model
Generate, Build and Run Tutorial Reference Model
You can generate and build the tutorial reference model immediately, without having to do anything to it.
Use the following procedure to generate, build, and run the tutorial reference model.
Follow these steps:
1. Open the tutrefer.mdl model
.
2. Open a Generate and Build window.
3. Select all of the non library objects in the window.
4. Click the Generate and Build toolbar button
.
CA Plex expands the selected entities and highlights all of the generatable objects under it.
A Confirm Generate dialog appears, indicating the number of objects that are generated. Not all of the scoped objects
are selected.
5. Click Yes.
CA Plex generates those objects, and then summarizes the generation process.
CA Plex prompts you to compile and build the objects.
6. Click Yes.
CA Plex starts Microsoft Visual Studio to compile the generated source files.
NOTE
You will see several warnings in the Message Log during the compilation process that indicate that no source
for the various views (views are the files that end with the extension VIW) were submitted to the ODBC
generator. Do not worry about the warning; your application will function properly.
You can tell that your build is done when the label on the Microsoft Visual Studio task bar button changes from the
name of the model to Microsoft Visual C++ or, if you have opened the Visual Studio window so that you could watch
the build, you can tell that it is finished when the cursor returns to the top of the build summary.
7. Right click the Project Manager function in the Generate and Build window and select Create Exe.
Visual Studio creates an executable file for the function.
8. Switch to Windows Explorer, find the directory that stores your compiled files, and double click Projects.exe. The
default location for the compiled files is:
PlexInstallationDirectory/Tutrefer/Gen/Release
The tutorial reference model application starts:

247
CA Plex 7.2.1

9. Click Maintain Employees to add some employee records.


10. Select Plex r7.2.1 Tutrefer.dsn when prompted to select a data source.
11. Click Create New Project to add a project and its tasks.
12. Click Maintain Projects to verify that the information you added is available.

How to Integrate the Application for the Tutorial Reference Model


This scenario discusses how you can integrate all of the panels in your application with a top-level menu when you have
an application with panels that enable you to add projects, add tasks to projects, add employees, assign employees to
tasks, and access tasks for a project. You had previously defined the Task entity, and then added processing enabling end
users to add tasks to a project and to assign employees to those tasks. You can now proceed to integrate the application.
Follow these steps:

The following diagram illustrates how to integrate the application for the Tutorial for Reference model:
Figure 13: Scenario diagram to integrate the application for a Tutorial Reference Model

Create a Function to Tie the Application Together


There are three things that you can do with the application:
• Add new projects, using the wizard
• Maintain data about projects and tasks, using the second tab of the property sheet
• Maintain employee data, using the first tab of the property sheet
You can create a simple function that calls the wizard and property sheet. Start with UIBASIC/UIBasicShell, which has a
panel and a caption, but no associated processing. Next, you modify the panel for your function by adding three buttons to
it, which let users open the property sheet and the wizard:
You also specify a recognizable file name for the application, so that when you create an executable file (.EXE), its name
makes sense.
Use the following procedure to create a top-level interface:
Follow these steps:
1. Set the Model Editor object type to Function, and add the following triple:
Project Manager is a UIBASIC/UIBasicShell
UIBASIC/UIBasicShell is one of the simplest functions in the CA Plex Pattern Libraries. It has a panel with a caption,
and a single event to close the panel. The action diagram has an Events Handler, where you specify how to respond
to logical events you define on the panel, but not much processing beyond that.When you deploy your application, you
want your executable file to have a meaningful name. The Project Manager function becomes the executable program.

248
CA Plex 7.2.1

If you do not specify a file name for that function, CA Plex creates an executable with an automatically generated file
name, such as AAc4F.exe.
2. Add the following triples:
Project Manager file name Projects
Project Manager impl name Projects
Now, when you build your application, CA Plex gives it the name Projects.exe.

Modify the Project Manager’s Panel


In this section, you modify the Project Manager panel by adding three buttons:
• The first button enables end users to add a project by starting your wizard.
• The second button enables end users to maintain project data by opening your property sheet with the Projects and
Tasks tab showing.
• The third button enables end users to maintain employee data by opening your property sheet with the Employees tab
showing.
Follow these steps:
1. Open Project Manager.Panel. Notice that, unlike the other panels you have worked with, this one does not come with
any regions, buttons, or
grids:
2. Right‑click the top left corner of the panel and select Create Push Button.
A button is added to your panel, with the button text selected.
3. Type &Create New Project to change the text, and press Enter.
The & in the text indicates that the letter that follows appears as an underlined access key on the screen.
The new button you created shows up in the Panel Palette under the Controls folder:

4. Click below the Create New Project button on the panel to clear it.
5. Repeat Steps 2-4 to create two more buttons below the Create New Project button, with the captions Maintain
&Projects and Maintain &Employees.
6. Resize and arrange the panel and its buttons so that appears as follows:

7. Save your changes, but keep the Panel Designer open.

Create and Map Logical Events


At this point, the buttons you just created will not do anything if you click them. You need to define a logical event for each
button so that you can define what should happen when that button is clicked.
Use logicents to link actions end users take to code in an action diagram. In the following steps, you create logical events
that are triggered when your end users click each of the three buttons.

After you define these events, you modify the Project Manager function to call the wizard and property sheet functions
when each logical event is triggered.
Follow these steps:
1. Select the Create New Project button in the Design Window.
2. Right‑click the button and choose Event Mappings from the pop‑up menu.
The Event Mappings dialog appears.
Note that there are already two logical events defined: Close and Prompt. Next, you add your own logical event.
3. Click Create Event.

249
CA Plex 7.2.1

The Create Event dialog appears:

4. Enter Create New Project and click OK.


Your new logical event is now available in the Logical Event list. Select Pressed in the Physical Event list, and Create
New Project in the Logical Event list:

Now, when end users click the Create New Project button, the Create New Project logical event is triggered. Later, you
add action diagram code to call the Project Wizard function when this event is triggered.
5. Click OK.
6. Repeat Steps 2-6 to create logical events called Maintain Projects and Maintain Employees. Associate the logical
events with the Pressed physical events for the corresponding buttons.
7. Save your changes but keep the Panel Designer open.

Event Handling in the Action Diagram


You have now defined logical events and linked them to physical events for the buttons you created. Next, you must tell
the application what to do when those logical events are triggered. You do so within the Events Handler construct of the
action diagram for your Project Manager function.
Do the following:
1. Call the Wizard
2. Modify the Property Sheet
3. Call the Property Sheet

Call the Wizard


When end users click the Create Project button, you want to call the Project Wizard function so that they can define a new
Project record and the Task records that go with that Project.
To do this, add an Event construct specifying what should happen when the Create New Project event is triggered.
Use the following procedure to add action diagram code for the Create New Project event.
Follow these steps:
1. Choose Edit Scoping Function F11 from the View menu to switch to the action diagram for the Project Manager
function.
2. Select the Events Post Point in the Select Edit Point dialog, and click OK:

3. Expand the Events folder in the Action Diagram Palette (not the Variable Palette).
Note that the three logical events you created are listed in the Events folder:

4. Drag the Create New Project event to the input line of the Action Diagrammer, and press Enter.
This adds an Event construct:

5. Set the Object Browser to display functions.


6. Drag the Project Wizard function to the input line of the Action Diagrammer, and press Enter.
A function call statement is added to the action diagram:
This tells the function to display the wizard when the Create New Project button is pressed.
At this point, you will only map the one event. Before you can map the other two events to call the property sheet, you
must make a small change to the property sheet function.
7. Save your model but keep the action diagram open for use.

250
CA Plex 7.2.1

Modify the Property Sheet


When end users click Maintain Projects on your top‑level panel, the property sheet should open to the Projects and Tasks
tab. When they click Maintain Employees, the property sheet should open to the Employees tab. Before you can do this,
you have to modify the Project Property Sheet function to accept a starting tab number as an input parameter.
Use the following procedure to enable the property sheet to open to a specific tab.
Follow these steps:
1. Open the action diagram for Project Property Sheet.
2. Click Cancel on the Select Edit Point dialog.
In the following steps, you add the FIELDS/Tab field to the Input variable in the Input variable group. The value of this
Tab field specifies which tab of the property sheet to display.
3. Set the Object Browser to display fields.
4. Make sure that library objects are displayed. If they are not, click the Show/Hide Library Objects button.
5. Expand the Input variable group in the Variable Palette.
6. Drag the FIELDS/Tab field from the Object Browser to the Input variable in the Variable Palette:

Now, any function that calls the Project Property Sheet function has to pass in a value for this field. Next, you add a
statement to use that value to determine which tab to display.
7. Navigate to the Pre Point before the End Initialize Edit Point.
There is already code in the Pre Point. The statement you add goes at the end, after what is already there.
8. Add the following statement:
Set TabStripL<SelectedTab> = Input<Tab>
This sets the displayed tab to the one indicated in the input variable. The action diagram appears as follows:

9. Save your model and close the action diagram.

Call the Property Sheet


You have now changed the property sheet so that when you call it, you can specify which tab to display. Next, you add the
calls from the Project Manager function to the property sheet.
Follow theses steps:
1. Switch back to the action diagram for the Project Manager function and go to the Events Post Point. If necessary, you
can use the menu items on the Window menu to switch between editors.
2. Click below the Events construct you already added.
Before you can add the next event construct, you need to create a local variable. You then add a field to the variable
that you use when calling the property sheet.
3. Right‑click one of the variable groups in the Variable Palette, and choose Create Variable from the pop‑up menu.
4. Select the Local variable group from the Group list.
5. Enter Tab Number in the Name field, and click OK.

This creates a variable called Tab Number in the Local variable group. Next, you add a field to the variable.
6. Expand the Local variable group in the Variable Palette.
CA Plex provides a field called Int in the FIELDS Pattern Library that stores literal values for integers. Use the field in
this function to specify the tabs in the property sheet by their number (Tab 1 and Tab 2).
7. Set the Object Browser to display fields, make sure library objects are showing, and drag the FIELDS/Int field from the
Object Browser to the Tab Number variable:

251
CA Plex 7.2.1

Next, tell the Project Manager function what to do when the Maintain Projects and Maintain Employees buttons are
clicked.
8. Expand the Events folder in the Action Diagram Palette.
9. Drag the Maintain Projects logical event from the Action Diagram Palette to the input line of the Action Diagrammer,
and press Enter.
10. Drag the Project Property Sheet function from the Object Browser to the input line of the Action Diagrammer, and
press Enter. Notice that CA Plex automatically assumes you are entering a Call statement.
The Parameter Mapping dialog appears. Next, tell the Project Manager function what value to pass to the Project
Property Sheet function. The Project Property Sheet function uses that value to determine which tab to display.
11. Click Map Parameter.
The Select Field dialog appears:

Notice that both the Tab Number variable and the Int field you added to it are displayed.
12. Expand the Int field.
13. Select the value 2 and click OK.
This tells the property sheet to open the Projects and Tasks tab when it is called. Next, you tell the Project Manager
function to open the property sheet when the Maintain Employees button is clicked. But this time, you make the
Employees tab show.
14. Click OK to close the Parameter Mapping dialog.
15. Click below the Maintain Projects Event construct in the action diagram.
16. Clear the input line of the Action Diagrammer.
17. Drag the Maintain Employees logical event from the Action Diagram Palette to the input line of the Action Diagrammer,
and press Enter.
This adds another Event construct to the action diagram.
18. Repeat Steps 8-14 to call the Project Property Sheet function for the Maintain Employees logical event, but instead of
mapping to <Int.2>, map it to <Int.*One>.
The action diagram appears as follows:

19. Save your model and close the action diagram.

Generate and Build Your Applications


You have now created a logical event for each of the three buttons you created. You have mapped those logical events to
physical events, and, you specified what should happen whenever those logical events are triggered. You also changed
the Project Property Sheet function to give it an input parameter, which determines which tab to display. Next, you
generate and build the Project Manager and Project Property Sheet functions and test them to verify that they work.

Create an Executable Program


So far, you have always tested the parts of the application you are building from within the CA Plex development
environment. To deploy the application after you have finished it, you need to have an executable file.
To create an executable program:
1. Select the Project Manager function in the Generate and Build window.
2. Click the Create Exe button.
You have added the triple Project Manager file name Projects previously. The Create Exe process uses that triple to
determine the filename to create.
3. Click Yes when prompted to build the .exe file.
4. Switch from CA Plex to Windows Explorer, and locate the directory in which your compiled files reside.
Note: By default this directory is C:\Program Files\CA\CA Plex r6.0\Tutorial\Gen\Release.

252
CA Plex 7.2.1

5. Double‑click the file Projects.exe to start the application.


The Project Manager dialog appears:

6. Close the application.

Stop the Select Data Source Dialog Appearing


Throughout this tutorial you may have noticed that every time a function runs you are prompted to select an ODBC
data source (Plex r7.2.1 Tutorial.dsn). This can be prevented by entering the required DSN (Data Source Name) in the
application’s initialization (.INI) file. When you created an executable program you also created a corresponding file called
Projects.ini.
1. Select the Project Manager function in the Generate and Build window.
2. Select View Source from the View menu.
3. Select the Projects.ini file (the last file in the list) in the Select Source To View dialog and click OK.
4. Scroll down to the [ODBC Settings] section and update the DSN= setting as shown:
[ODBC Settings]
SAVE DSN=False
DSN=Plex r7.2.1 Tutorial.dsn
Userid=
Password=
Database=
Errorlog=
Default Connect=True
5. Close the document and save your changes.

Test the Application


Now that you have generated and built the application, created an executable file for the Maintain Project function, and
started that executable file, you can test the application.
Follow these steps:
1. Double-click Projects.exe to start the application.
2. Click Maintain Employees.
The property sheet appears with the Employees tab visible.
3. Add the following employee:

Value Enter
Employee ID Emp04
Employee Description Bob Strudwick
Employee Hire Status Full-time
Employee Email [email protected]
4. Close the dialog.
5. Click Create New Project.
The project wizard appears.
6. Add the following project:

Value Enter
Project ID Proj05

253
CA Plex 7.2.1

Project Description Create a data repository for legacy financial information.


Project Start Date 06/15/04
Project End Date 12/01/04
7. Add the following tasks for the project:

Value Enter
Task ID DBImport
Task Description Use db imp
Employee ID Emp04

Value Enter
Task ID Transport
Task Description Transport
Employee ID Emp02
8. Click Finish to close the wizard.
9. Click Maintain Projects.
The property sheet appears with the Projects and Tasks tab visible.
10. Verify that the information you added with the wizard is in the database.
11. Close the property sheet.
12. Close the application.
At this point, you can no longer test the property sheet by running it directly from the Generate and Build window. You
can only run the property sheet from the Project Manager function, because you specified an input parameter to tell the
property sheet which tab to display.

254
CA Plex 7.2.1

Troubleshooting
This section contains information on troubleshooting objects and triples:
More Information
• BLD9081 Warning Messages
• Check for Errors
• Check for Java Build Errors
• Delete Objects You Unintentionally Created
• Manage Triples
• Rename Objects Whose Names You Mistyped
• Troubleshoot When Calling a Web Service

BLD9081 Warning Messages


Two warnings appear in the Message Log during the generation and build processes when you complete the tutorial for
windows. This is expected and is not a problem. If you have additional warnings or error messages this may indicate a
problem. The most likely cause is that you have not entered all the necessary triples into the model -- go back and check
against the instructions.
Error is also likely if CA Plex did not install properly.
• Two warning messages (BLD9081) indicate that no source for various views has been submitted to the ODBC data
source. This is expected because we have set up CA Plex not to implement views in the Microsoft Office Access
database being used for this sample application.

Check for Errors


Three warnings appear in the Message Log during the generation and build processes. This is expected and not a
problem. If you have additional warnings or error messages this may indicate a problem. The most likely cause is that you
have not entered all the necessary triples into the model -- go back and review the instructions.
Errors are also likely if CA Plex did not install properly.
• One warning message (BLD9083) indicates that the Project Description field has a length greater than 255. This is not
a problem for the database we are using.
• Two warning messages (BLD9081) indicate that no source for various views was submitted to the ODBC data source.
This is expected because we set up CA Plex not to implement views in the Jet database being used for this tutorial.

255
CA Plex 7.2.1

Check for C++ Build Errors


Follow these steps:
1. Click the WinC Build Summary toolbar
button
to view the build summary, to verify there were not any errors.
NOTE
The WinC Build Summary toolbar button may not work if the path to your generation directory contains
embedded spaces. You are not prompted to review the build summary any more. However, if your
application does not run correctly, you must review to see if there were errors.
2. Click the Save toolbar button to save your model.

Check for Java application hang with ObRun.ObUtils.ObUserApi - convertScientificNotationToString


One can experience the Java application hang while using convertScientificNotationToString user API. This could be
because of large impractical Exponent value passed to the API.
Considering the practical exponent range for converted string value for further processing, threshold value for exponent
has been set to 308.
NOTE
As a solution - If the exponent value passed to 'convertScientificNotationToString' API is greater
than 308 e.g. "1E43256782", then a message appears to the user as Exponent part exceeded threshold
limit hence truncating exponent value of " 1E43256782 " to 308 , and truncated value gets printed
accordingly.

Check for Java Build Errors


To check for Java build errors
Click the Java Build Summary toolbar button to view the build summary, to make sure there were not any errors.
You are not prompted to review the build summary any more in this sample application, but if your application does not
run correctly, you should review it to see if there were errors.
Click the Save toolbar button to save your model.

256
CA Plex 7.2.1

Delete Objects You Unintentionally Created


You can delete objects that you unintentionally created.
Follow these steps;
1. Set the Object Browser so that it shows the type of object you want to delete.
2. Right-click the errant object and select Object, and then select Delete.
The Delete dialog appears.

3. Click OK. The Delete Object dialog appears.


This dialog shows the objects that are deleted. The following example shows you the objects that are deleted when
deleting an entity called Gridmaintained entity.

4. Click OK.

Manage Triples
You spend a lot of time working with triples when creating an application. Here are tips on how to select, delete, and
change triples:
• To select a whole triple, click the center column of the Model Editor, where the verb is.

257
CA Plex 7.2.1

• To delete a triple, select the triple in the Model Editor and press the Delete key.
• To change a triple, select the triple in the Model Editor, change the value in the source object field, the verb list, or the
target object field (or a combination of these), and click the Change Triple toolbar button.

List of Undocumented Triples


FNC field FLD - This is scoping verb to make field scoped to a function.
Below are the triples - added for future usage and Integration point between Plex & third parties.

FLD DDL override NME


FLD decoded by SRC
FLD encoded by SRC
FLD page input validated by FNC
FNC property SYS
FNC returns view VW

Rename Objects Whose Names You Mistyped


When you mistype the name of a library object, you end up with objects you did not intend to create.
Follow these steps;
1. Set the Object Browser to show the type of object you want to rename.
2. Select the object and click the Name toolbar button.
The Rename Object dialog appears:
3. Replace the name in the Name field with the new name.
4. Click OK.

Troubleshoot When Calling a Web Service


This section discusses how to troubleshoot the following errors that are encountered during importing and calling a web
service:

An Exception from the Running Web Service


Symptom:
The back-end sample web service is not properly written and there are scenarios where the service operation crashes.
Example:

258
CA Plex 7.2.1

When you try to supply an empty stock symbol to the service, the web service throws an index out of bounds exception
when the Stock Quote API returns an invalid value.
Solution:
The error is in the back-end web service in this example. Hence, the CA Plex .NET runtime unwinds the exception stack
trace and reports the root cause of the error in the CA Plex Message Log. The following image shows that the root cause
was an index out of bounds exception inside the running back-end web service.

Web Service Unavailable


Symptom:
If the CA Plex .NET Runtime cannot connect to the server, you get a connection error that looks similar to a standard CA
Plex remote call error.
Example:
The StockQuoteWebService is not running under debug mode in the ASP.NET Development Server, and as such, the CA
Plex .NET Runtime cannot call the web service. You get the following connection error message: “No connection could be
made because the target machine actively refused it”.

259
CA Plex 7.2.1

Solution:
This error is caused because of one of the following reasons:
• When the web service is unavailable
• When your network connection is down
• When the web service is running in the ASP.NET Development Server on a different port, other than that you used to
import the web service
NOTE
If you have other connectivity issues, such as security or proxy configuration issues, the diagnostic trace
message provides more information about the nature of the problem. If the web service address has changed,
you can update the address to the WSDL in the Plex local model. The address is stored in the narrative for the
Package object that represents the web service.

Error Handling
The basic code that is outlined in importing and using WCF Services in .NET Client Applications enables you to make
calls through WCF to your Plex server applications. However, one of the primary considerations while creating client-
based applications that access your services is the error handling.
Symptom:
There can be many reasons when a call to a CA Plex generated server application fails. Here are some of the scenarios:
• When the AssemblyList property in the Plex.ObRun.dll.config file deployed with the WCF service is set incorrectly, the
CA Plex generated function cannot be located.
• An operation on the WCF service, which means calling a CA Plex generated Java or System i function fails when:

260
CA Plex 7.2.1

– The dispatcher is not running on the server.


– The configuration information for the required server is set incorrectly in the Plex.ObRun.dll.config file.
• The CA Plex generated function being called crashes (for example, when the Source Code object causes a null pointer
exception).
• The database used by the Plex generated application throws some errors when:
– The connection string or data source is incorrect.
– The database table or view cannot be found.
Solution:
You can handle the first three types of errors by checking whether the Environment<*Call status> flag has a value of
<*Call status.*Error> returned by the runtime. The CA Plex generated function can then test the environment field after the
call and decide if the call was successful or not.
You can handle the last type of error at function level in the Action Diagram code. In the Plex Pattern and Class libraries,
any error that is returned from a database is returned to the calling program by copying the Environment<*View status>
field into the Environment<*Returning status> field. This is returned to the calling function that can check the value in the
Environment<*Returned status> after the call to decide if the call was successful.
Note: The WCF supports the concept of Fault Contracts to define any abnormal return from an operation call. A fault
contract defines the type of exception a client can expect to get back if an error occurs in the server. The fault contract is
then translated back into the client as a technology-specific exception. The Plex WCF runtime defines a fault contract that
is used against every operation generated only a WCF service interface called PlexRuntimeException. By monitoring this
exception in client code, a caller validates that a call was successful and if it was not, decides on the best course of action.
Troubleshooting Information
The Plex-specific runtime information is hidden from the caller. The PlexRuntimeException class contains a number of
properties that a client application can use to diagnose an error. The properties are as follows:
• Message
Defines a string that represents a user-friendly error message caused by the CA Plex runtime.
• ReturnedStatus
Defines a string that represents any Environment<*Returning status> set in the CA Plex function called by an
operation.
• CallStatus
Defines a boolean value that represents the Environment<*Call status> set by the CA Plex .NET runtime during
execution of the CA Plex function called by an operation.

261
CA Plex 7.2.1

Reference
This section discusses a list of components and features of CA Plex.
This section includes the following topics:
More Information
• CA Plex Components
• CA Plex Features
• System i Components
• Frequently Asked Questions

CA Plex Components
This section provides a glossary of the components and concepts of CA Plex that help users to model applications. This
section discusses the following components:

Reusable Business Patternshttp://wiki-dev.ca.com/display/PLEX/Reusable+Business+Patterns


CA Plex developers model applications by reusing patterns. A pattern describes a solution to a recurring problem in
software systems. Patterns are abstract descriptions that can be reused in many contexts. An example of a pattern is
Structure.
A pattern describes a solution to a recurring problem in software systems. Patterns are abstract descriptions that you can
reuse in many contexts. An example of a pattern is Structure. The Structure pattern provides the:
• Database schema
• User interface designs
• Programs
You can use to implement hierarchical data structures such as a bill of materials, an organization chart, or a chart of
accounts. CA Plex includes libraries of such patterns, and additional libraries are available from third-party vendors.
Several of the patterns from the CA Plex pattern libraries are shown in this tutorial.

Workgroup Development
CA Plex provides a model-based workgroup environment in which teams of software developers can collaborate on
the design and construction of applications. At the heart of this environment is a repository whose facilities include the
following:
• Multiple developer support that enables developers to work offline and then update their changes to the central
repository
• Built-in configuration management that enables a model to store a single application design in multiple versions,
platforms, and national languages
• The integration of designs stored across multiple models
For simplicity, the sample focuses on a single-user environment. The single-user model, called a local model, has already
been created for you.

262
CA Plex 7.2.1

Code Generation
Based on the designs held in the repository, CA Plex automatically generates 100 percent of the code to implement
applications and database objects across several platforms. Currently supported implementation options include the
following:
• Multitier web applications with Java or HTML clients and Java, .NET , or System i servers
• Multitier client/server applications with C# WPF, Win32 C++ or Java swing clients and Java, .NET, or System i servers
• System i 5250 character-based terminal applications
CA constantly improves and expands the available generators to keep pace with customer demand and advances in
technology. Generators insulate you from the underlying technology and its implementation details—CA Plex users can
use new platforms simply by regenerating their existing designs.

Terms
In this section, you create an entity called Project. The Project entity uses fields to store information, such as its start and
end dates. You inherit functions to enable end users to create, modify, and delete projects. Entities, fields, and functions
are all types of CA Plex objects.
A local model is the file that stores the design of the application you are building. In your local model, you create and
define objects.
The Object Browser displays all of the objects in a model. In it, you can see the pattern library objects available, as well as
the objects that you define in your model.

Object Types
CA Plex uses many types of objects. The following shows the icon, the object type, and the abbreviation, and a
description of the objects that CA Plex uses to identify each object type that you encounter while building the application.

Object Type Abbreviation Icon Description


Entity ENT Entities are the tangible objects,
such as customers and orders,
and intangible objects, such as
projects and job titles, about
which you want to record
information.
Field FLD Fields are the pieces of
information that you want to
record about an entity, such as
employee names, item prices,
and order statuses.
Function FNC Functions are processes that
define the functionality of an
application. A function is roughly
equivalent to a program or
method.
Panel PNL Panels are the windows and
dialogs that make up the user
interface of the application.
Table TBL Tables are the physical
structures in which data is
stored in applications that use
relational databases.

263
CA Plex 7.2.1

View VW Views represent all or part of the


data in a database table. A view
does not contain any data --
you can think of it as a window
through which you look at the
data in the table.
Diagram DGM Diagrams visually represent
a subset of the objects in a
model. They show objects and
the relationships between the
objects.
Message MSG Messages hold text. The text
can be used in error messages,
as the caption for windows and
dialogs, and so on.

Toolbar and Icons


The following list shows a list of toolbar icons and describes each of them.

Icons Name Description


Model Editor Opens the Model editor.

Show/Hide Browsers Shows or hides the object browser.

Fields Displays field objects.

Two Levels Amount of detail displayed on Model Editor


- Depth of two levels.
One Level Amount of detail displayed on Model Editor
- Depth of one level.
Clear Focus Resets the display of the editor.

Show/Hide Library Objects Shows or Hides the library objects.

Entities Displays Entities.

Inspect Shows triples that define only that entity

New Gen and Build Opens a New Gen and Build Window.

Gen and Build Starts the Generate and Build process for
the selected objects.
WinC Build Summary Displays the WinC build summary.

Run Runs the application.

Copy Creates a new project populated with a


current project’s data.
Editor Opens the appropriate editor based on the
selection.
Panel Palette Displays the panel palette.

Properties Displays the properties.

264
CA Plex 7.2.1

Check mark Confirms the entered values in the Panel


editor.

More Information
• Objects and the Object Browser
• Library Objects
• Property Sheets
• Field Inheritance
• Project Entity and Triples
• Continuation Triples
• Patterns and Inheritance
• Scoped Objects
• The Panel Designer
• Entity Relationships
• Entity-Relationship Diagrams
• Code Library
• Inheritance

Objects and the Object Browser


A local model is the file that stores the design of the application you are building. In your model, you create and define
objects.
You can create an entity called Project, The Project entity uses fields to store information, such as its start and end dates.
You can inherit functions to enable end users to create, modify, and delete projects. Entities, fields and functions are all
types of CA Plex objects.
The Object Browser is the bucket that displays all of the objects in a model. In it, you can see the pattern library objects
available, as well as the objects that you define in your model. See Display the Object Browser.
A library is a collection of objects that you import into your model. CA provides a set of class libraries with CA Plex; in this
tutorial, when you see the term library, it refers to those libraries. However, any model that you import into your model is a
library.
You can keep the Object Browser open while you work and use it as a palette from which to drag the objects you need.
When it overlaps other CA Plex windows, it always appears on top.

265
CA Plex 7.2.1

You select which type of object you want to view in the Object Browser (you see one type of object at a time). Notice that
the Object Browser has shortcut buttons for displaying entities, fields, and functions. Setting the Object Browser to display
functions only displays unscoped functions. Functions that are scoped to another object (such as an entity or a view) are
displayed only when the Object Browser is focused on that object type.

266
CA Plex 7.2.1

Library Objects
The Object Browser displays all available objects. If the Object Browser is empty, click the Show/Hide Library Objects

button t
show the library objects. The button appears on the toolbar and Object Browser.
You can use the object list to specify which type of object you want to see.
It is easy to identify that an object is a library object because, by default, the object has the library name in front of the
object name.
For example, OBAS400/Entity With Direct Format means that this entity comes from the OBAS400 class library.

Property Sheets
Property sheets are dialogs that contain two or more tabs. When you click a tab, the dialog displays information based
on the tab text. Property sheets are also known as tabbed dialogs. CA Plex uses FrameChild functions to display the
information for each tab of the property sheet, as it does for wizards.
The tabs that you see on property sheets are provided by an ActiveX control that has been integrated with CA Plex
patterns.
You can create a property sheet that enables end users to maintain employees and the projects that they defined using
the wizard.
When you are done, the two tabs of your property sheet appear as follows:

267
CA Plex 7.2.1

268
CA Plex 7.2.1

Field Inheritance
You use inheritance to define the properties of fields. Inheritance in CA Plex is defined in a simple way -- using the is a
verb.
Following are the triples you enter in the next series of steps:
• Project ID is a FIELDS/Identifier
• Project Description is a FIELDS/ShortDescription
• Project Start Date is a DATE/CheckedDateISO
• Project End Date is a DATE/CheckedDateISO
The FIELDS and DATE prefixes indicate that the objects concerned belong to the FIELDS and DATE pattern libraries,
respectively.
The fields you defined previously have two different data types: character and date. These represent different kinds of
fields. The Project ID field holds code that uniquely identifies a project, the description holds text, and the start and end
dates hold dates. Currently, your model only indicates that those fields exist, and that they belong to the Project entity, but
has no information about what type of data they store.
Inheritance is the mechanism that enables an object to adopt the properties of another more general (or abstract) object.
By inheriting from pattern library fields, you enable your application to do the following:
• Validate data entered in the fields (which ensures, for example, that an end user does not accidentally enter February
31)
• Display data on the screen appropriately (such as displaying dates according to your Windows settings)
• Store data appropriately in the database (creating a text field in the database for the Project Description field, and date
fields for the Project Start Date and Project End Date fields)

Project Entity and Triples


In CA Plex, you define objects and specify relationships between them with triples. As the name implies, a triple has three
parts: a source object, a verb, and a target object.
For example, you use the following triple to define a unique identifier for the Project entity:
Project known by FLD Project ID
In this example, Project (an entity) is the source object of the triple, known by (or known by FLD) is the verb, and Project
ID (a field) is the target object.
In CA Plex documentation, verbs are always printed in bold and usually with their source and target object types (ENT
known by FLD, for example).
Triples provide a simple, easily understood language for entering information into CA Plex. Here are some more examples
of triples that you will enter while creating your first application:
• Project has FLD Project Description
• Project Description is a FLD LongDescription
• Project described by DGM Project Diagram
In this sample application, triples are entered to define fields for the Project entity: an identifier, a description, and start and
end dates for a project.
You use the Model Editor to view, add, edit, and delete triples. The Model Editor appears as follows:

269
CA Plex 7.2.1

Continuation Triples
We now introduce an extension to the triple syntax -- the continuation triple. A continuation triple is like other triples except
that the source object is a triple.
You can enter the following continuation triples to specify that certain fields are optional:
Project has Project Description
...optionality Optional
Project has Project Start Date
...optionality Optional
Project has Project End Date
...optionality Optional
You can enter other continuation triples later. For more information, see Use Continuation Triples to Make Fields Optional.

Patterns and Inheritance


Inheritance is the primary means of reuse when you design an application with CA Plex. Inheriting from pre-built and pre-
tested pattern libraries provides tremendous productivity and quality benefits.
Patterns are groups of CA Plex objects that are designed to be reused and customized. In this tutorial, you inherit from the
included pattern libraries. Additional pattern libraries are available from third-party vendors.

Patterns Versus Templates


The templates or frameworks supplied by other tools provide some of the benefits of patterns. Typically, a template
provides a means of copying a predefined solution.
NOTE
Inheritance is not the same as copying.

270
CA Plex 7.2.1

When an object inherits from an CA Plex pattern, the relationship is dynamic -- changing a pattern automatically changes
all the objects that inherit from the pattern.
Also note that patterns are created with CA Plex rather than being hard-coded into the tool. You can customize a Pattern
Library by creating your own patterns that inherit from the supplied patterns. Or you can create your own patterns from
scratch.

Patterns Versus Components


Patterns and components (such as COM and EJB components) are complementary technologies. CA Plex patterns can
be used to combine and implement groups of components. Components are usually likened to the building blocks of a
house. Extending this metaphor, you can think of patterns as the blueprint or plan for the house.
Like patterns, components are intended to maximize software reuse. Components are black-boxes, whereas patterns can
be regarded as gray-boxes whose internal structure can be modified in certain places. Another distinction is that patterns
are purely a design construct whereas components form a part of the running application.

Scoped Objects
A scoped object is an object that belongs to another object. A scoped object cannot exist independently of the object by
which it is scoped. For example, a panel that is scoped by a function is deleted when that function is deleted.
Some types of objects are unscoped. This means that they exist independently of all other objects in the model, for
example, entities are typically unscoped. Conversely, a table is always scoped to an entity. To create a table object,
specify the entity to which it belongs.
When you refer to a scoped object, you usually need to use its full name to avoid ambiguities. For example, there is an
entity, Project that scopes a function, Edit. The function’s full name is Project.Edit, which distinguishes it from other Edit
functions such as Employee.Edit that also exist in this model.
Scoped objects are created when you inherit from a pattern. You can also create scoped objects manually.

The Panel Designer


The Panel Designer is capable to change the panel displayed by Project.Edit. You can change the size of the Project
Description field and give it a multiline edit control (so that you can enter multiple lines of text). It also supports more
space for description field. You can also add some spin controls to the date fields.
The Panel Designer contains the following windows:
You can open the Panel Designer by following the steps discussed in Display the Model Editor and Panel Designer.

Design Window
The Design Window is the main window in the Panel Designer and shows your panel. When you change a panel’s
properties, you see how the changes affect what the panel looks like here. You can select, move, resize, fields, and other
users interface elements using this window. When you make visual changes to the panel and its elements using the other
windows, the changes appear here.
The elements of a panel are grouped into regions (each region has a name). The following graphic shows the grid and
detail regions in the panel displayed by Project.Edit:

271
CA Plex 7.2.1

Panel Palette
You can open the Panel Palette by selecting Panel Palette from the Windows menu. The Panel Palette
shows all the elements of the panel, including fields, labels, and buttons which are grouped under folders
( )
and regions
( ).
You can expand the folders and regions to see what they contain. Most of the visible elements are contained in regions.
You can see the five regions of the panel (GridP, DetailP, GridButtonP, DetailButtonP, and Panel) in the Panel Palette.

When a region is expanded, as the DetailP region is in this example, you can see the elements contained in that region. In
the case of the DetailP region, this includes the Project ID, Project Description, Project Start Date, and Project End Date
fields.
When represented on panels, fields typically contain more than one part, usually including at least one label and a control.
Notice on the previous graphic that the Project ID field shows a Left Label and an Edit control. The label indicates whether
it is a Left Label, a Top Label, or a Right Label. The type of label indicates if it appears to the left or right of the control (left/
right label), or as a column heading (top label). The control is the part that the end users interact with. The settings for the
control indicate if it is displayed as an edit box, a list box, a combo box, and so on.

Property Sheet
Every element on a panel has a set of properties associated with it, such as its size, color, or position. The Property Sheet
shows you the properties of the currently selected element. If no element is selected, the Property Sheet shows you the
properties of the panel as a whole.
To see what you can change about an element, select the element in the Design Window or the Panel Palette and check
its properties on the Property Sheet. The properties displayed depend on the type of element selected.

For example, you can specify if a button should be included in the tab sequence by setting its Tab Stop property. However,
a field label would never be included in a tab sequence, so if you select a label the Property Sheet does not display this
property.
Single Line Edit control has input limitation of up to 256 characters for Winwidgets and
applicable for both Grid and Single instance region.
Recommendations/workarounds to select one of the following option:
• Use MFC native control instead of WinWidgets, by setting application INI file with 'SingleLineEdit=1' under
'[NativeControls]' section.
• Enable the required field's design time property - "Multiline" to "Yes".
• Add required field's 'C Format SYS' triple to 'Varying'.
Note that, option 2 & 3, requires re-gen/re-build for affected objects.

Entity Relationships
Relationships between entities can be of the following types:
Owned by Relationships
In your application, a task is part of a project. Therefore, if you delete a project, you want all of its tasks to be deleted.
Hence, you define Project as the owner of Task; so that each task is directly related to the project it is part of. This is
known as an owned by relationship, which is sometimes referred to as a parent-child relationship.
Refers to Relationships

272
CA Plex 7.2.1

When you define a task for a project, you must specify an employee who is responsible for completing the task. As an
employee can be assigned to more than one task, in more than one project, you do not want to delete the employee
record if you delete a task. So, you define a refers to relationship between the Task and Employee entities.
A refers to relationship indicates that an instance of one entity stores the key value of one or more instances of another
entity. In the application you are building, this is represented by assigning employees to tasks; the task stores the primary
key value of the employee. An employee can be assigned to more than one task, even to more than one task in more than
one project, but a task can have only one employee assigned to it.
A refers to relationship differs from an owned by relationship in that you do not want employee records to be deleted
when a task is deleted, as an employee can be assigned to other tasks. However, a task should be deleted when its
owning project is deleted, as a task is merely a subset of a project.
More Information
• Add Prompt Processing

Add Prompt Processing


You can add prompt processing by creating an inheritance triple, Employee is a OBASE/Referenced entity. This
functionality enables end users to display a list of employees by pressing F4 while the cursor is in the Employee ID
field on the panel that displays tasks. The list is displayed in a separate panel (the following example shows the panel
populated with data you enter at the end of this section):

End users can select an employee from the list, which puts the corresponding ID in the Employee ID field on the Task
panel. This keeps your end users from having to memorize potentially cryptic Employee ID values (such as Emp03),
instead letting them pick by name, email address, or some other criterion.
You will be able to use this new functionality at the end of the next section.

Entity-Relationship Diagrams
The model contains three entities: Project, Task, and Employee. A project consists of a group of tasks, and each task has
one employee assigned to it.
Here is an entity-relationship diagram of the application. You will draw a diagram like this as you work on the tutorials.

273
CA Plex 7.2.1

If you have worked with entity-relationship diagrams before, you can observe the following:
• A project can have more than one task, but a task can only belong to one project.
• A task is owned by a project, which means that if you delete a project, you want all of its tasks deleted too.
• Employees are assigned to tasks -- one employee can be assigned to more than one task, but each task can only
have one employee assigned to it.
• An employee is not dependent on any particular task, which means that if you delete a task, you do not necessarily
want to delete the employee record too.
You can see all of this without having to look at any code. This diagram shows useful information, which CA Plex uses to
generate the application.
For the purpose of this sample application, this model is very basic. If you have developed real project management
systems before, you may find parts of the model that you would design differently.

Code Library
A code library is a bundle of one or more packages of Java or C# functions that are bundled together for deployment, Plex
implements code libraries as either JAR files or .NET assemblies dependent on the language defined in the model.
You can use triples in the model editor to define the properties of the code library:
• CDL comprises PKG defines the packages that will be bundled into the code library. One package may belong to
multiple code libraries.
• Additional triples define information that will be included in the manifest of the code library. This includes version
numbers, any copyright, and trademark information.
Having specified the definition of the code library, you can use the Code Library Wizard in the Tools menu to build the
corresponding JAR files or .NET assembly DLLs.
NOTE
The modeling and building of code libraries can be carried out independently of the development of the
individual functions contained within it.
Large Property: None
Scope: Unscoped or scoped.
Scoped code libraries are used to represent .NET modules which are assemblies contained within the scoping assembly.

274
CA Plex 7.2.1

Inheritance
Inheritance enables an object to include the properties of another more generalized object. You specify inheritance for an
object using the is a verb. For example, FLD is a FLD means that the source field inherits all of the properties and scoped
objects of the target field.
Another way to assign the data type of character and the length 25 to the Employee Name field is to enter the following
triple:
Employee Name is a OBASE/Narrative
OBASE/Narrative is a field that displays 25 characters or settings, which are inherited by Employee Name by way of this
triple. So, rather than specifying all the settings for a field, you can choose a field that already exists, and which reflects
what you want your object to look like (or acts like you want it to act), to inherit from. Using inheritance saves time.
For example, you could create the following two entities, if you needed to create two types of Project entities in a project
management application. One would represent projects that were billed by the hour; the other would represent projects
that were bid by job.

Creating two types of Project entries would require a lot of duplicated effort. The identifier, description, and start and end
dates are the same for both entities. Why should you create all of the functionality for these identical fields twice?
Using inheritance enables you to create a single Project entity with all of the common structure and functionality, and
create two specialized entities that inherit from that one. Then, you can customize each type of project from there.
The following graphic shows the entities Project Billed By Hour and Project Bid By Job as they would appear after they
have inherited from Project.
Note: The inherited attributes have dashed borders.

CA Plex Features
This article discusses the following CA Plex Features:

275
CA Plex 7.2.1

• Native Platform Implementation


• Default Panel Layouts
• Visual Development
• Dynamic Diagrams
• Automatic Selector Functions
• Action Diagrammer
• More About Variables and Fields
• Global Data Storage and the SharedData Variable
• Pre, Edit, and Post Points
• Function to Show Projects and Tasks
• Plex Java runtime properties

Native Platform Implementation


CA Plex provides a complete environment for generating and compiling across all supported platforms. For Windows
implementations, you can see how it seamlessly integrates with Microsoft Visual Studio.
CA Plex generates native C++ that is based on Microsoft Foundation Classes (MFC), a robust, industry standard C++
class library. Each function in the model is implemented as a Windows DLL.
If we chose to implement our application in Java, CA Plex would generate 100% pure Java code based on Sun’s Java
2 platform. Similarly, we could also implement the application on the IBM System i by generating native RPG and DDS
code.

Default Panel Layouts


Based on the design details you entered earlier, CA Plex automatically adds the correct fields to the panel and provides a
default layout. You may adjust the default layout anytime.
The general appearance and functionality of the panel, with the grid on the left and the fields on the right, is determined by
the Pattern Library from which it is inherited. You can override almost any aspect of this appearance and behavior.

Visual Development
You have seen that, unlike visual development tools, the starting point for a CA Plex application design is a design model,
not screen layouts. This is because design and modeling are the keys to building large-scale applications successfully.
However, just like a visual programming tool, CA Plex provides an easy-to-use editor for designing graphical user
interfaces (GUIs). It includes a rich set of native GUI controls plus the ability to use third-party components (ActiveX
controls in Windows C++ and JavaBeans in Java). There is another mode of editor that enables the character-based
screens of a System i 5250 application to be designed in the same way.

Dynamic Diagrams
You have seen how CA Plex lets you create diagrams showing the objects in the model. These are not just pictures
-- when you created the link between Task and Employee, you did not simply add a line to a picture, you defined a
relationship that was recorded as a triple in the model.
The diagram is automatically synchronized with the model. For example, if you deleted the Task refers to Employee triple
in the Model Editor, the corresponding link would automatically be removed from the diagram.

276
CA Plex 7.2.1

Automatic Selector Functions


You have seen that when entering Task records you can double-click to display a list of possible values for the Employee
ID field. This functionality is provided automatically by the CA Plex Pattern Libraries on every panel where you need to
select an Employee ID. You do not need to add a single line of code to make it happen.
This is an excellent example of the power that comes from combining model-based development, patterns and code
generation. Because the model records the relationship between Task and Employee (Task refers to Employee), CA Plex
is able to automatically generate the implied referential integrity and selection processing based on definitions inherited
from patterns.

Action Diagrammer
Use the Action Diagrammer to create, edit, and display functions. The editor consists of three parts:

Action Diagram Window


The Action Diagram window displays function logic. The following example shows a portion of what the action diagram for
the Project.Add Project function appears when you have completed the scenario, How to :

Action Diagram Palette


Use the Action Diagram Palette toolbar button
to
hide or show the Action Diagram Palette.
The Action Diagram Palette displays the instructions you use to create function logic. It is organized in folders containing
statements that are grouped based on the types of actions they perform. You can enter new instructions by typing them in
the input line or dragging them to the input line from the Action Diagram Palette.

277
CA Plex 7.2.1

Variable Palette
The Variable Palette toolbar button
is
used to hide or show the Variable Palette. The Variable Palette lets you view and edit the variables available to a function.
Variables in CA Plex are different from variables in other programming languages. A variable in CA Plex is a container
for one or more fields. A field must be added to a variable before you can reference it in action diagram code. This is
equivalent to declaring variables or fields in many programming languages.
The Variable Palette displays variables in folders, known as variable groups. Each group contains one or more variables.
Note that the icon for a variable looks like three field objects on top of each other.

More About Variables and Fields


A variable is a list of fields. Each function has its own set of variables that are used to:
• Pass values between the function and panels, reports, views and other functions
• Temporarily store interim values during processing
When you perform operations on fields in an action diagram you always specify the variable to which the field belongs.
The same field can (and typically does) appear in more than one variable. Consider the statement you just entered. The

278
CA Plex 7.2.1

Project ID field appears in both the InsertP and SharedData variables. Each instance of the field can store a different
value.
To specify the variable to which a field belongs you use the syntax:
variable <field>
For example, this refers to the instance of Project ID in the InsertP variable:
InsertP<Project ID>

Global Data Storage and the SharedData Variable


As a general rule, the values stored in action diagram fields are local to the function concerned. Updating the value of a
field in one function does not change the value in another function, unless the field concerned is explicitly passed as an
input or output parameter on a function call.
Graphical user interfaces such as Windows enable multiple functions to run asynchronously. In such situations, it is
useful to share data across multiple functions. Our Project Wizard is a case in point, where we need the Project ID to be
available to both parts of the wizard.
This type of global data storage is provided by the SharedData variable. The Pattern Library provides additional
processing (in the Get SharedData Values and Set SharedData Values subroutines) that maintains the values of the fields
concerned in an area of memory that is available to all the functions in a single Windows client application.

Pre, Edit, and Post Points


In this section, you modified the behavior of inherited action diagrams by entering code into its Pre, Edit, or Post Points.
These three types of construct are known collectively in the CA Plex documentation as edit/collection points. Edit/
collection points are placed in Pattern Library action diagrams at strategic points where the developer of the pattern
expects that you will need to make modifications. In team-based development, this approach gives pattern developers
control over how their patterns are used. Conversely, it guides developers who use a pattern to the best places to make
modifications.

Edit/Collection Points
Edit/collection points always appear as a group of three constructs; an Edit Point with a Pre and Post Point before and
after.
Always enter your code into either a Pre Point or a Post Point. Edit Points are provided for backwards compatibility with
earlier versions of CA Plex and should be avoided (see the online help for a full explanation).

Always use a Post Point to enter changes unless you have a particular reason to use the corresponding Pre Point. In
Updating the shared data we told you to use the Pre Point. This was because there was code in the Post Point that
needed to be executed after the code we added.

Choose a Pre or Post Point


In scenarios, you can specify exactly which Pre or Post Point to use easily. In practice, it takes a little time to become
familiar with the flow of each Pattern Library function. After you learn the action diagram syntax, you can examine the

279
CA Plex 7.2.1

inherited code to understand how it works. The shipped CA Plex Pattern Libraries are also supplied with extensive online
help that includes function flow diagrams for many of the major functions.
Note: To get help for a Pattern Library object, select it on the Object Browser and press SHIFT+F1.

Function to Show Projects and Tasks


You can create a new function that shows both project and task data. The panel scoped to the function has a grid on the
top that displays projects, and a section at the bottom that displays tasks. When end users select a project at the top, only
those tasks that belong to that project are displayed in the bottom. This function comprises the second tab of the property
sheet. When you have added the function to the property sheet, the property sheet looks like this:

Plex Java runtime properties


Plex Java run-time properties file contains the environment settings. CA Plex Java run time uses these settings to
determine how Java client/server applications and applets should look and function. Following are the additional Java run-
time properties targeted for database processing.

Environment.Default.SqlMaxRows
With this option specified to some numeric value, Plex Java run time calls Statement setMaxRows method to set max
rows to retrieve.
Statement setMaxRows sets the limit for the maximum number of rows that any ResultSet object generated by this
Statement object can contain to the given number. If the limit is exceeded, the excess rows are silently dropped.
For example, To limit maximum retrieved rows as 15, set the property file as: Environment.Default.SqlMaxRows=15
Environment.Default.SqlQueryTimeout

280
CA Plex 7.2.1

With this option specified to some numeric value, Plex Java run time calls Statement setQueryTimeout method to set
query timeout value. The specified value is in seconds. Statement setQueryTimeout method sets the number of seconds
the driver waits for a Statement object to execute to the given number of seconds.
For example, To set query timeout to 30 seconds, set the property file
as: Environment.Default.SqlQueryTimeout=30
NOTE
: Plex Java run time picks the previously mentioned property values and updates the JDBC Statement object
accordingly. Limited verification has been carried out with these mentioned run-time properties options.

System i Components
This section discusses a set of CA Plex for System i client/server and CA Plex for System i 5250 components:
More Information
• Introduce the Action Diagrammer
• Basic Concepts
• Owned By Relationships
• Owned By Relationships and OBASE/Child
• System i Product Libraries
• The Tutorial Reference Model

Introduce the Action Diagrammer


CA Plex functions are objects that perform the activities, processes, and procedures that constitute the functionality of an
application. Functions can:
• Display panels and control how end users interact with the user interface
• Create, read, update, and delete records in the database
• Perform calculations
Associated with each function is an action diagram, which contains the code that specifies what the function does. The
Action Diagrammer is used to edit a function’s action diagram. This editor consists of three windows:
• Action Diagram window, where you enter instructions
• Action Diagram Palette, where you select Action Diagram syntax
• Variable Palette, which displays the variables for the function and their contents
After defining an event and specifying the condition that triggers that event (entering the value 5 in the grid selector field),
you can define the processing that occurs in response. To do this, modify the Project.Grid Maintenance Suite.Edit Grid
User Interface function. In CA Plex, the editor you use to edit a function is called the Action Diagrammer.

Basic Concepts
Instructions on using the Action Diagrammer to its full potential are beyond the scope of this tutorial, but understanding the
following concepts will be helpful when using this editor.

Functions
Functions are objects you create to perform the activities, processes, and procedures that constitute the functionality of an
application. Functions can:

281
CA Plex 7.2.1

• Display panels and control how end users interact with the user interface
• Create, read, update, and delete records in the database
• Perform calculations
• Interface with external procedures and programs

Constructs
Constructs are the vertical brackets that enclose instructions or other constructs. They correspond roughly to the levels of
indentation that you typically use with third generation languages, such as C++. You can create complex structures with
constructs. The following diagram shows you two constructs, one embedded in another.

Statements
Statements occupy one or more lines of the action diagram and cause an action or set of actions to occur. For example,
the Call statement calls a function from another function.

Collection and Edit Points


When you modify or add to inherited functions, you can only make changes and additions in certain places, called
collection and edit points. These are places that the ancestor function indicated are appropriate for new instructions.

Events Handlers
Each function that has a panel scoped to it has an Events Handler. This is a type of switchboard that processes all of the
events a function recognizes. It calls various subroutines in response to the events that are triggered (such as the Modify
Tasks event). Later, you will add processing to support the Modify Tasks event to the Events Handler in the Project.Grid
Maintenance Suite.Edit Grid User Interface action diagram.

Owned By Relationships
Remember, the Task entity in the diagram you created in How to Define Entity Relationships Using Diagrammer had two
foreign keys, Employee ID and Project ID:

You can tell by the shading that Project ID is part of the key for Task (with Task ID). This field was added to the Task entity
when you created the triple Task owned by Project. It was added because it is the key of the owning entity.

282
CA Plex 7.2.1

The addition of the parent key field means that when creating or accessing a task, the owning project must be specified.
How does this affect your application? Well, it means that you must provide a way for end users to specify the owning
project when creating or accessing a task. To this end, you will design your application so that end users can only create
and access instances of the child entity (Task) after selecting an instance of the parent entity (Project).
In your application, you will add a key code to the Edit Project panel. Remember, you already added the static text for that
key code. For more information, see Add Static Text in the section Modify the User Interface.
You will add functionality so that when end users open the Edit Project panel and enter the key code to work with tasks for
a project, the Edit Task panel appears. When the end users add tasks, the Project ID field is automatically populated with
the ID of the project selected in the Edit Project panel:

Owned By Relationships and OBASE/Child


You already added the triple shown next using the Diagrammer. For more information, see Define an Owned By
Relationship in Define Relationships Between Entities . You also added the following triple.
• Task owned by Project
This specified a relationship between these two entities. That is, that Project owns Task.
• Task is a OBASE/Child
This gave the Task entity functionality to ensure that when a project is deleted, all of its child tasks are deleted, too. But
you may wonder why, if you already added this triple, you also used the Template Editor to create the following triples:
Task replaces Owner
...by Project
You had already specified the owner in the Task owned by Project triple. Why did you seemingly have to specify the
owner a second time?
The answer is that you did different things to the model each time you specified the owner. Adding the triple Task owned
by Project gave Task an additional key field -- Key of Project. That is all that happened when you added that triple. The
owned by triple did not add any functionality to Task.
Task is a OBASE/Child gave Task functionality. Specifically, when you inherit from OBASE/Child, you get the ability to:
• Read only the task records for a specific project (known as restrictor processing).
• Delete all of the tasks for a project when you delete the project.

283
CA Plex 7.2.1

However, the functionality that you inherit is abstract. That is, it does not know what is in your model. The pattern
entity, OBASE/Child, uses an abstract entity, called Parent, to represent the owner. For the pattern to work correctly in
your model, you have to replace this placeholder with the entity you want to be the owner. That is why you create the
replacement triple.

System i Product Libraries


The following CA Plex for System i client/server and CA Plex for System i 5250 product libraries are on the CA Plex
Product CD as binary files:
• PLEX700 library containing the remote configuration and run-time objects
• YTUTORIAL (CA Plex Tutorial library)
• YTUTREFER (CA Plex Reference Tutorial library)
• APPINTOBJ (CA Plex Application Integrator library)

The Tutorial Reference Model


In this tutorial, you created a model for an application that tracks:
• Projects
• Tasks
• Employees
You started with an empty model with no local objects in it. In addition to that empty model, CA Plex comes with a
completed version of the tutorial model, known as the tutorial reference model.
If you want to see what the completed model looks like, you can review the tutorial reference model at any time. This
model contains all of the information that you add as you go through the tutorial, plus comments in the functions’ action
diagrams.

Use Tutorial Reference Model


The tutorial reference model, tutrefer.mdl, is located in the Plex tutrefer subdirectory. The file started as the tutorial.mdl
file, and has all of the information in it that you add when doing the tutorial.
The model uses its own data source, and that data source has a corresponding database. So, you can work with the
tutorial reference model without conflicting with the tutorial model, or its data.
Because it is separate from the tutorial model, you can also use the reference tutorial model to experiment with. As you
read about functionality in the online help, you can use the tutorial reference model to try out CA Plex features. Before
experimenting with this model, make a backup copy of it, so that you can revert to the shipped version.

What Does It Contain?


The tutorial reference model represents the model that you create when you do the tutorial. It has three entities: Project,
Task, and Employee.
The three entities have relationships with each other. The Project entity owns the Task entity; when you delete a project,
all of its tasks are deleted as well. The Task entity refers to Employee. This enables you to assign employees to tasks, but
when tasks are deleted, the employees are not deleted.
The following shows the entity-relations diagram you created in the tutorial:

284
CA Plex 7.2.1

Here is a description of the three entities:

Entity Description Inherits From


Project Stores information about projects in the FOUNDATION/EditDetail
Project ID, Project Description, Project Start STORAGE/RelationalTable
Date, and Project End Date fieldsYou
define this entity in Defining the Project
Entity as
discussed in "Your First CA Plex Application
in 20 Minutes."
Task Stores information about tasks for FOUNDATION/EditDetail
projectsThis entity is owned by the Project STORAGE/RelationalTable
entity, so FOUNDATION/OwnedCascade
it stores the owning project’s key field, and
data in the Task ID and Task Description
fields. It refers to Employee, so it also
stores the Employee’s key field. You define
this entity as discussed in Define the Task
Entity.
Employee Stores information about employees in the FOUNDATION/EditDetail
Employee ID, Employee Name, Employee FOUNDATION/ReferredTo
Hire Status, and Employee Email Address STORAGE/RelationalTable
fields. You define this entity as discussed
in Define the Task Entity.

The three entities store information in ten fields:

Field Description Inherits From


Project ID The key field for projects. FIELDS/Identifier

285
CA Plex 7.2.1

Project Description Stores free-text information about a FIELDS/LongDescription


projectThis field is set as optional.
Project Start Date Stores the start date and end date for DATE/CheckedDateISO
Project End Date a project.These fields are both set as
optional.
Task ID The key field for tasks. FIELDS/Identifier
Task Description Stores free-text information about a task. FIELDS/ShortDescription
Employee ID The key field for employees. FIELDS/Identifier
Employee Name Stores the name of the employee. FIELDS/ShortDescription
Employee Hire Status Stores the hire status of the employee: full- FIELDS/Status
time, part-time, or contract.
Employee Email Address Stores the email address of the employee. FIELDS/ShortDescription

The model has three unscoped functions:

Function Description Inherits From


Project Wizard Enables end users to create projects and UISTYLE/FrameWizard
tasks for those projects.
Project Property Sheet Enables end users to maintain projects and UISTYLE/FrameProperty
tasks entered with theProject Wizard, to
add
new tasks, and to add and update
employees.
Project Manager Displays three buttons to open the Project UIBASIC/UIBasicShell
Wizard and the ProjectProperty Sheet.

What Does It Look Like?


End users add projects and tasks using a wizard, and maintain them using a property sheet. They can add new tasks in
the property sheet, but can only add new projects using the wizard. They add and maintain employees using the property
sheet.
Wizards were defined in How to Create a Wizard to Add a Project.

286
CA Plex 7.2.1

Property sheets were defined in How to Create a Property Sheet.

287
CA Plex 7.2.1

End users add new tasks and maintain existing tasks in the property sheet, and add tasks in the second part of the
wizard:

288
CA Plex 7.2.1

End users add and maintain employees with the property sheet:

289
CA Plex 7.2.1

290
CA Plex 7.2.1

Frequently Asked Questions


This section contains some frequently asked questions and their answers:
• FAQ on CA Licensing (ALP)
• FAQ on Tutorials and CA Plex Components
FAQ on CA Licensing (ALP)
This section lists the following FAQs:

Q: What is ALP?
A: ALP is the Automated License Program, the newest phase of CA licensing and order fulfillment. Rather than requiring
clients to use a client-side application to identify hardware eligible to run CA software and request/create the appropriate
license file, ALP products are shipped with a printed certificate representing their license file (based on the product and
hardware information recorded in our license database), and are also given the opportunity to get their license keys
electronically using our support website.

Q: How can I get my ALP license keys online?


A: You can get ALP keys from http://www.ca.com/support. To log on to the secure area of the website, you need a valid
user ID and password.
Use the following procedure to get ALP keys.
Follow these steps:
1. Log on to supportconnect using your user ID and password.
2. Click the Licensing link under Downloads on the left pane.
The CA Licensing page appears.
3. Click the ALP keys link under What’s New to view your ALP keys.
The ALP Keys page appears.
NOTE
You can also install your ALP keys directly to your local machine by clicking the Install button.

Q: Why does CA licensing sometimes install into the Program Files folder and not C:\CA_LIC as it always has?
A: The latest CA licensing installation conforms to the CA installation standard by installing in the C:\Program Files\CA
\SharedComponents\CA_LIC folder if no previous C:\CA_LIC licensing folder is found on a machine. If, however, a C:
\CA_LIC folder is found on the machine, the new licensing will continue installing into that folder. Licensing packages that
follow the installation standard are versions 1.52 and higher.
The following issue may occur when downgrading licensing:
If a 1.52 or higher version of licensing is installed on a machine with no previous licensing installed on it, then an earlier
version of licensing is installed (downgrade of licensing), the earlier version automatically installs into the C:\CA_LIC
folder, which creates two CA_LIC folders (C:\CA_LIC and C:\Program Files\CA\SharedComponents\CA_LIC). To fix the
problem, install the latest posted version of licensing from the Total License Care (TLC) support site. This merges the
two folders into C:\Program Files\CA\SharedComponents\CA_LIC. Over time, C:\Program Files\CA\SharedComponents
\CA_LIC becomes the folder where licensing is managed.

Q: How do I use the mergeolf utility?


A: Syntax: MERGEOLF -n <new_olf> -c <current_olf> -o <output_olf> -b <backup_olf> -d

291
CA Plex 7.2.1

Where:
-n: Is the name of the new OLF file to merge
-c: Is the name of the current OLF file to merge
Default: ca.olf
-o: Is the name of the new OLF file to create
Default: ca.olf
-b: Is the name of the backup of the current OLF file
Default: ca.bak
-d: Enables debugging (mergeolf.log)
Example:
MERGEOLF -n ca.no1 -c c:\ca_lic\ca.olf -o c:\ca_lic\ca.olf -b c:\ca_lic\ca.old

Q: What is the correct format of an ALP key?


A: Following is an example of an ALP Execution Key:
ID_1 3991FFEF "Customer Name" Technical Contact Name (As recorded in our database)
ID_2 E4A19DB8 "Company Name" Company Name
ID_3 C2F2E617 "00000000" CA Site ID Number
ID_4 9550AD9 "[email protected]" Technical Contact Email (As recorded in our database)
SERVER CAI 7152
DAEMON CAI_lic_d/usr/bin
FEATURE 0 CAI_lic_d 1.000 20-APR-2000 0 0CA4D081978DD1BD5C76 "(MODEL) (COMPONENT)" ANY # 0000000-000

The actual encrypted Execution Key is line 7, which is referred to as the FEATURE line, the ID and Server and Daemon
lines are header lines that should only appear once in the file, at the beginning. Additional instances of these lines can
invalidate your license file.
If you are having problems with your ALP key, verify that the following:
• There are no carriage returns interrupting the FEATURE lines in the ca.olf file.
• There are no blank lines in between the FEATURE lines in the ca.olf file.
• The ID lines of the newly generated ALP Execution Key replace any pre-existing ID lines in the olf.ca file.
• The name of the OLF is ca.olf and does not have an extra extension in the name; for example, ca.olf.txt or ca.olf.olf
(This is most common on Windows systems when hide known file extensions is enabled in the Explorer).

Q: When I download certain CA data files and utilities from the support site, they come with an extension of .caz.
What is a .caz file?
A: Files downloaded with a .caz extension are compressed with CAZIPXP, available at http://supportconnectw.ca.com/
public/ca_common_docs/ca_utility_supp.asp. To uncompress the file, use the command: cazipxp.exe -u <filename.caz>,
which extracts the compressed files to the local directory.

Q: I have installed my ALP license key and I am receiving the following error:
- CA Licensing -- The license found is inadequate for the Hardware Unit rating of this machine. You might
have upgraded the machine and if so, please rerun the appropriate license program to properly license your
product

A: Typically, this is due to an invalid or corrupt lic98.cap file: open the lic98.cap file with a text editor, the file should be
comprised of a listing of detected model types in the format of:
SYS (detectedmodel) (tier) (checksum)

292
CA Plex 7.2.1

• If the file is improperly formatted, you can copy the lic98.cap from your installation source or download the latest data
files at our support website
• If the lic98.cap file does not exist, you may not have a current ALP license run-time installed. Contact TLC for
assistance
• If the lic98.cap exists and appears to be valid, contact TLC for assistance.

FAQ on Tutorials and CA Plex Components


This section lists the following FAQs:

Q: When should I back up my group model?


A: You should perform regular backups of your group models on a daily basis. A group model is the central design
repository. It is extremely important. If you accidentally destroy a local model, all the work you have done since the last
extract from the group model is lost. If the group model is accidentally destroyed, all the work for that group model is lost.
It may be possible to recover all or some of the data from a local model (using the XML Import/Export feature) but this is
not guaranteed in all cases. For more information, see Backups in the online help.

Q: How often should I update?


A: We recommend that you update your changes to the group model at least once a week, but preferably more often.
Frequent updating in a workgroup environment makes your changes available to other developers. More importantly,
after changes are updated to the group model, they become part of the central repository and are more secure. Note that
extended periods between updates affect the time it takes to do an update; the more work that CA Plex has to do to get
through the differences between your local model and the group model, the longer it takes.
WARNING
Do not wait several weeks between updates.

Q: Why does my function, field, table, or view have two implementation names?
A: You and someone else updated the group model after having generated and built functions and panels or tables or
views. Your implementation and file name triples and objects -- and those of the other person -- were added to the group
model without one set replacing the other. If this happens, you must delete the duplicate names.
Note that a group model conflict occurred when the second person tried to update the group model. You can choose not
to update at this point. To avoid such conflicts in advance, ensure you frequently update changes, especially after making
changes that impact other developers in your workgroup. For more information, see Avoiding and Resolving Conflicts in
the online help.

Q: I tried to generate an object but I got an error stating that I must specify an implementation language. What
went wrong?
A: If you inherited the object from a pattern library (such as OBASE) make sure that the configuration of your local model
is correct. To do this, choose Configuration from the File menu and, in the Model/Library box, select each model in turn.
For each one, make sure that the Variant option is not set to Base. Instead, select the appropriate variant for your current
work.

Q: What is the difference between levels and versions in group models?


A: A version is a collection of levels in a specified sequence. Assigning work to various levels means that you can keep
track of general fixes and customer specific fixes simultaneously. For example, in the application FunkyApp, after Release
1.0 two fixes were made for customer A and customer B, followed by a general release of fixes at Release 1.1. This

293
CA Plex 7.2.1

resulted in four levels: Release 1.0, Customer A fixes, Customer B fixes, and Release 1.1. The following table shows the
version and level combinations possible. For more information, see Working with Versions and Levels in the online help.

Version Levels Include Description


Release 1.0 Release 1.0 The first generic release of FunkyApp 1.0
for all customers
Customer A 1.0 Release 1.0 Customer A fixes A FunkyApp 1.0 release specific for
customer A
Customer B 1.0 Release 1.0 Customer B fixes A FunkyApp 1.0 release specific for
customer B
Release 1.1 Release 1.0 Generic FunkyApp 1.1 release for all
Release 1.1 customers except A and B
Customer A 1.1 Release 1.0 A FunkyApp 1.1 release specific for
Customer A fixes customer A
Release 1.1
Customer B 1.1 Release 1.0 A FunkyApp 1.1, release specific for
Customer B fixes customer B
Release 1.1

Q: I cannot use constants or literal values in action diagrams. Why?


A: It might be faster if you could enter literals anywhere in the code, as you can in most programming languages, so why
does CA Plex not permit this? The reason is maintainability. Too many programs in too many languages have literals that
are coded into the programs with no explanation as to the significance of the letter or numeric value. As an enterprise
development tool, CA Plex was designed to enable applications to be easily maintained by someone other than the
original developer. Hence, you are forced to label all literals all the time to make your programs easier to understand.

Q: What are all these +++ meta-operations in library functions?


A: Meta code is used in pattern libraries to interrogate the triples in the model and provide the expected functionality. For
example, a field with a triple MyField default MyDefault does not provide any default values without supporting meta code
in the action diagram to set that default value. To learn more about meta code, Meta-operations, click the Locate button
to see related topics in the Contents tab in the online help. Work on customizing supplied library code by copying and
altering the code of others.

Q: When should I abstract my code into a pattern?


A: Sometimes a pattern is obvious, but the extra effort to make a great, inheritable, customizable pattern is not worth the
effort because you may only implement it twice. On the other hand, something that obviously should be a pattern may
be difficult to abstract. Often, the answer is that after you implement it once -- certainly when learning about abstracting
something for the first time -- it is then clearer and simpler to work out whether you should abstract it and how you can
turn it into a pattern. To know when to abstract becomes easier with experience.

Q: I cannot see my field names in the action diagram debugger. Why?


A: In the C++ build options, select the Force Build Of Selected Objects; then rebuild your functions. If this does not work,
delete the entire Obj subdirectory, and then rebuild. For more information, see Generating and Building for Action Diagram
Debug in the online help.

294
CA Plex 7.2.1

Q: How can I simplify parameter mapping?


A: An important technique is the management of field domains. Field domains control how CA Plex automatically maps
parameters. When you perform mapping manually, field domains also restrict the list of available fields, which makes it
easier to find the one you want. For more information, see Field Domains in the online help.
Another technique is to use default mapping in the Parameter Mapping dialog. Default mapping lets the Action
Diagrammer automatically make its best guess when mapping parameters between function calls, saving you from
mapping each parameter individually. For more information, see Setting up Default Mapping in the online help.

Q: What is the difference between pre, post, and edit points? Which should I use?
A: Edit points are left over from previous versions of CA Plex. Collection points (the collective name for pre and post
points) are an improved place to put your code. The difference is that edit points overwrite each other at the different
levels down the inheritance tree (you have to be extremely careful with the nesting), whereas collection points are
cooperative and just collect code together in sequence. You can always add code to the bottom of a collection point in any
action diagram, regardless of whether it has been used before. Edit points are restricted because if they have been used,
you can no longer use the edit point further down the inheritance tree. Therefore, we recommend that you do not use edit
points.
So which should be used: post or pre points? Sometimes it is obvious. You want to put code before or after another piece
of code in the edit, pre, or post point so you know where to put it. What if it does not matter if the code goes in the pre
or post point? Then the code always goes into the post point. If someone inherits from your function and wants to add
code, if your code is in a post point they can add code before it (in the pre point) or after it (remember that you can always
add code to the end of a collection point, regardless if it has been used higher in the inheritance hierarchy). If you add
your code habitually in the pre point, people can only add code after (never before) your code if they are further down the
inheritance hierarchy. In conclusion, always use post points unless there is a reason not to. For more information, see Edit
Points and Collection Points in the online help.

Q: Which post point do I use?


A: This is perhaps the most difficult issue within CA Plex for the novice. we recommend that you do the following:
1. Make an educated guess.
2. Expand the code before and after the post point.
3. Consider whether this is the correct post point.
4. Test it and see.
5. If it does not work, try Step 3 again; then try Steps 1 to 5 again.
Knowing which post point to use is the key to writing CA Plex functions quickly. Look at other functions and determine why
the local modifications were added at the particular points that the developer chose. Remember that the class and pattern
libraries are based on the use of edit and collection points, so they can be examined for clues. Sometimes it helps to open
action diagrams from the libraries, for example examining UISTYLE/EditDetailGrid shows you how to integrate UISTYLE/
Detail and UISTYLE/Grid, and how to use UISTYLE/UIBasicShell.
Examining other pieces of code, particularly the libraries, helps to increase your total knowledge of which post point to use
and when to use it. This increases your ability as an CA Plex developer.

Q: Why do I have to keep on dragging my line to the edit box at the top of the window?
A: You do not have to do this. You can press the Insert key on the keyboard to enable inline editing. Note that for multiline
comments, you must press Ctrl+Enter to enter the line into the action diagram, but for a normal single line of code, just
press Enter when you have finished editing.

295
CA Plex 7.2.1

Q: How do I delete a field or a variable from a function?


A: You can do this in the Model Editor by deleting triples. You cannot just press the Delete key on the Variable Palette. Go
to the top line of the function or the Variable Palette (they both show the function name) and press F12. This calls a Model
Editor focused on the function. Any fields and variables that may be deleted are listed in the triples. Note that inherited
fields and variables are not listed. To delete an inherited field you must delete the triples from the function that specified
them higher in the inheritance hierarchy. You cannot delete the fields and variables of library functions. Remember to
press F5 (Refresh) to redisplay the variable palette to show that the fields and variables have been deleted.

Q: How can I document and add comments to my code?


A: Use the Comment and Seq constructs frequently. Take AllFusion of the CA Plex long object names to produce
meaningful names. Carefully consider the naming of subroutines and edit points and use block narratives where
appropriate.

Q: How can I indicate that a field is supposed to be a dual (call by reference) parameter?
A: Change the triple in the Model Editor from MyFunction input MyField to MyFunction dual MyField. You cannot do this
from the Action Diagrammer.

Q: I changed the size of a Windows panel in the Panel Designer but at run time the size did not change. Why?
A: The Save Placement property of the panel is probably set to Yes and the previous size is probably still saved in the
application .ini file. To see the change, delete the entry in the .ini file (or rebuild it using the Create Exe command) or set
Save Placement to No.

Q: My button on the panel does not do anything, even though the code is there. Why?
A: The physical event in the panel has most likely not been mapped to the CA Plex logical event. A physical panel event
is the result of somebody clicking, dragging, pressing, double-clicking, or selecting something on the panel. For example,
pressing a button or selecting a menu item or entering text are all regarded as physical events, because they occur visibly
on your computer screen.
The other events in CA Plex are logical events. Logical events only happen within CA Plex. They are not visible to you.
Instead CA Plex lets you tie a physical event (clicking) to a logical event. The action diagram, and in particular the events
handler, can respond only to logical events.
If you right-click the button (when it is selected) in the Panel Designer and choose Event Mappings, you can see the Event
Mappings dialog. Click Pressed in the list box on the left (Physical event) and check that the list box on the right (Logical
event) has the corresponding event selected in blue (for example, MyButtonPressed). If it is not selected in blue, select it
before clicking OK to close the dialog. Switch back to the action diagram -- pressing F11 switches you quickly between a
function and its panel -- and press F5 to refresh. Find the event code (an Event: Event MyButtonPressed construct in the
Events Handler construct), which should now be executed when you press the button.
If you want to check which physical events are mapped to which logical events, look in the Events folder in the Panel
Palette in the Panel Designer. If a logical event has one or more physical events assigned to it, it can be expanded and
the physical event or events are displayed.

Q: Why does the MDI parent not respond to common events triggered in the MDI children?
A: The Menu ID properties of the menu items are most likely not set. Open the MenuShell panel of MyMDI in the Panel
Designer, and expand the Menu bar folder in the Panel Palette. Find the menu items that are intended to be duplicated
across all of the children but responded to by the parent, and ensure that they have a MenuId property of a number. Do
not use the numbers 1 to 500, 54016, or 54107.

296
CA Plex 7.2.1

Q: I have Menu IDs but my MDI child panel does not trigger MDI panel events. Why?
A: All MDI child panels and the MDI parent panel inherit from the common MenuShell panel, so do not expect the child
functions to pick up the Menu ID property numbers you have set until you recompile them. When you recompile the
children, the individual panels will know the Menu ID numbers and be able to pass them to the parent. Remember to
recompile the MDI parent because it needs to know the Menu ID numbers.

Q: How do I delete a menu item?


A: Press the Delete key. There is no selection to delete a menu item from the right button pop-up context menu.

Q: I cannot see the new values I have entered for my status fields. Why?
A: If you add values to a field in the Model Editor and then go into a panel, these new values are not shown on the field.
In the Panel Designer, just select the field and choose Refresh Values from the pop-up menu. The values are refreshed to
match the triples in the Model Editor.

Q: Is there a way to see the full text of a message in the Message Log?
A: Yes, right-click the message.

Q: I cannot see the changes I have made reflected in other windows. Why?
A: Click the Refresh button (F5) to see your changes. In some cases, you may need to close both a panel and its related
action diagram (answering Yes when prompted to save changes), and reopen them to see changes.

Q: I added a triple in the Model Editor but now I cannot find it. What happened?
A: There are a number of factors that determine which particular triples get displayed in the Model Editor. Make sure that
you check each one. For more information, see Understanding the Model Editor Display in the online help. In addition note
the following:
• The Model Editor does not display inherited (implicit) triples.
• Triples that you add to an inherited object may not be visible in an unfocused Model Editor window because there is
no triple referencing the inherited object. In such cases, focus the Model Editor by dragging-and-dropping the inherited
object from the Object Browser.

Q: Why does CA Plex permit me to enter incomplete or illogical data?


A: While CA Plex enforces correct syntax, it does not enforce consistency or completeness until you generate. Thus, the
model could not contain the triple Credit limit length Customer, but it could contain both Credit limit length 6 and Credit
limit length 7. CA Plex does this for the following reasons:
• Sometimes during design, not all of the properties of an object are known. Under these circumstances, a tool that does
not let you record anything until everything is known can hurt rather than help.
• In a workgroup environment, it is sometimes required that several different values of a property be recorded
simultaneously. So, two team members may disagree on the length of the credit limit field. CA Plex enables both
lengths to be recorded and the disagreement to be resolved later.
• In a workgroup environment, it is inefficient or simply impossible to enforce rules interactively. Not all the necessary
triples may be present in your local model at a given time.

Q: There is no list of target object types available in the Model Editor. Why?
A: The target object type on the Entry Bar is not capable of input because its value is always determined by the verb that
you select.

297
CA Plex 7.2.1

Q: What are Edit/Collection Points?


A: Edit/collection points always appear as a group of three constructs; an Edit Point with a Pre and Post Point before and
after.
Always enter your code into either a Pre Point or a Post Point. Edit Points are provided for backwards compatibility with
earlier versions of CA Plex and should be avoided (see the online help for a full explanation).
Always use a Post Point to enter changes unless you have a particular reason to use the corresponding Pre Point. In
Updating the shared data we told you to use the Pre Point. This was because there was code in the Post Point that
needed to be executed after the code we added.

Q: Which Pre or Post Point Should I Use?


A: In tutorial for windows, we are making things easier for you by specifying exactly which Pre or Post Point to use. In
practice, it takes a little time to become familiar with the flow of each Pattern Library function. After you learn the action
diagram syntax, you can examine the inherited code to understand how it works. The shipped CA Plex Pattern Libraries
are also supplied with extensive online help that includes function flow diagrams for many of the major functions.
NOTE
To get help for a Pattern Library object, select it in the Object Browser and press SHIFT+F1.

Q:Why ENTER Key behaves unexpected in Dialog Window?


A:In WinC Dialog Window, having no Default Push Button or ENTER Key code defined – the default processing (MFC)
takes place. For example: Dialog Window gets closed on pressing the ENTER Key.
This functionality gets overridden by Default Push Button on panel or ENTER KeyCode defined within Plex panel.
Considering the aforementioned fact, it's recommended to have a Push Button with 'Default Button=Yes' property hosted
on a Dialog Window panel.

Q: Why WINAPI/SortGrid does not work as expected?


A: In case of duplicate or no column number assigned to Grid, the SortGrid API may not work as expected. Ensure to
have unique column numbers defined for all the Grid columns to make WINAPI/SortGrid function properly.

298
CA Plex 7.2.1

Additional Resources
Product Education | Product Resources | Product Support | Social Media and Conference

Product Education
Select a link to see a list of resources available under the following categories:
• Knowledge Base Articles

Product Resources
Select a link to view the following resources:
• Product Page

Product Support
Select a link to view support related information available for this product:
• Product Release and Support Announcements
• Compatibility Matrix

Social Media and Conference


Select a link to view the social media and conference sites for this product:
• Global User Community
• Facebook
• Conference

299
CA Plex 7.2.1

Japanese Documentation
The following documents have been translated to Japanese:
• Release Notes
• Getting Started

300
CA Plex 7.2.1

Documentation Legal Notice


This Documentation, which includes embedded help systems and electronically distributed materials, (hereinafter referred
to as the “Documentation”) is for your informational purposes only and is subject to change or withdrawal by Broadcom
at any time. This Documentation is proprietary information of Broadcom and may not be copied, transferred, reproduced,
disclosed, modified or duplicated, in whole or in part, without the prior written consent of Broadcom.
If you are a licensed user of the software product(s) addressed in the Documentation, you may print or otherwise make
available a reasonable number of copies of the Documentation for internal use by you and your employees in connection
with that software, provided that all Broadcom copyright notices and legends are affixed to each reproduced copy.
The right to print or otherwise make available copies of the Documentation is limited to the period during which the
applicable license for such software remains in full force and effect. Should the license terminate for any reason, it is your
responsibility to certify in writing to Broadcom that all copies and partial copies of the Documentation have been returned
to Broadcom or destroyed.
TO THE EXTENT PERMITTED BY APPLICABLE LAW, BROADCOM PROVIDES THIS DOCUMENTATION “AS
IS” WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT WILL
BROADCOM BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY LOSS OR DAMAGE, DIRECT OR INDIRECT,
FROM THE USE OF THIS DOCUMENTATION, INCLUDING WITHOUT LIMITATION, LOST PROFITS, LOST
INVESTMENT, BUSINESS INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF BROADCOM IS EXPRESSLY
ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
The use of any software product referenced in the Documentation is governed by the applicable license agreement and
such license agreement is not modified in any way by the terms of this notice.
The manufacturer of this Documentation is Broadcom Inc.
Provided with “Restricted Rights.” Use, duplication or disclosure by the United States Government is subject to the
restrictions set forth in FAR Sections 12.212, 52.227-14, and 52.227-19(c)(1) - (2) and DFARS Section 252.227-7014(b)
(3), as applicable, or their successors.
Copyright © 2005-2022 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its
subsidiaries. All trademarks, trade names, service marks, and logos referenced herein belong to their respective
companies.

301

You might also like