Skip to content

Commit

Permalink
adding requestId to sample update message
Browse files Browse the repository at this point in the history
Signed-off-by: Divya Madala <71040191+divyamadala30@users.noreply.github.com>
  • Loading branch information
divyamadala30 committed Nov 30, 2022
1 parent 2028204 commit e11b766
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.Phaser;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.mskcc.cmo.messaging.Gateway;
Expand Down Expand Up @@ -583,6 +585,12 @@ public void onMessage(Message msg, Object message) {
String.class);
SampleMetadata sampleMetadata =
mapper.readValue(sampleMetadataJson, SampleMetadata.class);
if (StringUtils.isEmpty(sampleMetadata.getIgoRequestId())) {
String requestId = ObjectUtils.firstNonNull(
sampleMetadata.getAdditionalProperties().get("requestId"),
sampleMetadata.getAdditionalProperties().get("igoRequestId"));
sampleMetadata.setIgoRequestId(requestId);
}
messageHandlingService.cmoSampleLabelUpdateHandler(sampleMetadata);
} catch (Exception e) {
e.printStackTrace();
Expand Down

0 comments on commit e11b766

Please sign in to comment.