Script
Reference
Executes user-defined code. User can write custom workflow logic in Java, JavaScript, Python, R or Ruby programming languages.
Categories: [helpers, developer-tools]
Version: 1
Actions
JavaScript
Executes custom JavaScript code.
Properties
Name | Type | Control Type | Description |
---|---|---|---|
Input | {} | OBJECT_BUILDER | Initialize parameter values used in the custom code. |
JavaScript Code | STRING | CODE_EDITOR | Add your JavaScript custom logic here. |
Python
Executes custom Python code.
Properties
Name | Type | Control Type | Description |
---|---|---|---|
Input | {} | OBJECT_BUILDER | Initialize parameter values used in the custom code. |
Python Code | STRING | CODE_EDITOR | Add your Python custom logic here. |
Ruby
Executes custom Ruby code.
Properties
Name | Type | Control Type | Description |
---|---|---|---|
Input | {} | OBJECT_BUILDER | Initialize parameter values used in the custom code. |
Ruby Code | STRING | CODE_EDITOR | Add your Ruby custom logic here. |
Additional instructions
Calling a component inside a script
To call a component inside a script, you need to use the context.component
object which gives you references to components and their actions. For example, to call logger
component and its info
action in javascript
you can use the following code:
If you want to call an action of a component which requires a connection you cna define its connection inside the Script editor:
You can also define multiple connections of the same component and then reference a particular connection when calling the action: