Skip to content

Commit

Permalink
Allow cancelled control strategies to be re-run; display status as Wa…
Browse files Browse the repository at this point in the history
…iting when control strategy hasn't started running yet
  • Loading branch information
cseppan committed Jan 25, 2016
1 parent 5e20f87 commit 67ee451
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ private Project project(String projectName) throws EmfException {
public void setRunMessage(ControlStrategy controlStrategy) {
messagePanel.clear();
updateStartDate(controlStrategy);
updateSummaryPanelValuesExceptStartDate("Running", "", null, null);
updateSummaryPanelValuesExceptStartDate("Waiting", "", null, null);
}

public void refresh(ControlStrategy controlStrategy, ControlStrategyResult[] controlStrategyResults) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ else if (selection == JOptionPane.NO_OPTION){
// validatePath(outputTabView.getExportFolder());
controlStrategy.setDeleteResults(deleteResults);
controlStrategy.setExportDirectory(outputTabView.getExportFolder());
controlStrategy.setRunStatus("Waiting");
//get all values from various tabs and persist to strategy object
save();
controlStrategy.setStartDate(new Date());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,6 @@ public synchronized void removeResultDatasets(Integer[] ids, User user) throws E
public synchronized void runStrategy(User user, int controlStrategyId) throws EmfException {
Session session = sessionFactory.getSession();
try {
// first see if the strategy has been canceled, is so don't run it...
String runStatus = dao.getControlStrategyRunStatus(controlStrategyId, session);
if (runStatus.equals("Cancelled"))
return;

ControlStrategy strategy = getById(controlStrategyId);
validateSectors(strategy);
//get rid of for now, since we don't auto export anything
Expand Down

0 comments on commit 67ee451

Please sign in to comment.