Java Source Code and Global Variables within CA Plex
search cancel

Java Source Code and Global Variables within CA Plex

book

Article ID: 261627

calendar_today

Updated On:

Products

CA Plex

Issue/Introduction

Is there a method to declare global variables and is it possible to initialize these variables in the constructor?

In addition, is there a way to declare a Java method to call in many source codes and in different subroutines?

Environment

CA Plex 7.21

All Supported Operating Systems

Resolution

To work with global properties in Java, the following Plex Java source code objects will be helpful:

- JAVAAPI/GetGlobalChar
- JAVAAPI/SetGlobalChar
- JAVAAPI/GetGlobalNumeric
- JAVAAPI/SetGlobalNumeric

Call the source code object early in the Action Diagram logic.

To have a common Java method to be called from Source code object, follow the online CA Plex help topic "Storing and Using Third Party Class Instance to Plex Java and C# Run Time".