Skip to content

Commit

Permalink
Attempt at fixing defect
Browse files Browse the repository at this point in the history
  • Loading branch information
tlawrie committed Jan 27, 2023
1 parent 8a4c6e2 commit 1141656
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import io.boomerang.util.ParameterMapper;

/*
* Workflow Schedule Serivce provides all the methods for both the Schedules page and the individual Workflow Schedule
* Workflow Schedule Service provides all the methods for both the Schedules page and the individual Workflow Schedule
* and abstracts the quartz implementation.
*
* @since Flow 3.6.0
Expand Down Expand Up @@ -203,9 +203,10 @@ public WorkflowSchedule createSchedule(final WorkflowSchedule schedule) {
scheduleEntity.setParameters(propertyList);
}
Boolean enableJob = false;
if (WorkflowScheduleStatus.active.equals(schedule.getStatus()) && wfEntity.getTriggers().getScheduler().getEnable()) {
scheduleEntity.setStatus(WorkflowScheduleStatus.trigger_disabled);
if (WorkflowScheduleStatus.active.equals(scheduleEntity.getStatus()) && wfEntity.getTriggers().getScheduler().getEnable()) {
enableJob = true;
} else if (WorkflowScheduleStatus.active.equals(scheduleEntity.getStatus()) && !wfEntity.getTriggers().getScheduler().getEnable()) {
scheduleEntity.setStatus(WorkflowScheduleStatus.trigger_disabled);
}
workflowScheduleRepository.saveSchedule(scheduleEntity);
createOrUpdateSchedule(scheduleEntity, enableJob);
Expand Down

0 comments on commit 1141656

Please sign in to comment.