An action is a repeatable procedure used to execute commands. Actions are classified as Command actions or a JavaScript actions.
Command actions consist of one or more commands that are executed sequentially as a group. These commands typically handle tasks such as sending, receiving, listing, or deleting files. You can configure a single action to handle both sending and receiving, or split them into separate actions if they need to be scheduled at different intervals.
JavaScript actions are supported only in the Cleo Harmony application. These allow users to enter statements in a free-form manner. Cleo Harmony uses the Rhino JavaScript engine (an open-source, pure Java implementation) to interpret and compile JavaScript source files into temporary Java classes for execution. You can learn more about Rhino at https://developer.mozilla.org/en/Rhino_JavaScript_Compiler.
Within JavaScript actions, developers can use methods provided by the Cleo Harmony API—particularly those in the ISessionScript class—to run other action commands and write to debug or system logs. This functionality enables the creation of complex sequences and decision logic that would not be possible using Command actions alone. For examples and a full description of available methods and functions, refer to the API Javadocs.
- Select the action in the tree pane.
-
The potential set of commands depends on the client-to-host protocol.
*HTTP derivatives like AS2, AS4, EBICS, ebXML, RNIF and WS generally only support PUT.
The actual supported set of commands and their syntax is further dependent on the host type. For more information, see the section specific to the host type in question.
Table 1. Host Commands FTP HTTP* SSH FTP OFTP MQ SMTP HSP MLLP Purpose CONNECT X X X Connect (login) to the host PUT X X X X X X X X Send one or more files to the host GET X X X X X X Receive one or more files from the host DIR X X X X Get a directory listing of available files from the host CD X X Changes the current directory on the host CONFIRM X Confirm, on the host, receipt of one or more files DELETE X Delete one or more files on the host REQUEUE X Requeues one or more previously received files on the host QUOTE X X X Send a raw command to the server SITE X Send a site specific command to the server TYPE X Sets file data type to ASCII or BINARY Table 2. Local Commands FTP HTTP* SSH FTP OFTP MQ SMTP HSP MLLP Purpose SET X X X X X X Change an action property value CLEAR X X X X X X Clear an action string property SYSTEM X X X X X X Execute a local system command WAIT X X X X X X Pause LCOPY X X X X X X Copy local files LDELETE X X X X X X Delete local files LREPLACE X X X X X X Replace bytes in local files -
Right-click in the empty space or on a command in the Action tab
to display a menu. (Note that JavaScript actions will not contain the Edit or Comment options.)
- Select Edit to edit the current line using the dialog editor (refer to step 4).
-
Select Insert (or the
button)
to insert a new line before the current line using the dialog editor
(refer to step 4).
-
Select Move Down or Move Up (or
the
and
buttons)
to move the current line down or up.
-
Select Comment (or the
button)
to change the current command line to a comment line.
-
Select Delete (or the
button)
to clear the current line.
-
The Action tab is a freeform
editor. For JavaScript actions, type in your JavaScript. For
Commands actions, if you are familiar with the supported commands and syntax,
you can type commands in directly. Otherwise, you can use a dialog editor
that will format commands for you. To open the dialog editor, click the wizard
button. The wizard button is not available for JavaScript actions.
- Select the desired command from the list on the left.
- The dialog box prompts for source and destination paths (and allows for browsing), when applicable to the command and possible for the host type.
- Available options for the command are listed.
- For HTTP, the dialog prompts for any needed or optional parameter and/or header values for the command.
- For LCOPY zipping operations, the dialog prompts for any needed password information if AES encryption is being used.
- The resultant command text is displayed on the bottom line (native UI only).
- Edit as necessary and click OK.
Comments
0 comments
Please sign in to leave a comment.