Skip to content

Commit

Permalink
fmk - updating WorkflowApp
Browse files Browse the repository at this point in the history
  • Loading branch information
fmckenna committed Oct 7, 2024
1 parent 95acc82 commit 4d2c881
Showing 1 changed file with 30 additions and 11 deletions.
41 changes: 30 additions & 11 deletions WorkflowAppWE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include <EmptyDomainCFD/EmptyDomainCFD.h>
#include <IsolatedBuildingCFD/IsolatedBuildingCFD.h>
#include <Utils/FileOperations.h>
#include <FronteraMachine.h>

// static pointer for global procedure set in constructor
static WorkflowAppWE *theApp = 0;
Expand Down Expand Up @@ -126,9 +127,10 @@ WorkflowAppWE::WorkflowAppWE(RemoteService *theService, QWidget *parent)
theUQ_Selection = new UQ_EngineSelection(ForwardReliabilitySensitivitySurrogate);
theResults = theUQ_Selection->getResults();

TapisMachine *theMachine = new FronteraMachine();

localApp = new LocalApplication("sWHALE.py");
remoteApp = new RemoteApplication("sWHALE.py", theService);

remoteApp = new RemoteApplication("sWHALE.py", theService, theMachine, nullptr);

//QStringList filesToDownload; filesToDownload << "inputRWHALE.json" << "input_data.zip" << "Results.zip";
theJobManager = new RemoteJobManager(theService);
Expand All @@ -145,25 +147,42 @@ WorkflowAppWE::WorkflowAppWE(RemoteService *theService, QWidget *parent)
currentApp = localApp;
setUpForApplicationRun(workingDir, subDir);
});

connect(this,SIGNAL(setUpForApplicationRunDone(QString&, QString &)), theRunWidget, SLOT(setupForRunApplicationDone(QString&, QString &)));
connect(localApp,SIGNAL(processResults(QString&)), this, SLOT(processResults(QString&)));

connect(localApp,SIGNAL(runComplete()), this, SLOT(runComplete()));
connect(localApp,SIGNAL(sendErrorMessage(QString)),
this,SLOT(errorMessage(QString)));
connect(localApp,SIGNAL(sendStatusMessage(QString)),
this,SLOT(statusMessage(QString)));
connect(localApp,SIGNAL(sendFatalMessage(QString)),
this,SLOT(fatalMessage(QString)));

connect(remoteApp, &Application::setupForRun, this, [this](QString &workingDir, QString &subDir)
{
currentApp = remoteApp;
setUpForApplicationRun(workingDir, subDir);
});
connect(theJobManager,SIGNAL(processResults(QString&)), this, SLOT(processResults(QString&)));
connect(theJobManager,SIGNAL(loadFile(QString&)), this, SLOT(loadFile(QString&)));

connect(remoteApp,SIGNAL(successfullJobStart()), theRunWidget, SLOT(hide()));

connect(localApp,SIGNAL(runComplete()), this, SLOT(runComplete()));
connect(remoteApp,SIGNAL(successfullJobStart()), this, SLOT(runComplete()));
connect(theService, SIGNAL(closeDialog()), this, SLOT(runComplete()));
connect(remoteApp,SIGNAL(sendErrorMessage(QString)),
this,SLOT(errorMessage(QString)));
connect(remoteApp,SIGNAL(sendStatusMessage(QString)),
this,SLOT(statusMessage(QString)));
connect(remoteApp,SIGNAL(sendFatalMessage(QString)),
this,SLOT(fatalMessage(QString)));

connect(theJobManager,SIGNAL(processResults(QString&)), this, SLOT(processResults(QString&)));
connect(theJobManager,SIGNAL(loadFile(QString&)), this, SLOT(loadFile(QString&)));
connect(theJobManager, SIGNAL(closeDialog()), this, SLOT(runComplete()));
connect(theJobManager,SIGNAL(sendErrorMessage(QString)),
this,SLOT(errorMessage(QString)));
connect(theJobManager,SIGNAL(sendStatusMessage(QString)),
this,SLOT(statusMessage(QString)));
connect(theJobManager,SIGNAL(sendFatalMessage(QString)),
this,SLOT(fatalMessage(QString)));

connect(this,SIGNAL(setUpForApplicationRunDone(QString&, QString &)), theRunWidget, SLOT(setupForRunApplicationDone(QString&, QString &)));

connect(theService, SIGNAL(closeDialog()), this, SLOT(runComplete()));

// SY connect queryEVT and the reply
connect(theUQ_Selection, SIGNAL(queryEVT()), theEventSelection, SLOT(replyEventType()));
Expand Down

0 comments on commit 4d2c881

Please sign in to comment.