public boolean runTrace(Trace trace) {
        this.getWorkflowPlaces().forEach(Place::clearToken);
        List<Event> currentTrace = trace.getEventsList();
        in.putToken();
        for (Event currentActivity : currentTrace) {
            // if out place has a token but trace is not finished
            if (out.hasToken()) {
                return false;
            }

            Pair<Set<Place>, Set<Place>> actPrePost = eventPrePostMap
                    .get(currentActivity);

            //activity not found in construction set event log
            if (actPrePost == null) {
                return false;
            }

            Set<Place> inPlaces = actPrePost.getFirst();
            boolean enabled = true;
            for (Place p : inPlaces) {
                if (!p.hasToken()) {
                    enabled = false;
                    break;
                }
            }

            if (enabled) {
                inPlaces.forEach(Place::takeToken);
                actPrePost.getSecond().forEach(Place::putToken);
            }
        }

        if (out.hasToken()) {
            long numTokens = workflowPlaces.stream().filter(place -> place.hasToken()).count();
            return numTokens == 1;
        } else {
            return false;
        }
    }