Isis 3.0 Developer's Reference (API) |
Home |
Parent class for anything that performs an action in Project. More...
#include <WorkOrder.h>
Inherits QAction, and QUndoCommand.
Inherited by Isis::CnetEditorViewWorkOrder, Isis::CubeViewportViewWorkOrder, Isis::ExportControlNetWorkOrder, Isis::ExportImagesWorkOrder, Isis::Footprint2DViewWorkOrder, Isis::ImageFileListViewWorkOrder, Isis::ImageListActionWorkOrder, Isis::ImportControlNetWorkOrder, Isis::ImportImagesWorkOrder, Isis::MosaicSceneWorkOrder, Isis::OpenProjectWorkOrder, Isis::RenameProjectWorkOrder, Isis::SaveProjectAsWorkOrder, and Isis::SaveProjectWorkOrder.
Classes | |
class | XmlHandler |
Public Types | |
enum | WorkOrderStatus { WorkOrderUnknownStatus = 0, WorkOrderNotStarted, WorkOrderRedoing, WorkOrderRedone, WorkOrderUndoing, WorkOrderUndone, WorkOrderFinished, WorkOrderLastStatus = WorkOrderFinished } |
enum | Context { NoContext, ProjectContext } |
Public Slots | |
virtual bool | execute () |
The (child) implementation of this method should prompt the user/gather state by any means necessary. | |
virtual void | redo () |
Starts (or enqueues) a redo. | |
virtual void | undo () |
Starts (or enqueues) an undo. |
Signals | |
void | creatingProgress (WorkOrder *) |
void | deletingProgress (WorkOrder *) |
void | finished (WorkOrder *) |
void | statusChanged (WorkOrder *) |
Public Member Functions | |
WorkOrder (Project *project) | |
Create a work order that will work with the given project. | |
virtual | ~WorkOrder () |
virtual WorkOrder * | clone () const =0 |
virtual bool | isExecutable (Context) |
Re-implement this method if your work order utilizes controls for data in order to operate. | |
virtual bool | isExecutable (QList< Control * > controls) |
Re-implement this method if your work order utilizes controls for data in order to operate. | |
virtual bool | isExecutable (ImageList *images) |
Re-implement this method if your work order utilizes images for data in order to operate. | |
void | read (XmlStackedHandlerReader *xmlReader) |
Read this work order's data from disk. | |
void | save (QXmlStreamWriter &stream) const |
Output XML format: | |
virtual void | setData (Context) |
virtual void | setData (ImageList *images) |
virtual void | setData (QList< Control * > controls) |
void | setNext (WorkOrder *nextWorkOrder) |
void | setPrevious (WorkOrder *previousWorkOrder) |
QString | bestText () const |
bool | createsCleanState () const |
QDateTime | executionTime () const |
bool | isFinished () const |
bool | isRedoing () const |
bool | isRedone () const |
bool | isUndoing () const |
bool | isUndone () const |
bool | modifiesDiskState () const |
WorkOrder * | next () const |
WorkOrder * | previous () const |
QString | statusText () const |
ProgressBar * | progressBar () |
Static Public Member Functions | |
static WorkOrderStatus | fromStatusString (QString) |
static QString | toString (WorkOrderStatus) |
Protected Slots | |
void | addCloneToProject () |
Protected Member Functions | |
WorkOrder (const WorkOrder &other) | |
Copy the work order 'other' into this (new) instance. | |
ImageList * | imageList () |
const ImageList * | imageList () const |
QList< Control * > | controlList () |
virtual bool | dependsOn (WorkOrder *other) const |
Directory * | directory () const |
Project * | project () const |
void | setCreatesCleanState (bool createsCleanState) |
Declare that this work order is saving the project. | |
void | setModifiesDiskState (bool changesProjectOnDisk) |
void | setInternalData (QStringList data) |
int | progressMin () const |
int | progressMax () const |
int | progressValue () const |
void | setProgressRange (int, int) |
void | setProgressValue (int) |
QStringList | internalData () const |
virtual void | syncRedo () |
This method is designed to be implemented by children work orders. | |
virtual void | asyncRedo () |
This method is designed to be implemented by children work orders. | |
virtual void | postSyncRedo () |
This method is designed to be implemented by children work orders. | |
virtual void | syncUndo () |
This method is designed to be implemented by children work orders. | |
virtual void | asyncUndo () |
This method is designed to be implemented by children work orders. | |
virtual void | postSyncUndo () |
This method is designed to be implemented by children work orders. |
Parent class for anything that performs an action in Project.
This class should be used for any operation that affects a Project. This provides history, undo/redo capabilities (which need implemented correctly), and the ability for the project to guarantee a good state on disk.
State between the end of execute() and the beginning of the redo methods must be saved via the parent (WorkOrder) class. This is to ensure serializability. State between the redo methods and undo methods should work the same way. Child implementations may only save state (have member variables) that store state between syncRedo(), asyncRedo() and postSyncRedo() OR between syncUndo(), asyncUndo() and postSyncUndo(). Other forms of state will cause the work order to not function properly when saved/restored from disk.
WorkOrderUnknownStatus | |
WorkOrderNotStarted | |
WorkOrderRedoing | |
WorkOrderRedone | |
WorkOrderUndoing | |
WorkOrderUndone | |
WorkOrderFinished |
This is used for work orders that will not undo or redo (See createsCleanState()) |
WorkOrderLastStatus |
Isis::WorkOrder::WorkOrder | ( | Project * | project | ) |
Create a work order that will work with the given project.
project | The Project that this work order should be interacting with |
parent | The Qt-relationship parent |
References _FILEINFO_, addCloneToProject(), finished(), NoContext, Isis::IException::Programmer, project(), and WorkOrderNotStarted.
|
virtual |
|
protected |
Copy the work order 'other' into this (new) instance.
other | The work order being copied |
References _FILEINFO_, addCloneToProject(), finished(), project(), and Isis::IException::Unknown.
|
protectedslot |
References Isis::Project::addToProject(), clone(), and project().
Referenced by WorkOrder().
|
protectedvirtual |
This method is designed to be implemented by children work orders.
The order of execution for redo is: syncRedo() - GUI thread asyncRedo() - Pooled thread* postSyncRedo() - GUI thread
State can be read from the parent WorkOrder class and from state set in syncRedo() while in this method. You can set state to be used in postSyncRedo() safely. Please be wary of creating QObjects inside of this method because they will associated with the pooled thread and must be moved back to the GUI thread with QObject::moveToThread(). This method is never executed in the GUI thread. You can update progress by calling setProgressRange() and setProgressValue(). Please do not manipulate any GUI objects here.
Reimplemented in Isis::ImportImagesWorkOrder, Isis::ImportControlNetWorkOrder, Isis::ExportImagesWorkOrder, and Isis::ExportControlNetWorkOrder.
Referenced by redo().
|
protectedvirtual |
This method is designed to be implemented by children work orders.
The order of execution for undo is: syncUndo() - GUI thread asyncUndo() - Pooled thread* postSyncUndo() - GUI thread
State can be read from the parent WorkOrder class and from state set in syncUndo() while in this method. You can set state to be used in postSyncUndo() safely. Please be wary of deleting QObjects inside of this method because they will cause unpredictable crashes. This method is never executed in the GUI thread. You can update progress by calling setProgressRange() and setProgressValue(). Please do not manipulate any GUI objects here.
Reimplemented in Isis::ImportImagesWorkOrder.
Referenced by undo().
|
pure virtual |
Implemented in Isis::ImageListActionWorkOrder, Isis::ImportImagesWorkOrder, Isis::ImportControlNetWorkOrder, Isis::SaveProjectAsWorkOrder, Isis::SaveProjectWorkOrder, Isis::ImageFileListViewWorkOrder, Isis::OpenProjectWorkOrder, Isis::RenameProjectWorkOrder, Isis::CubeViewportViewWorkOrder, Isis::Footprint2DViewWorkOrder, Isis::CnetEditorViewWorkOrder, Isis::ExportImagesWorkOrder, Isis::ExportControlNetWorkOrder, Isis::MoveDownOneSceneWorkOrder, Isis::MoveToBottomSceneWorkOrder, Isis::MoveToTopSceneWorkOrder, and Isis::MoveUpOneSceneWorkOrder.
Referenced by addCloneToProject(), and Isis::Directory::supportedActions().
bool Isis::WorkOrder::createsCleanState | ( | ) | const |
Referenced by Isis::Project::addToProject(), execute(), and setCreatesCleanState().
|
signal |
|
signal |
|
protectedvirtual |
Reimplemented in Isis::RenameProjectWorkOrder, Isis::CubeViewportViewWorkOrder, Isis::Footprint2DViewWorkOrder, and Isis::CnetEditorViewWorkOrder.
Referenced by redo().
|
protected |
|
virtualslot |
The (child) implementation of this method should prompt the user/gather state by any means necessary.
This method is designed to be implemented by children work orders, but they need to call this version inside of their execute (at the beginning).
Prompts for file names, questions, warnings, etc.. should be done here.
Once the work order has enough data to execute, this method needs to set the state in the parent (this) WorkOrder class. Call setData(ImageList), setInternalData(QStringList), etc... with all of the data/state necessary to perform the work order. This could be a list of file names, an ImageList of images you're viewing, or really anything else.
Finally, the actual work needs done in *Redo(), using only state (data) stored by the parent (this) WorkOrder class. You do not have to call *Redo() - this is done for you by WorkOrder::redo(). WorkOrder::redo() is called from Project::addToProject() when the workOrder is pushed onto the undo stack.
We do it this way to ensure saving/restoring from history can be done automatically/simply and implemented only once per data type. This also gives us full undo/redo functionality.
The order of execution for work orders is: execute() - GUI thread, can ask user for input* syncRedo() - GUI thread, should not prompt the user for input asyncRedo() - Pooled thread postSyncRedo() - GUI thread
syncUndo() - GUI thread, always called after redo finishes asyncUndo() - Pooled thread postSyncUndo() - GUI thread
syncRedo() - GUI thread asyncRedo() - Pooled thread postSyncRedo() - GUI thread
and so on...
State should only be set in the parent WorkOrder class in this method. You can set arbitrary state using setInternalData(). This method is always executed in the GUI thread and is the only place to ask the user questions.
Reimplemented in Isis::ImageListActionWorkOrder, Isis::ImportImagesWorkOrder, Isis::ImportControlNetWorkOrder, Isis::SaveProjectAsWorkOrder, Isis::SaveProjectWorkOrder, Isis::ImageFileListViewWorkOrder, Isis::RenameProjectWorkOrder, Isis::OpenProjectWorkOrder, Isis::CubeViewportViewWorkOrder, Isis::Footprint2DViewWorkOrder, Isis::CnetEditorViewWorkOrder, Isis::ExportImagesWorkOrder, and Isis::ExportControlNetWorkOrder.
References createsCleanState(), statusChanged(), and WorkOrderFinished.
Referenced by Isis::Project::addToProject().
QDateTime Isis::WorkOrder::executionTime | ( | ) | const |
|
signal |
Referenced by redo(), undo(), and WorkOrder().
|
static |
References toString(), WorkOrderLastStatus, and WorkOrderUnknownStatus.
|
protected |
References Isis::Project::image(), and project().
Referenced by Isis::ExportImagesWorkOrder::asyncRedo(), Isis::ExportImagesWorkOrder::execute(), Isis::CubeViewportViewWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::execute(), Isis::ImageListActionWorkOrder::execute(), imageList(), Isis::ImageListActionWorkOrder::ImageListActionWorkOrder(), redo(), Isis::MosaicSceneWorkOrder::restoreZPositions(), Isis::ImageListActionWorkOrder::setData(), Isis::MoveToBottomSceneWorkOrder::syncRedo(), Isis::MoveDownOneSceneWorkOrder::syncRedo(), Isis::MoveUpOneSceneWorkOrder::syncRedo(), Isis::MoveToTopSceneWorkOrder::syncRedo(), Isis::CubeViewportViewWorkOrder::syncRedo(), Isis::Footprint2DViewWorkOrder::syncRedo(), Isis::ImageFileListViewWorkOrder::syncRedo(), Isis::ImageListActionWorkOrder::syncRedo(), Isis::CubeViewportViewWorkOrder::syncUndo(), Isis::Footprint2DViewWorkOrder::syncUndo(), and Isis::ImageListActionWorkOrder::syncUndo().
|
protected |
References imageList().
|
protected |
Referenced by Isis::ExportControlNetWorkOrder::asyncRedo(), Isis::ExportImagesWorkOrder::asyncRedo(), Isis::ImportImagesWorkOrder::asyncRedo(), Isis::ExportControlNetWorkOrder::execute(), Isis::ExportImagesWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::CubeViewportViewWorkOrder::execute(), Isis::RenameProjectWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::execute(), Isis::ImportControlNetWorkOrder::execute(), Isis::ImageListActionWorkOrder::execute(), Isis::ImageListActionWorkOrder::ImageListActionWorkOrder(), Isis::RenameProjectWorkOrder::RenameProjectWorkOrder(), Isis::MosaicSceneWorkOrder::restoreZPositions(), Isis::MosaicSceneWorkOrder::scene(), Isis::ImageListActionWorkOrder::setData(), Isis::MosaicSceneWorkOrder::storeZPositions(), Isis::CubeViewportViewWorkOrder::syncRedo(), Isis::Footprint2DViewWorkOrder::syncRedo(), Isis::ImageFileListViewWorkOrder::syncRedo(), Isis::RenameProjectWorkOrder::syncRedo(), Isis::ImportControlNetWorkOrder::syncRedo(), Isis::ImageListActionWorkOrder::syncRedo(), Isis::CubeViewportViewWorkOrder::syncUndo(), Isis::Footprint2DViewWorkOrder::syncUndo(), Isis::ImageFileListViewWorkOrder::syncUndo(), Isis::RenameProjectWorkOrder::syncUndo(), and Isis::ImageListActionWorkOrder::syncUndo().
|
virtual |
Re-implement this method if your work order utilizes controls for data in order to operate.
For example, "CnetEditorViewWorkOrder" works sometimes on controls - the logic in side of CnetEditorViewWorkOrder::isExecutable() determines whethere or not a user is prompted with this work order as a possibility.
Reimplemented in Isis::RenameProjectWorkOrder.
Referenced by Isis::Directory::supportedActions().
Re-implement this method if your work order utilizes controls for data in order to operate.
For example, "CnetEditorViewWorkOrder" works sometimes on controls - the logic in side of CnetEditorViewWorkOrder::isExecutable() determines whethere or not a user is prompted with this work order as a possibility.
Reimplemented in Isis::CnetEditorViewWorkOrder, and Isis::ExportControlNetWorkOrder.
|
virtual |
Re-implement this method if your work order utilizes images for data in order to operate.
For example, "Footprint2DViewWorkOrder" works sometimes on images - the logic in side of Footprint2DViewWorkOrder::isExecutable(ImageList) determines whethere or not a user is prompted with this work order as a possibility.
images | An image list that this work order should execute on |
Reimplemented in Isis::ImageListActionWorkOrder, Isis::ImageFileListViewWorkOrder, Isis::CubeViewportViewWorkOrder, Isis::Footprint2DViewWorkOrder, and Isis::ExportImagesWorkOrder.
bool Isis::WorkOrder::isFinished | ( | ) | const |
References WorkOrderFinished.
bool Isis::WorkOrder::isRedoing | ( | ) | const |
References WorkOrderRedoing.
bool Isis::WorkOrder::isRedone | ( | ) | const |
References WorkOrderRedone.
Referenced by redo().
bool Isis::WorkOrder::isUndoing | ( | ) | const |
References WorkOrderUndoing.
Referenced by Isis::Project::lastNotUndoneWorkOrder(), redo(), and undo().
bool Isis::WorkOrder::isUndone | ( | ) | const |
References WorkOrderUndone.
Referenced by Isis::Project::lastNotUndoneWorkOrder(), and undo().
bool Isis::WorkOrder::modifiesDiskState | ( | ) | const |
Referenced by Isis::Project::~Project().
|
protectedvirtual |
This method is designed to be implemented by children work orders.
The order of execution for redo is: syncRedo() - GUI thread asyncRedo() - Pooled thread postSyncRedo() - GUI thread*
State can be read from the parent WorkOrder class and from state set in either syncRedo() or asyncRedo() while in this method. You can not set state to be used in any of the undo code safely. This method is always executed in the GUI thread and has no progress.
Reimplemented in Isis::ImportImagesWorkOrder, Isis::ImportControlNetWorkOrder, Isis::ExportImagesWorkOrder, and Isis::ExportControlNetWorkOrder.
|
protectedvirtual |
This method is designed to be implemented by children work orders.
The order of execution for undo is: syncUndo() - GUI thread asyncUndo() - Pooled thread postSyncUndo() - GUI thread*
State can be read from the parent WorkOrder class and from state set in either syncUndo() or asyncUndo() while in this method. You can not set state to be used in any of the redo code safely. This method is always executed in the GUI thread and has no progress.
Reimplemented in Isis::ImportImagesWorkOrder.
WorkOrder * Isis::WorkOrder::previous | ( | ) | const |
Referenced by Isis::Project::addToProject(), Isis::Project::lastNotUndoneWorkOrder(), and redo().
ProgressBar * Isis::WorkOrder::progressBar | ( | ) |
Referenced by Isis::OpenProjectWorkOrder::execute().
|
protected |
|
protected |
|
protected |
|
protected |
References _FILEINFO_, and Isis::IException::Programmer.
Referenced by addCloneToProject(), Isis::ExportControlNetWorkOrder::asyncRedo(), Isis::ExportImagesWorkOrder::asyncRedo(), Isis::ImportImagesWorkOrder::asyncUndo(), directory(), Isis::ExportControlNetWorkOrder::execute(), Isis::ExportImagesWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::CubeViewportViewWorkOrder::execute(), Isis::OpenProjectWorkOrder::execute(), Isis::RenameProjectWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::execute(), Isis::SaveProjectWorkOrder::execute(), Isis::SaveProjectAsWorkOrder::execute(), Isis::ImportImagesWorkOrder::execute(), imageList(), Isis::ExportControlNetWorkOrder::postSyncRedo(), Isis::ExportImagesWorkOrder::postSyncRedo(), Isis::ImportImagesWorkOrder::postSyncRedo(), Isis::ImportImagesWorkOrder::postSyncUndo(), redo(), Isis::CnetEditorViewWorkOrder::syncRedo(), Isis::CubeViewportViewWorkOrder::syncRedo(), Isis::Footprint2DViewWorkOrder::syncRedo(), Isis::ImageFileListViewWorkOrder::syncRedo(), Isis::RenameProjectWorkOrder::syncRedo(), Isis::ImportControlNetWorkOrder::syncRedo(), Isis::CnetEditorViewWorkOrder::syncUndo(), Isis::CubeViewportViewWorkOrder::syncUndo(), Isis::Footprint2DViewWorkOrder::syncUndo(), Isis::ImageFileListViewWorkOrder::syncUndo(), Isis::RenameProjectWorkOrder::syncUndo(), Isis::ImportControlNetWorkOrder::syncUndo(), and WorkOrder().
void Isis::WorkOrder::read | ( | XmlStackedHandlerReader * | xmlReader | ) |
Read this work order's data from disk.
References Isis::XmlStackedHandlerReader::pushContentHandler().
|
virtualslot |
Starts (or enqueues) a redo.
This should not be re-implemented by children.
References asyncRedo(), bestText(), dependsOn(), finished(), imageList(), isFinished(), isRedoing(), isRedone(), isUndoing(), previous(), project(), statusChanged(), syncRedo(), and WorkOrderRedoing.
void Isis::WorkOrder::save | ( | QXmlStreamWriter & | stream | ) | const |
Output XML format:
<workOrder actiontext="..." undotext="..." type="..." status="..."> <images> <image id="..."> </images>
<internalDataValues> <dataValue value="..."> </internalDataValues> </workOrder>
References _FILEINFO_, bestText(), NoContext, toString(), and Isis::IException::Unknown.
|
protected |
Declare that this work order is saving the project.
This makes the work order not appear in the undo stack (cannot undo/redo), and instead is marked as a 'clean' state of the project. The QUndoCommand undo/redo will never be called. The default for createsCleanState is false.
createsCleanState | True if this work order is going to save the project to disk |
References createsCleanState().
Referenced by Isis::OpenProjectWorkOrder::OpenProjectWorkOrder(), Isis::SaveProjectAsWorkOrder::SaveProjectAsWorkOrder(), and Isis::SaveProjectWorkOrder::SaveProjectWorkOrder().
|
virtual |
|
virtual |
Reimplemented in Isis::ImageListActionWorkOrder.
|
protected |
Referenced by Isis::ExportControlNetWorkOrder::execute(), Isis::ExportImagesWorkOrder::execute(), Isis::CubeViewportViewWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::RenameProjectWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::execute(), Isis::ImportControlNetWorkOrder::execute(), Isis::ImportImagesWorkOrder::execute(), Isis::ImageListActionWorkOrder::execute(), Isis::ImageListActionWorkOrder::ImageListActionWorkOrder(), Isis::MosaicSceneWorkOrder::MosaicSceneWorkOrder(), Isis::RenameProjectWorkOrder::RenameProjectWorkOrder(), Isis::MosaicSceneWorkOrder::storeZPositions(), Isis::ImageListActionWorkOrder::syncRedo(), and Isis::ImageListActionWorkOrder::syncUndo().
|
protected |
void Isis::WorkOrder::setNext | ( | WorkOrder * | nextWorkOrder | ) |
Referenced by Isis::Project::addToProject().
void Isis::WorkOrder::setPrevious | ( | WorkOrder * | previousWorkOrder | ) |
Referenced by Isis::Project::addToProject().
|
protected |
Referenced by Isis::ExportImagesWorkOrder::asyncRedo(), and Isis::ImportControlNetWorkOrder::asyncRedo().
|
protected |
Referenced by Isis::ExportImagesWorkOrder::asyncRedo(), and Isis::ImportControlNetWorkOrder::asyncRedo().
|
signal |
QString Isis::WorkOrder::statusText | ( | ) | const |
References toString().
|
protectedvirtual |
This method is designed to be implemented by children work orders.
The order of execution for redo is: syncRedo() - GUI thread* asyncRedo() - Pooled thread postSyncRedo() - GUI thread
State should only be read from the parent WorkOrder class in this method. You can set state to be used in asyncRedo() and postSyncRedo() safely. This method is always executed in the GUI thread and has no progress.
Reimplemented in Isis::ImageListActionWorkOrder, Isis::ImportControlNetWorkOrder, Isis::RenameProjectWorkOrder, Isis::ImageFileListViewWorkOrder, Isis::CubeViewportViewWorkOrder, Isis::Footprint2DViewWorkOrder, Isis::CnetEditorViewWorkOrder, Isis::MoveDownOneSceneWorkOrder, Isis::MoveToBottomSceneWorkOrder, Isis::MoveToTopSceneWorkOrder, and Isis::MoveUpOneSceneWorkOrder.
Referenced by redo().
|
protectedvirtual |
This method is designed to be implemented by children work orders.
The order of execution for undo is: syncUndo() - GUI thread* asyncUndo() - Pooled thread postSyncUndo() - GUI thread
State should only be read from the parent WorkOrder class in this method. You can set state to be used in asyncUndo() and postSyncUndo() safely. This method is always executed in the GUI thread and has no progress.
Reimplemented in Isis::ImageListActionWorkOrder, Isis::ImportControlNetWorkOrder, Isis::RenameProjectWorkOrder, Isis::ImageFileListViewWorkOrder, Isis::CubeViewportViewWorkOrder, Isis::Footprint2DViewWorkOrder, Isis::CnetEditorViewWorkOrder, Isis::MoveDownOneSceneWorkOrder, Isis::MoveToBottomSceneWorkOrder, Isis::MoveToTopSceneWorkOrder, and Isis::MoveUpOneSceneWorkOrder.
Referenced by undo().
|
static |
References WorkOrderFinished, WorkOrderNotStarted, WorkOrderRedoing, WorkOrderRedone, WorkOrderUndoing, WorkOrderUndone, and WorkOrderUnknownStatus.
Referenced by fromStatusString(), save(), and statusText().
|
virtualslot |
Starts (or enqueues) an undo.
This should not be re-implemented by children.
References asyncUndo(), bestText(), finished(), isFinished(), isRedoing(), isUndoing(), isUndone(), next(), statusChanged(), syncUndo(), WorkOrderNotStarted, and WorkOrderUndoing.