When an asynchronous service script is launched by the Script Run component, the address (identifier) of the new handler is returned to a variable. +\ Given the address of the nested script, it can be given its own address for two-way communication by sending it in a message. +\ Also, the transfer of addresses can be carried out through a database, through wide-scope variables, through files on disk in network directories, through special storage. \ Due to the potential for the simultaneous operation of many instances of scripts, the key in the repository should be a unique identifier of the subject area entity through which the processes communicate with each other.
Script Interaction Component
:icons:font :hardbreaks: :imagesdir: ../../../assets/images :toc-title: Contents :toc:
Description
Interacts between different script engine instances. Can operate in one of the modes: sending a message, receiving a message. In the message receiving mode, it is possible to organize a long wait for messages to arrive.
The address of the current script engine can be obtained through the getscriptref() expression function. +\
Index |
|
Short name |
|
Script types |
|
Start module |
|
Mode |
Asynchronous |
Icon |
|
Branching type |
Branching, interrupting |
Properties
| Specification | Description |
|---|---|
Name: Mode Code: Visibility condition: no Default: Sending message |
Operating mode Possible options:
|
Name: Scenario ID Code: Visibility condition: yes Default: — |
An argument containing the ID of the message recipient (the active scripting engine). The script’s own identifier is returned by the 'getscriptref()' expression function. Applicable in sending and checking modes. |
Name: Message Code: Visibility condition: yes Default: — |
Argument containing the text of the message. Applies in sending mode. |
Name: Filter by sender Code: Visibility condition: yes Default: — |
Argument containing the identifier of the sender from whom the message is expected to be received. The script’s own identifier is returned by the 'getscriptref()' expression function. Applicable in sending and checking modes. |
Name: Message to variable Code: Visibility condition: yes Default: — |
Variable for storing the text of the received message. Used in receive mode. |
Name: Sender ID to variable Code: Visibility condition: yes Default: — |
Variable for storing the identifier of the sending process. Can be used to send a message back. The script’s own identifier is returned by the 'getscriptref()' expression function. Used in receive mode. |
Name: Sender category to variable Code: Visibility condition: yes Default: — |
Variable for storing the category of the message sender. Used in receive mode. |
Name: Sender Category Code: Visibility condition: yes Default: |
An argument containing the category of the message sender. Applies in sending mode. Possible options:
|
Name: Timeout, s Code: Visibility condition: yes Default: |
Timeout for waiting for new messages to arrive, in seconds. Used in receive mode. |
Name: Transition Code: Visibility condition: no Default: — |
The component to which control is transferred upon successful completion of the operation. |
Name: Transition, error Code: Visibility condition: no Default: — |
Component to which control is transferred in case of an error. |
Name: Transition, script not found Code: Visibility condition: yes Default: — |
The component to which control is transferred if there is no active script processor with the specified identifiers. Applicable in sending and checking modes |
Name: Transition, time Code: Visibility condition: yes Default: — |
The component to which control is transferred if the timeout for receiving messages expires. Used in receive mode. |
See also
-
Role svc