addStudy method
Add a study which needs to be executed on this client.
No deployment is attempted yet.
If a study with the same deployment id and device role name has already
been added to this client, it is not added again and no status is fetched.
The study passed in is returned, which can be a different instance from
the one already stored.
Throws NotConfiguredException if the client has not yet been configured. Returns the study added to this client manager or the existing study if it was already added.
Implementation
@mustCallSuper
Future<TStudy> addStudy(TStudy study) async {
_checkConfiguration();
if (!repository.hasStudy(study)) {
repository.addStudy(study);
// Update study status based on deployment status
await proxy?.getStudyDeploymentStatus(study);
}
return study;
}