code: @Override
      public void prepare(@SuppressWarnings("rawtypes") Map map, TopologyContext tc, OutputCollector oc) {
          this.collector = oc;
          Configuration cepConfig = new Configuration();
          if (this.eventTypes == null || (this.objectStatements == null && this.statements == null)) {
              throw new FailedException("Event types cannot be null and at least one type of statement has to be not null");
          }
          for (Map.Entry<GlobalStreamId, Grouping> a : tc.getThisSources().entrySet()) {
              Fields f = tc.getComponentOutputFields(a.getKey());
              if (!this.eventTypes.keySet().containsAll(f.toList())) {
                  throw new FailedException("Event types and fields from source streams do not match: Event Types="
                          + Arrays.toString(this.eventTypes.keySet().toArray())
                          + " Stream Fields=" + Arrays.toString(f.toList().toArray()));
              }
              cepConfig.addEventType(a.getKey().get_componentId() + "_" + a.getKey().get_streamId(), this.eventTypes);
          }
          this.epService = EPServiceProviderManager.getDefaultProvider(cepConfig);
          this.epService.initialize();
          if (!processStatemens()) {
              throw new FailedException("At least one type of statement has to be not empty");
          }
      }
docs: {@inheritDoc}
  
  @param map
  @param tc
  @param oc