diff --git a/src/TaskManager/Plug-ins/AideClinicalReview/AideClinicalReviewPlugin.cs b/src/TaskManager/Plug-ins/AideClinicalReview/AideClinicalReviewPlugin.cs index 46273179a..bd6fe0d54 100644 --- a/src/TaskManager/Plug-ins/AideClinicalReview/AideClinicalReviewPlugin.cs +++ b/src/TaskManager/Plug-ins/AideClinicalReview/AideClinicalReviewPlugin.cs @@ -88,9 +88,13 @@ private void Initialize() _workflowName = Event.TaskPluginArguments[Keys.WorkflowName]; } - if (Event.TaskPluginArguments.ContainsKey(Keys.Notifications)) + if (Boolean.TryParse(Event.TaskPluginArguments[Keys.Notifications], out bool result)) { - _notifications = Boolean.TryParse(Event.TaskPluginArguments[Keys.Notifications], out bool result); + _notifications = result; + } + else + { + _notifications = true; } if (Event.TaskPluginArguments.ContainsKey(Keys.ReviewedExecutionId)) diff --git a/tests/IntegrationTests/TaskManager.IntegrationTests/Support/Assertions.cs b/tests/IntegrationTests/TaskManager.IntegrationTests/Support/Assertions.cs index 9ab70b518..7d1344107 100644 --- a/tests/IntegrationTests/TaskManager.IntegrationTests/Support/Assertions.cs +++ b/tests/IntegrationTests/TaskManager.IntegrationTests/Support/Assertions.cs @@ -40,12 +40,11 @@ public void AssertClinicalReviewEvent(ClinicalReviewRequestEvent clinicalReviewR clinicalReviewRequestEvent.PatientMetadata.PatientName.Should().Be(GetTaskPluginArguments(taskDispatchEvent, "patient_name")); clinicalReviewRequestEvent.PatientMetadata.PatientSex.Should().Be(GetTaskPluginArguments(taskDispatchEvent, "patient_sex")); clinicalReviewRequestEvent.PatientMetadata.PatientDob.Should().Be(GetTaskPluginArguments(taskDispatchEvent, "patient_dob")); - try + if (Boolean.TryParse(GetTaskPluginArguments(taskDispatchEvent, "notifications"), out bool result)) { - var notifications = GetTaskPluginArguments(taskDispatchEvent, "notifications"); - + clinicalReviewRequestEvent.Notifications.Should().Be(result); } - catch (Exception ex) + else { clinicalReviewRequestEvent.Notifications.Should().Be(true); }