@Override
	public final void run(TaskMonitor monitor) {
		int transactionID = program.startTransaction(getTaskTitle());
		boolean doCommit = false;
		try {
			doRun(monitor);
			doCommit = true;
		}
		catch (RollbackException e) {
			Msg.error(this, "Task Failed - \"" + getTaskTitle() + "\"", e);
		}
		catch (Throwable t) {
			Msg.showError(this, null, "Task Failed - \"" + getTaskTitle() + "\"",
				"Task failed - \"" + getTaskTitle() + "\"", t);
		}
		finally {
			program.endTransaction(transactionID, doCommit);
		}
	}
Construct a new Task that will operate on a program.

@param program the program that the task will operate on.
@param title title the title associated with the task
@param canCancel true means that the user can cancel the task
@param hasProgress true means that the dialog should show a progress
           indicator
@param isModal true means that the dialog is modal and the task has to
           complete or be canceled before any other action can occur
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/ProgramTask.java