addStudy method

  1. @mustCallSuper
Future<TStudy> addStudy(
  1. TStudy study
)

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, nothing happens and this study is returned.

Throws NotConfiguredException if the client has not yet been configured. Return the study successfully 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;
}