only two methods I have created,it calls succesfully 'startATest' method and it never calls 'confirmStoreCode' method.
@Controller(pattern = "(start a test)", next = "confirmStoreCode",events = { EventType.DIRECT_MESSAGE})
public void startATest(WebSocketSession session, Event event) {
try {
reply(session, event, new Message("Cool! Currently I can run test suite for a Store code, please tell me the Store Code."));
startConversation(event, "confirmStoreCode"); // start conversation
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@Controller
public void confirmStoreCode(WebSocketSession session, Event event) {
logger.info("Job confirmStoreCode");
try {
String storeCode = CommonHelper.toString(event.getText()).trim().toUpperCase();
List<GenericTestCase> testCases = testCase.findByStoreCode(storeCode);
// testCases = testCases.subList(0, 2);
if (testCases.size()>0) {
reply(session, event, new Message("Your Store Code " + event.getText() +
"Found test cases. Would you like to run it?"));
} else {
reply(session, event, new Message("Sorry no test case found" + event.getText()));
stopConversation(event);
}
nextConversation(event);
} catch (Exception e) {
logger.error("Exception in completing the test suite", e);
reply(session, event, new Message("Your meeting is set at " + event.getText() +
". Would you like to repeat it tomorrow?"));
}
}
only two methods I have created,it calls succesfully 'startATest' method and it never calls 'confirmStoreCode' method.