Mercurial > hg > orthanc
diff Core/JobsEngine/GenericJobUnserializer.cpp @ 2666:2540ac79ab6c jobs
SequenceOfOperationsJob serialization
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 08 Jun 2018 15:05:32 +0200 |
parents | a6d3e45eeff5 |
children | d924f9bb61cc |
line wrap: on
line diff
--- a/Core/JobsEngine/GenericJobUnserializer.cpp Fri Jun 08 13:51:31 2018 +0200 +++ b/Core/JobsEngine/GenericJobUnserializer.cpp Fri Jun 08 15:05:32 2018 +0200 @@ -40,6 +40,7 @@ #include "Operations/LogJobOperation.h" #include "Operations/NullOperationValue.h" +#include "Operations/SequenceOfOperationsJob.h" #include "Operations/StringOperationValue.h" namespace Orthanc @@ -48,8 +49,15 @@ { const std::string type = SerializationToolbox::ReadString(source, "Type"); - LOG(ERROR) << "Cannot unserialize job of type: " << type; - throw OrthancException(ErrorCode_BadFileFormat); + if (type == "SequenceOfOperations") + { + return new SequenceOfOperationsJob(*this, source); + } + else + { + LOG(ERROR) << "Cannot unserialize job of type: " << type; + throw OrthancException(ErrorCode_BadFileFormat); + } }