Fix fetchEvent function to fetch by event topic

Change-Id: I8b08367a24ad61b4d805562412de2f70754d40cd
diff --git a/package.json b/package.json
index c575553..22e400c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
     "name": "cord_workflow_controller",
-    "version": "0.5.1",
+    "version": "0.5.2",
     "description": "CORD Workflow Controller",
     "main": "src/server.js",
     "scripts": {
diff --git a/src/controllers/eventrouter.js b/src/controllers/eventrouter.js
index 6cad7a3..5469fc2 100644
--- a/src/controllers/eventrouter.js
+++ b/src/controllers/eventrouter.js
@@ -378,7 +378,7 @@
 
         logger.log('debug', `workflow run ${workflowRunId}, task ${taskId} fetches an event`);
 
-        let event = workflowRun.dequeueEvent(topic);
+        let event = workflowRun.dequeueEventByTopic(topic);
         if(event) {
             return event;
         }