The advanced Code Editor in CA Process Automation lets you easily create, edit, and debug code for various scripting languages in the following places:
The Code Editor supports the following languages:
Some additional operators contain text editors that use the Code Editor functionality, when applicable. When the specific language used within the operator is supported by the Code Editor and CA Process Automation, their text editors automatically adapt to the specified language. Specifically, their text editors highlight language-specific keywords. However, if the operators use a language that is not supported by the Code Editor or not implemented by CA Process Automation, a plain-text editor is available for coding.
If a process is checked in, the Code Editor starts in read-only mode and the editor and toolbar are disabled. However, some toolbar buttons (for example, Search, Help, and Script validation) are still available.
The Code Editor includes the following features:
Drag any file or selected text (from inside or outside of CA Process Automation) and drop it into the editor to populate the editor.
Locate specific code (with Case Sensitive and Regular Expressions options), then replace specific instances or all occurrences.
Reverse your previous action.
Reverse your previous Undo action.
Advance to a specified line of code.
Adjust indentation of the selected text.
Adjust indentation of the entire code document.
Browse to locate a specific file to import into the editor.
Supported editor modes for imported files include:
CA Process Automation provides an error if any other file extensions are imported in the advanced Code Editor.
Note: Any file type can be imported for the generic editor.
Save the file to your CA Process Automation downloads.
Display errors in your code. This feature is only available in the following cases:
The editor highlights incorrect code in a scrollable error log at the bottom of the editor. Each error contains the line number and a hyperlink to navigate to the specific line of code. When you fix the error, the editor automatically clears it from the error log.
Note: The code should be entered properly, in valid expressions. However, you can save code even if it contains errors, although CA Process Automation issues a warning. Some validations (such as the following examples) are skipped:
Expects ‘Use Strict’ in the JavaScript function declaration.
Expects ‘===’ instead of ‘==’ in the condition.
Validates a mix of tabs and spaces.
When you click the line number of any "{", the Code Editor folds the code up to its matching bracket "}".
When editing XML, code folding is based on the matching tags. You can expand or collapse the XML fragment based on the matching tags. The Code Editor automatically closes the ending tags for you while editing.
The Code Editor also uses the following conventions:
The Code Editor uses the following colors to display JavaScript:
Indicates:
Example: ![]()
Indicates CA Process Automation system functions. Client-side and server-side JavaScript have different sets of system functions.
Example: ![]()
Indicates JavaScript keywords.
Example: ![]()
The Code Editor uses the following shortcuts:
The following shortcuts are only valid for JavaScript:
Note: Only client-side JavaScript can be used in the Forms Designer (for start request forms and interaction request forms). CA Process Automation-specific system functions are not available. However, form functions are available.
|
Copyright © 2014 CA.
All rights reserved.
|
|