Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
Search for | Example | Results |
---|---|---|
A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
Search for | Operator | Example |
---|---|---|
Two or more words in the same topic |
|
|
Either word in a topic |
|
|
Topics that do not contain a specific word or phrase |
|
|
Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
A combination of search types | ( ) parentheses |
|
Author Operations
An operation is an executable that performs a single action. It has metadata like a flow (inputs, outputs and results). For example, one operation checks a web page to see whether it contains specific text, and another operation copies a file.
The action in an operation can be Java-based or Python-based.
There are two types of actions in CloudSlang:
-
Python-based actions. See Using Python Operations.
-
Java-based actions. See Using Java Operations.
Operations must be created externally . They can then be imported:
- As part of content packs, they are displayed in the Dependencies panel. They are read-only. They cannot be copied.
- Via Source Control Management (SCM), they are displayed in the Projects panel. They are read-only. They cannot be copied.
In OO Designer, you can use operations in flows by dragging the operation from the relevant content pack from the Dependencies pane. You can also import a repository that includes the operation by dragging it from the Projects panel. In both cases, the operation is read-only.
An operation file must end with the .sl extension and start with a namespace.
Example of an operation file with its namespace.
namespace: io.cloudslang.base.comparisons operation: name: less_than_percentage inputs: - first_percentage - second_percentage python_action: script: | error_message = "" result = "" first_percentage_nr = first_percentage.replace("%", "") second_percentage_nr = second_percentage.replace("%", "") try: int_value1 = int(first_percentage_nr) int_value2 = int(second_percentage_nr) result = int_value1 < int_value2 except ValueError: error_message = "Both inputs have to be integers" outputs: - error_message results: - LESS: ${error_message == "" and result} - MORE: ${error_message == "" and not result} - FAILURE
All CloudSlang files start with a namespace, which mirrors the folder structure in which the files are found. The namespace can be used by flows that call this operation.
Operations are validated and will not work when:
- Missing action. Operations must contain an action.
- Corrupted YAML.
- Duplicate inputs. When an input is duplicated, or two inputs have the same name but use different cases (for example: Ping and ping).
-
Input\output\result name or value.
- Name cannot be empty
-
The combined input name, flow name, and folder path of the input (under the Library folder) must add up to no more than 255 characters.
Note For localized characters, this limit is even lower. For example, in Japanese, the 255 characters need to be divided by 4, so the number of characters is only 64.
- Name must be unique.
It is recommended to manually validate the inputs that your operation will receive. For example, if you expect a number, make sure that the input is a string representing a number. If you expect an email address, check that the format complies with an email address format.
- Missing rules in operation results. Operation with more than one empty result (with no defined rule).
Operations can have multiple expression results, but can have only one mandatory empty default result, and it must be the last one. -
Incorrect operation name. When the name of the operation does not comply with the rules below:
Name cannot be identical to the following reserved word: "on_failure".
Names must be unique within their folders.
Names are not case-sensitive, so names such as "Ping" and "ping" are considered duplicates. However, when calling an item, make sure to use the correct case.
Names can contain alphanumeric characters, and underscores ( _ ).
Names cannot contain parentheses ( () ), square brackets ( [] ), curly braces ( {} ), hypens ( - ), spaces ( ), and dots (.).
Names cannot be identical to the following Windows reserved words: CON, PRN, AUX, CLOCK$, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, NUL, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9 .
A Decision is a step that serves as a gateway for a decision in a flow. A Decision performs a calculation and then controls the direction of the flow, based on rules that are used to calculate the result. Decisions do not perform actual operations but only calculate where to navigate next. They are read-only. Their inputs, outputs and results can be viewed but not edited.
For details, see Add Decisions to a Flow.
We welcome your comments!
To open the configured email client on this computer, open an email window.
Otherwise, copy the information below to a web mail client, and send this email to clouddocs@hpe.com.
Help Topic ID:
Product:
Topic Title:
Feedback: