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 © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.