Hi,
I just sent this message to the list of user.
I think that the documentation is lacking for this capaiblity, namely Cas
Multiplier WITH a Flow controller.
I think this is a "common task" to wish to join the both, and an example in
the tutorial would be welcome...
Between, some help is of course welcome ;-)
Cheers to all
Benjamin
----- Forwarded by Benjamin Sznajder/Haifa/IBM on 03/07/2007 23:25 -----
Benjamin
Sznajder/Haifa/IB
M To
uima-user
03/07/2007 23:24 cc
Subject
Cas Multiplier with Flow Controller
Hi,
I am trying to run a CAS Multiplier with a Flow Controller.
My CPE is composed of :
- a Collection reader that reads an image and saves in a CAS a byte array
of its content.
- a CAS Multiplier that currently, only creates 3 identical CASes with
same content than the initial
- Some AEs that extract the MPEG7 features of this images
- A CAS consumer that creates the XML File representing the MPEG7.
The Flow Controller I used is the WhiteBoardFlowController from the
example.
I added to this class the following:
protected Flow newCasProduced(CAS newCas,
String producedBy) {
getContext().getLogger().log(Level.SEVERE, "newCasProduced");
WhiteboardFlow flow = new WhiteboardFlow();
flow.setCas(newCas);
return flow;
}
but, when I run my CPE, I get the following error. And apparently, the
method has not been reached since the Log message is not printed....
Jul 3, 2007 11:23:07 PM
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl
processAndOutputNewCASes(267)
SEVERE: Exception occurred
org.apache.uima.analysis_engine.AnalysisEngineProcessException: The Flow
class com.ibm.sapir.flowController.WhiteboardFlowController$WhiteboardFlow
does not support the production of new CASes in the middle of the flow and
so cannot be deployed in an Aggregate AnalysisEngine that includes a CAS
Multiplier component.
at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(
ASB_impl.java:574)
at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(
ASB_impl.java:393)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(
ASB_impl.java:326)
at
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(
AggregateAnalysisEngine_impl.java:259)
at
org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(
AnalysisEngineImplBase.java:202)
at
org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.processNext(
ProcessingUnit.java:1221)
at org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.run(
ProcessingUnit.java:668)
Caused by: org.apache.uima.UIMA_UnsupportedOperationException: The Flow
class com.ibm.sapir.flowController.WhiteboardFlowController$WhiteboardFlow
does not support the production of new CASes in the middle of the flow and
so cannot be deployed in an Aggregate AnalysisEngine that includes a CAS
Multiplier component.
at org.apache.uima.flow.CasFlow_ImplBase.newCasProduced(
CasFlow_ImplBase.java:77)
at org.apache.uima.flow.CasFlow_ImplBase.newCasProduced(
CasFlow_ImplBase.java:54)
at
org.apache.uima.analysis_engine.asb.impl.FlowContainer.newCasProduced(
FlowContainer.java:70)
at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(
ASB_impl.java:525)
... 6 more
org.apache.uima.analysis_engine.AnalysisEngineProcessException: The Flow
class com.ibm.sapir.flowController.WhiteboardFlowController$WhiteboardFlow
does not support the production of new CASes in the middle of the flow and
so cannot be deployed in an Aggregate AnalysisEngine that includes a CAS
Multiplier component.
at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(
ASB_impl.java:574)
at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(
ASB_impl.java:393)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(
ASB_impl.java:326)
at
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(
AggregateAnalysisEngine_impl.java:259)
at
org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(
AnalysisEngineImplBase.java:202)
at
org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.processNext(
ProcessingUnit.java:1221)
at org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.run(
ProcessingUnit.java:668)
Caused by: org.apache.uima.UIMA_UnsupportedOperationException: The Flow
class com.ibm.sapir.flowController.WhiteboardFlowController$WhiteboardFlow
does not support the production of new CASes in the middle of the flow and
so cannot be deployed in an Aggregate AnalysisEngine that includes a CAS
Multiplier component.
at org.apache.uima.flow.CasFlow_ImplBase.newCasProduced(
CasFlow_ImplBase.java:77)
at org.apache.uima.flow.CasFlow_ImplBase.newCasProduced(
CasFlow_ImplBase.java:54)
at
org.apache.uima.analysis_engine.asb.impl.FlowContainer.newCasProduced(
FlowContainer.java:70)
at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(
ASB_impl.java:525)
... 6 more
Jul 3, 2007 11:23:07 PM
org.apache.uima.collection.impl.cpm.engine.ProcessingUnit process
SEVERE: The container AggregateMPEG7Descriptor returned the following error
message: The Flow class
com.ibm.sapir.flowController.WhiteboardFlowController$WhiteboardFlow does
not support the production of new CASes in the middle of the flow and so
cannot be deployed in an Aggregate AnalysisEngine that includes a CAS
Multiplier component. (Thread Name: [Procesing Pipeline#1 Thread]::)
Jul 3, 2007 11:23:07 PM
org.apache.uima.collection.impl.cpm.engine.ProcessingUnit processNext(1338)
SEVERE: [Procesing Pipeline#1 Thread]::
org.apache.uima.analysis_engine.AnalysisEngineProcessException: The Flow
class com.ibm.sapir.flowController.WhiteboardFlowController$WhiteboardFlow
does not support the production of new CASes in the middle of the flow and
so cannot be deployed in an Aggregate AnalysisEngine that includes a CAS
Multiplier component.
at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(
ASB_impl.java:574)
at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(
ASB_impl.java:393)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(
ASB_impl.java:326)
at
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(
AggregateAnalysisEngine_impl.java:259)
at
org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(
AnalysisEngineImplBase.java:202)
at
org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.processNext(
ProcessingUnit.java:1221)
at org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.run(
ProcessingUnit.java:668)
Caused by: org.apache.uima.UIMA_UnsupportedOperationException: The Flow
class com.ibm.sapir.flowController.WhiteboardFlowController$WhiteboardFlow
does not support the production of new CASes in the middle of the flow and
so cannot be deployed in an Aggregate AnalysisEngine that includes a CAS
Multiplier component.
at org.apache.uima.flow.CasFlow_ImplBase.newCasProduced(
CasFlow_ImplBase.java:77)
at org.apache.uima.flow.CasFlow_ImplBase.newCasProduced(
CasFlow_ImplBase.java:54)
at
org.apache.uima.analysis_engine.asb.impl.FlowContainer.newCasProduced(
FlowContainer.java:70)
at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(
ASB_impl.java:525)
... 6 more
org.apache.uima.analysis_engine.AnalysisEngineProcessException: The Flow
class com.ibm.sapir.flowController.WhiteboardFlowController$WhiteboardFlow
does not support the production of new CASes in the middle of the flow and
so cannot be deployed in an Aggregate AnalysisEngine that includes a CAS
Multiplier component.
at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(
ASB_impl.java:574)
at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(
ASB_impl.java:393)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(
ASB_impl.java:326)
at
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(
AggregateAnalysisEngine_impl.java:259)
at
org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(
AnalysisEngineImplBase.java:202)
at
org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.processNext(
ProcessingUnit.java:1221)
at org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.run(
ProcessingUnit.java:668)
Caused by: org.apache.uima.UIMA_UnsupportedOperationException: The Flow
class com.ibm.sapir.flowController.WhiteboardFlowController$WhiteboardFlow
does not support the production of new CASes in the middle of the flow and
so cannot be deployed in an Aggregate AnalysisEngine that includes a CAS
Multiplier component.
at org.apache.uima.flow.CasFlow_ImplBase.newCasProduced(
CasFlow_ImplBase.java:77)
at org.apache.uima.flow.CasFlow_ImplBase.newCasProduced(
CasFlow_ImplBase.java:54)
at
org.apache.uima.analysis_engine.asb.impl.FlowContainer.newCasProduced(
FlowContainer.java:70)
at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(
ASB_impl.java:525)
... 6 more
Jul 3, 2007 11:23:07 PM
org.apache.uima.collection.impl.cpm.container.ProcessingContainer_Impl
process
SEVERE: The CPM stopped because the configured error threshold 0 was
exceeded. (Thread Name: [Procesing Pipeline#1 Thread]::) Component Name:
AggregateMPEG7Descriptor
Jul 3, 2007 11:23:07 PM
org.apache.uima.collection.impl.cpm.engine.ProcessingUnit process