+ " (no associated activity)");
}
return;
}
resParam = (String)((Object[])applInfo.state())[1];
ActivityLocal act = null;
try {
Long pk = Long.valueOf (auk.activityKey());
act = activityLocalHome().findByPrimaryKey(pk);
} catch (FinderException nex) {
logger.warn (auk + " has disappeared (doing nothing)");
return;
}
if (logger.isDebugEnabled ()) {
logger.debug ("Setting result for " + auk);
}
try {
if (resParam != null) {
ProcessData res = new DefaultProcessData ();
res.put (resParam, "EXPIRED");
act.setResult (res);
}
act.complete ();
if (logger.isDebugEnabled ()) {
logger.debug ("Result set for " + auk + " and completed");
}
return;
} catch (InvalidDataException e) {
logger.error
("Cannot set result of wait tool ("
+ auk + " will be terminated): " + e.getMessage ());
} 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.warn (auk + " not running although state is open?");