Wait Selection Element
The wait action for the element is defined below:
This is a Wait for Message action. As we discussed before, this action will cause the workflow instance to wait until the message "sendnow" is received. In our example, we set it to timeout after 60 seconds. This will cause the workflow instance to timeout if the message "sendnow" has not been received within 60 seconds.
The Wait Timeout Handling
If the element does not receive the message within the defined timeout period, a "workflow.timeout" exception will be thrown. This exception can then be handled in the workflow process. In this example, it is handled in Notify Again element
Notify Again Element
It is a simple Go To element. The action defined is simply add one to the variable: timeout_count, which is initially set to zero.
Notice the "System throws exception: workflow.timeout". This is how we handle the timeout exception thrown by the Wait Selection Element above.
The target element is Notify Present. This means that after performing the Set Var action, the workflow instance will jump to the Notify Present element, which will email the presenter again, and then go to one of its children elements depending on the timeout_count.