BubbleReceive
(Engine-Level Function)
Description: | Receives a message from the given bubble. |
Returns: | Variable |
Usage: | Script Only. |
Function Groups: | Bubble and Thread |
Related to: | Bubble |BubbleList | BubbleQueueLength | BubbleSend | RunInBubble |
Format: | BubbleRecieve([BubbleHandle, QueueName]) |
Parameters: |
BubbleHandle |
Optional bubble handle as returned by the Bubble and BubbleList functions. Specifies the bubble where the message is being received from. If Invalid or not provided, the message is being received from the parent bubble. |
QueueName |
Optional text. The name of the queue that the message was queued on. If not provided, it defaults to the empty string, “”. Any time you specify a new string, a new queue will be created internally. |
Comments: |
Messages on a particular queue are received in the order that they were sent. This function is intended to be used in combination with BubbleQueueLength as follows: If BubbleQueueLength(ChildBubble, "MyQueueName") > 0; [ Message = BubbleReceive(ChildBubble, "MyQueueName"); { do something with Message } ] |
Example:
Refer to the example in the Bubble function description.