Combining the dictionary and factory patterns
The dictionary and factory patterns are often combined. This pattern achieves separation of concerns by using two monitors. The first monitor is responsible for managing global concerns, for example, it ensure that each order has a unique key. The second monitor is responsible for local concerns, for example, it manages all data associated with processing that order.
The example does the following:
1. The OrderFilter monitor accepts NewOrder events and checks for uniqueness of the order key.
2. For all orders with unique keys, the OrderFilter monitor routes a ValidOrder event.
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.