return;
}
}
}
FlowContainer flow = null;
try {
if (aCasReferenceId != null) {
try {
// Check if a Flow object has been previously generated for the Cas.
if (flowMap.containsKey(aCasReferenceId)) {
if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINEST)) {
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
"process", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
"UIMAEE_retrieve_flow_object__FINEST",
new Object[] { getComponentName(), aCasReferenceId });
}
flow = (FlowContainer) flowMap.get(aCasReferenceId);
if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINEST)) {
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
"process", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
"UIMAEE_retrieved_flow_object_ok__FINEST",
new Object[] { getComponentName(), aCasReferenceId });
}
} else {
if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINEST)) {
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
"process", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
"UIMAEE_new_flow_object__FINEST", new Object[] { aCasReferenceId });
}
synchronized (flowControllerContainer) {
flow = flowControllerContainer.computeFlow(aCAS);
}
// Save the Flow Object in a cache. Flow exists in the cache
// until the CAS is fully processed or it is
// explicitly deleted when processing of this CAS cannot
// continue
flowMap.put(aCasReferenceId, flow);
// Check if the local cache already contains an entry for the Cas id.
// A colocated Cas Multiplier may have already registered this CAS
// in the parent's controller
if (localCache.lookupEntry(aCasReferenceId) == null) {
// Add this Cas Id to the local cache. Every input CAS goes through here
localCache.createCasStateEntry(aCasReferenceId);
}
}
} catch (Exception ex) {
// Any error here is automatic termination
if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
"process", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
"UIMAEE_exception__WARNING", new Object[] { ex });
}
sendReplyWithShutdownException(aCasReferenceId);
handleAction(ErrorHandler.TERMINATE, null, null);
return;
}
if (!isStopped()) {
if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINEST)) {
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
"process", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
"UIMAEE_executing_step_input_cas__FINEST",
new Object[] { getComponentName(), aCasReferenceId });
}
// Execute a step in the flow. false means that this CAS has not
// been produced by CAS Multiplier
executeFlowStep(flow, aCasReferenceId, false);
} else {
synchronized (flowControllerContainer) {
flow.aborted();
}
}
}
} catch (Exception e) {
HashMap map = new HashMap();