The Actor Model is used: Tasks exchange data by sending each other Events.
- This function sends an Event to a Task. It returns a null value if an Event was sent successfully, or a string with an error code otherwise (for example, when the specified Task does not exist).
- The taskRef value should be a Task handle.
- The eventName value should be a string starting with a Latin letter.
- The optional eventParam parameter value should be a null-value, or a Task handle, or a "basic" object.
- This function only sends an Event to the specified (target) Task. It does not wait till that Task receives an event, nor does it wait for any response from the target Task.
- Events sent to a task are enqueued, and the task can read the first Event in queue using this function. The function value is a dictionary containing the event data.
- The secsToWait value should be a non-negative number.
- If the Task Event queue is empty and the Task does not receive a new Event within the specified number of seconds, the function returns a null-value.
- If this function returns a dictionary value, the dictionary contains the following elements:
- the Event name string. If the Event was sent using the SendEvent operation, this string is the eventName parameter value used in the SendEvent call in the sender Task.
- the Task handle of the sender Task (the Task that has sent this event). In a Cluster environment, this Task and the current Task may be running on different Cluster member computers.
- If the Event is sent by the platform itself, or if the sender was not a Task, the sender element does not exist.
- the event parameter. If the event was sent using the SendEvent operation in the sender Task, this element contains the eventParam parameter value of the SendEvent call.
- Note: depending on the environment, the ReadInput function can return various other objects. For example, if the function is used in a Real-Time Application environment, it can return a string containing the first enqueued DTMF symbol.
- Note: the ReadInput function may have "false wakeups", i.e. it can return the null-object even before the specified time period has elapsed.