Waiting Events And Their Waiting Process
Some events have to wait until something else happens before they can be Completed (or Fail ). These types of events exist in the Wait state until the thing they are waiting for happens. For example, consider an event that creates a field activity - it has to wait until the field activity is complete before it can itself Complete.
Every type of event that waits for something else to happen before it completes or fails must have a corresponding background process that monitors the thing on which the event is waiting. We refer to background processes that perform this monitoring as Waiting Processes.
There will be a Waiting Process for every type of event that has to wait for something to happen. The specific background process is defined on the workflow event type. For more information, refer to
Designing Workflow Event Types.
The following points describe the responsibilities of a Waiting Process:
• Check on the thing on which the event is waiting. For example,
◦ An event that creates a field activity has a Waiting Process that checks on the state of the field activity.
◦ An event that creates a request to confirm a customer's request to switch suppliers has a Waiting Process that checks if the confirmation is accepted or rejected.
• Change the state of the event to Complete or Fail based on what transpired. For example,
◦ When the field activity completes, the Waiting event can Complete
◦ The acceptance or rejection is received, the Waiting event can Complete or Fail
• Detect that the event has been waiting too long and do something. For example, the Waiting Process could:
◦ Create a To Do entry (this might be useful if you need an operator to do something)
◦ or, create an outgoing notification informing the sender of the incoming notification that something is wrong
◦ or, Fail / Complete the event (you may be able to automatically assume success or failure if an event waits longer than a predefined limit)
◦ or, execute the event again and reset the base time on the event (this might be useful if the event initiates an outgoing notification to ask permission from some other service provider - if it waits too long, you could simply create another outgoing notification)
◦ or, whatever else you can think of developing in the process
Parent topic