Developing Apama Applications > Developing Apama Applications in EPL > Common EPL Patterns > Factory pattern > Canonical factory pattern
Canonical factory pattern
The event:
event NewOrder {...}
The monitor:
monitor OrderProcessor {
   ...
   action onload() {
      NewOrder order;
      on all NewOrder():order spawn processNewOrder(order);
   }
   action processNewOrder(NewOrder order) {
   ...
   }
}
Copyright © Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its Subsidiaries and or/its Affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.