this.planningStateCreator = planningStateCreator;
this.resourcesSearcher = resourcesSearcher;
}
List<TaskElement> getCriticalPath(final Order order, final Desktop desktop) {
IAdHocTransactionService transactionService = Registry
.getTransactionService();
return transactionService
.runOnReadOnlyTransaction(new IOnTransaction<List<TaskElement>>() {
@Override
public List<TaskElement> execute() {
PlanningState state = retrieveOrCreate();
return criticalPathFor(state, resourcesSearcher);