return;
}
Object timer = ((Object[])info.state())[0];
timerHandler().removeTimer (timer);
ActivityUniqueKey auk = info.activityUniqueKey();
Activity act = null;
try {
act = toolAgentContext().lookupActivity(auk);
} catch (InvalidKeyException e) {
logger.warn (auk + " is unknown, cannot cancel wait tool.");
return;
}
ProcessData res = new DefaultProcessData ();
String resParam = (String)((Object[])info.state())[1];
res.put (resParam, "CANCELED");
try {
act.setResult (res);
act.complete ();
if (logger.isDebugEnabled ()) {
logger.debug ("Timer application " + applId + " canceled, "
+ auk + " completed");
}
return;
} catch (InvalidDataException e) {
logger.error
("Cannot set \"status\" out parameter of "
+ "wait tool. Propably wrong declaration. "
+ auk + " will be terminated.");
} catch (CannotCompleteException e) {
logger.error ("Cannot complete " + auk
+ " (will be terminated): " + e.getMessage ());
}
if (act.typedState().workflowState() == State.OPEN) {
try {
act.terminate ();
} catch (CannotStopException e) {
logger.error
("Cannot terminate " + auk + ": " + e.getMessage ());
} catch (NotRunningException e) {
logger.debug (auk + " not running although state is open?");