You can invoke classes in an external Java Archive (JAR) file from a Run Java Code operator. The Run Java Code operator can use both operator-level and module-level JARs. You can also configure the Run Java Code operator to override module-level settings. Use the operator to leverage the functionality in your existing Java code.
Follow these steps:
Specify the paths to the external JARs that the Run Java Code operator uses. For each path, you can enter:
/
\\
You can also use a regular expression (including dot notation) that starts with one character, then a colon (:), then the remaining string as in:
^.:.*
Unless you specify a full path, the application interprets the path that you enter as a relative path.
The operator loads the JARs listed in this field and makes them available to the Java code in the running operator. The classes defined in these JARs override the same classes specified in the module-level JARs.
C:\java\tests\MyAccount.class
Set the operator so it uses the following path:
C:\\java\\tests
C:\java\othertests\com\ca\tech\MyAccount.class
Set the operator so it uses the following path:
C:\\java\\othertests
Note: Specify the path to a folder as a full path or as a relative path to CA Process Automation User Resources. Do not specify an http path. Specify the path to a folder so it loads .class files, not JAR files. Unlike .class files, each JAR file requires a separate path that ends with the JAR file (not the directory where it resides).
CA Process Automation automatically mirrors the JARs.
Note: Resources, including user resources, are mirrored during the mirroring interval of the orchestrator or agent. Ensure that the JAR files you upload in the user resources are already mirrored before using them in the Java module operators.
Note: CA Process Automation serializes Java objects that are not Boolean, date, integer, number, string, character, or an array of these types and saves them as JavaObjects.
The Java module captures exceptions or errors that are encountered during an operation and alerts the user in the Reason field of the problem operator.
|
Copyright © 2014 CA.
All rights reserved.
|
|