I have a long running solver that I wish to periodically update with new planning entities (incoming orders). Below is the sequence in the ProblemFactChange that I have pieced together. Is this the correct sequence? I could not find an example for this.
solution = scoreDirector.getWorkingSolution();
scoreDirector.beforeEntityAdded(order);
solution.getOrderList().add(order);
scoreDirector.triggerVariableListeners();
scoreDirector.afterEntityAdded(order);