CA Plex 7 2 1 Source
CA Plex 7 2 1 Source
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
3
CA Plex 7.2.1
4
CA Plex 7.2.1
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.
6
CA Plex 7.2.1
• 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.
[Options]
8
CA Plex 7.2.1
By default this functionality is disabled, to enable update the following entry in Plex.INI file.
[Options]
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.
14
CA Plex 7.2.1
15
CA Plex 7.2.1
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
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
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. √
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
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. √
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. √
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
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. √
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. √
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
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. √
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
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.
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
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.
24
CA Plex 7.2.1
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.
25
CA Plex 7.2.1
26
CA Plex 7.2.1
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:)));
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.
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.
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
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.
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.
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.
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.
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
See the Odap.mdl sample model for examples of the required source code.
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.)
36
CA Plex 7.2.1
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.
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
38
CA Plex 7.2.1
39
CA Plex 7.2.1
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
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.
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.
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.
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.
52
CA Plex 7.2.1
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
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.
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.
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
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
.
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.
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.
59
CA Plex 7.2.1
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:
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).
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
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
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.
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:
64
CA Plex 7.2.1
Platform-Specific Requirements:
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.
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
68
CA Plex 7.2.1
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"
• On 64 bit Windows:
d:\Plexsetup\setup /s /f1".\setup64UnInstall.iss"
70
CA Plex 7.2.1
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.
71
CA Plex 7.2.1
Install Components
This article explains how to install the following components:
72
CA Plex 7.2.1
73
CA Plex 7.2.1
74
CA Plex 7.2.1
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.
76
CA Plex 7.2.1
77
CA Plex 7.2.1
78
CA Plex 7.2.1
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.
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
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.
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.
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
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
82
CA Plex 7.2.1
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
83
CA Plex 7.2.1
5. Click OK.
You have defined the JAVA_Home environment variable.
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
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).
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)
86
CA Plex 7.2.1
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
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
89
CA Plex 7.2.1
.
The Model Editor appears.
You can use the Model Editor to view, add, edit, and delete triples.
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.
when you drag an object. It changes to an open parcel icon when it is over a location where you can drop the
object
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.
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
. 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.
94
CA Plex 7.2.1
button .
The Generate and Build Options dialog opens:
95
CA Plex 7.2.1
96
CA Plex 7.2.1
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
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
101
CA Plex 7.2.1
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
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.
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?.
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).
After you have generated and built the objects in your model, you can run the program to see what you created.
107
CA Plex 7.2.1
Value Enter
Project ID PROJ01
Project Description McCready database app.
Project Start Date 121098
Project End Date 010199
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
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
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.
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.
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
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.
4. Repeat Steps 2 and 3 to add the word Project to the other three labels.
112
CA Plex 7.2.1
to save the changes in your model without closing the Panel Designer.
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.
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:
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:
114
CA Plex 7.2.1
115
CA Plex 7.2.1
The following diagram illustrates how you can define entity relationships using Diagrammer in CA Plex:
116
CA Plex 7.2.1
More Information
117
CA Plex 7.2.1
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
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
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.
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:
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).
124
CA Plex 7.2.1
This section discusses how to define an owned by or a refers to relationship between entities.
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.
126
CA Plex 7.2.1
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
128
CA Plex 7.2.1
129
CA Plex 7.2.1
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:
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
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
132
CA Plex 7.2.1
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.
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.
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:
136
CA Plex 7.2.1
Value Enter
Text 5=
Event Modify Tasks
Value Five
5. Close the panel and save your changes.
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.
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.
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:
143
CA Plex 7.2.1
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
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.
146
CA Plex 7.2.1
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
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
149
CA Plex 7.2.1
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.
150
CA Plex 7.2.1
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
in
the Variable Palette, and then select the SharedData variable:
152
CA Plex 7.2.1
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.
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:
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.
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.
button .
156
CA Plex 7.2.1
157
CA Plex 7.2.1
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.
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.
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.
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
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
161
CA Plex 7.2.1
More Information
162
CA Plex 7.2.1
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:
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.
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
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.
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
.
The Message Editor appears:
171
CA Plex 7.2.1
172
CA Plex 7.2.1
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.
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:
174
CA Plex 7.2.1
175
CA Plex 7.2.1
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.
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.
177
CA Plex 7.2.1
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.
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
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
184
CA Plex 7.2.1
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
187
CA Plex 7.2.1
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
190
CA Plex 7.2.1
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
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
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
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
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);
}
}
199
CA Plex 7.2.1
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
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.
202
CA Plex 7.2.1
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:
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.
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.
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.
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
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
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.
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.
213
CA Plex 7.2.1
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.
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.
216
CA Plex 7.2.1
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
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.
222
CA Plex 7.2.1
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.
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
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.
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
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
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
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
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
234
CA Plex 7.2.1
235
CA Plex 7.2.1
236
CA Plex 7.2.1
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
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. ]
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
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
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
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.
243
CA Plex 7.2.1
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
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
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
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
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.
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:
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
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.
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:
250
CA Plex 7.2.1
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:
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:
252
CA Plex 7.2.1
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
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
255
CA Plex 7.2.1
256
CA Plex 7.2.1
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.
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.
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
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:
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.
263
CA Plex 7.2.1
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.
264
CA Plex 7.2.1
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
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)
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.
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.
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.
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
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
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
Action Diagrammer
Use the Action Diagrammer to create, edit, and display functions. The editor consists of three parts:
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.
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>
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.
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.
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
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.
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:
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.
284
CA Plex 7.2.1
285
CA Plex 7.2.1
286
CA Plex 7.2.1
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
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: 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.
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
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.
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.
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.
294
CA Plex 7.2.1
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: 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 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: 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: 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
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
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
301