@Override
    public final void run(Task task)
            throws Exception {

        final InputRelationList relList = task.getData()
                .require(InputRelationList.class);
        final IFPNode fpRoot = task.getData()
                .require(IFPNode.class);

        for(final IInputRelation rel: relList) {

            rel.prepareNextIteration();
            for (final DomainTuple d : rel) {
                task.getInfo().measureTime("Lineage", () -> {
                    for (final FPSource source : fpRoot.getSources().values()) {

                        final int sourceId = source.getSourceId();
                        if (d.getSourceType(sourceId) == 1
                                || d.getSourceType(sourceId) == 2) {

                            insertPath(null, fpRoot, d, sourceId);
                        } else if (d.getSourceType(sourceId) == 3) {

                            // Specific source needs to be factorized
                            // for the source-type != 2, because otherwise
                            // there is a parent node required for the gentuple.
                            if (!source.isFactorized())
                                throw new Exception(String.format(
                                        "The source with relation %s and id: %d " +
                                                "needs to be factorized to use source types != 2.",
                                        source.getRelation(), source.getSourceId()
                                ));

                            final FactorCatalog factCat
                                    = getFactorCatalog(source.getId());
                            final GenTuple key = GenTuple.From(source, d);

                            // Filter all type 3 entries
                            // which aren't relevant.
                            if (!factCat.contains(key))
                                break;

                            final LSource lSource = (LSource)
                                    factCat.get(key);

                            final Event event = _eventManager.create(
                                    d.getBID(sourceId),
                                    d.getTID(sourceId),
                                    d.getPROB(sourceId)
                            );

                            lSource.add(event);
                        }
                    }
                });
            }
        }

        // Todo Event count hier auch erledigen udn nicht in calculation
        task.getInfo().setInfo("Unique Events", _eventManager.size());
        task.getInfo().setInfo("Nodes", getNodeCount());
        task.getData().insert(FactorCatalog.class,
                getFactorCatalog(fpRoot.getId()));
        task.getData().insert(EventManager.class,
                _eventManager);
    }