31 lines
748 B
C++
Executable File
31 lines
748 B
C++
Executable File
|
|
#include <wfr/common/wfs/instances/AtomicActivityInstance.h>
|
|
#include <wfr/common/wfs/templates/AtomicActivityTemplate.h>
|
|
#include <wfr/common/wfs/Activity.h>
|
|
|
|
|
|
namespace wfr {
|
|
namespace wfs {
|
|
|
|
bool AtomicActivityInstance::executePreExecutionHooks(bool earlyEvaluation) {
|
|
bool retval = false;
|
|
if (getInstanceStatus() == ActivityInstanceStatus::Initialized) {
|
|
setInstanceStatus(ActivityInstanceStatus::WaitingForData);
|
|
}
|
|
auto& templ = baseActivity.baseTemplate.as<AtomicActivityTemplate>();
|
|
if (templ.inputFuncHook != nullptr) {
|
|
retval = templ.inputFuncHook(*this);
|
|
} else {
|
|
allInputsAvailable = true;
|
|
setInstanceStatus(ActivityInstanceStatus::ReadyForExecution);
|
|
}
|
|
return retval;
|
|
}
|
|
|
|
} /* namespace wfs */
|
|
} /* namespace wfr */
|
|
|
|
|
|
|
|
|