Apama 10.3 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in EPL | Common EPL Patterns in Monitors | Contrasting using a dictionary with spawning | Translation using spawning
Translation using spawning
Same events as translation using dictionary.
The monitor:
monitor Translator {
   action onload() {
on all Translation() as t addTranslation(t);
on all unmatched Input() as i fail(i);
   action addTranslation(Translation t) {
      spawn translation(t);
   action translation(Translation t) {
      on all Input(t.raw) translate(t.converted);
   action translate(string converted) {
      send Output(converted) to "output";
   action fail(Input i) {
      print "Cannot translate: " + i.value;

Copyright © 2013-2018 | 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.