});
experimentMonitor.startMonitoring();
try {
WorkflowExecutionStatus workflowInstanceStatus = getClient().getProvenanceManager().getWorkflowInstanceStatus(experimentId, experimentId);
if (workflowInstanceStatus.getExecutionStatus()==State.FINISHED || workflowInstanceStatus.getExecutionStatus()==State.FAILED){
experimentMonitor.stopMonitoring();
return;
}
} catch (AiravataAPIInvocationException e) {
//Workflow may not have started yet. Best to use the monitor to follow the progress
}