Help

Listen Activity

The Listen Activity is very similar to the Event Handling Scope Activity except it contains multiple parallel instances of Event Driven Activities. Which event is realized first decides which Event Driven Activity sequence is executed. All other Event Driven Activities are then cancelled. Using this mechanism a workflow can effectively listen for one or more events consecutively. Below is an example Listen Activity with equivalent pseudo-code:



WHILE TRUE
    
    
    IF EVENT timeout
    
        [Message Not Received...]
        
        BREAK
        
        
    IF EVENT message
    
        [Message Received...]
        
        BREAK
        
        
ENDWHILE
   

The example shows a simple timeout mechanism where if a message is not received within the time delay, execution will continue regardless.

For more information see Workflow Basics – Event Handling.