@Override public String closeCurrentDialog() { if (!isStarted) return "The tester is not started"; MAPDialogMobility curDialog = currentDialog; if (curDialog != null) { try { MAPUserAbortChoice choice = new MAPUserAbortChoiceImpl(); choice.setUserSpecificReason(); curDialog.abort(choice); this.doRemoveDialog(); return "The current dialog has been closed"; } catch (MAPException e) { this.doRemoveDialog(); return "Exception when closing the current dialog: " + e.toString(); } } else { return "No current dialog"; } }
@Override public String closeCurrentDialog() { if (!isStarted) return "The tester is not started"; if (this.sender != null) return "The tester is not in a manual mode"; MAPDialogMobility curDialog = currentDialog; if (curDialog != null) { try { MAPUserAbortChoice choice = new MAPUserAbortChoiceImpl(); choice.setUserSpecificReason(); curDialog.abort(choice); this.doRemoveDialog(); return "The current dialog has been closed"; } catch (MAPException e) { this.doRemoveDialog(); return "Exception when closing the current dialog: " + e.toString(); } } else { return "No current dialog"; } }
@Override public String closeCurrentDialog() { if (!isStarted) return "The tester is not started"; if (this.sender != null) return "The tester is not in a manual mode"; MAPDialogSupplementary curDialog = currentDialog; if (curDialog != null) { try { MAPUserAbortChoice choice = new MAPUserAbortChoiceImpl(); choice.setUserSpecificReason(); curDialog.abort(choice); this.doRemoveDialog(); return "The current dialog has been closed"; } catch (MAPException e) { this.doRemoveDialog(); return "Exception when closing the current dialog: " + e.toString(); } } else { return "No current dialog"; } }
private void endActivity(MAPDialogWrapper mapDialog) { if (tracer.isFineEnabled()) tracer.fine("endActivity:" + mapDialog); MAPDialogActivityHandle mapDialogActHndl = mapDialog.getActivityHandle(); if (mapDialogActHndl == null) { if (this.tracer.isWarningEnabled()) { this.tracer.warning("Activity ended but no MAPDialogActivityHandle found for Dialog ID, ignoring " + mapDialog.getLocalDialogId()); } } else { try { MAPUserAbortChoice ach = this.realProvider.getMAPParameterFactory().createMAPUserAbortChoice(); ach.setUserSpecificReason(); mapDialog.abort(ach); } catch (MAPException e) { tracer.warning("Cannot abort dialog ", e); } this.sleeEndpoint.endActivity(mapDialogActHndl); if (tracer.isFineEnabled()) this.tracer.fine("Activity marked to be ended:" + mapDialog.getLocalDialogId()); } }