Difference between revisions of "Extensions.EventHandling.WaitForEvent"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
== OTL Syntax == | == OTL Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | EventHandling.WaitForEvent(EventSourceTerm); | + | EventHandling.WaitForEvent(EventSourceTerm, EventVariable); |
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 07:44, 26 September 2018
Classification
Name | WaitForEvent |
Short Description | Wait until an event is triggered and then continues processing |
Class | Action |
Extension | OTX EventHandling extension |
Group | EventHandling related actions |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
EventHandling.WaitForEvent(EventSourceTerm, EventVariable);
Description
The OTX WaitForEvent activity blocks the current flow (thread) until a specified event sources has triggered an event. When an event is triggered, completed the WaitForEvent activity and the process continues with the next activity. The event that led to the termination of the activity can be evaluated using the Event property, see below.
Ending the waitforevent activity, all on-the-fly (ie on the corresponding event source term, see Property Source) event sources generated automatically.
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Event | Event | Variable | - | [0..1] | After an event is triggered, this variable contains the corresponding event. |
EventSource | EventSource | Term | - | [1] | One or more event sources. The order is insignificant. Once a source triggering an event, the waiting is ended. |
OTL Examples
Boolean Bool1 = false;
EventHandling.EventSource EventSource1;
EventSource1 = EventHandling.MonitorChangeEventSource(Bool1);
parallel
{
lane
{
Bool1 = true;
}
lane
{
EventHandling.WaitForEvent({EventSource1}, Event1);
}
}