diff --git a/server/libs/modules/components/script/src/main/resources/README.md b/server/libs/modules/components/script/src/main/resources/README.md index 3c548e6fd44..5c2440dfb1e 100644 --- a/server/libs/modules/components/script/src/main/resources/README.md +++ b/server/libs/modules/components/script/src/main/resources/README.md @@ -1,6 +1,8 @@ # 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: +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: ```javascript function perform(input, context) { @@ -10,10 +12,14 @@ function perform(input, context) { } ``` -If you want to call an action of a component which requires a connection you cna define its connection inside the Script editor: +If you want to call an action of a component which requires a connection you can 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: -
+
+