On 7/3/07, Benjamin Sznajder <[EMAIL PROTECTED]> wrote:
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; }
The newCasProduced method needs to be added to the WhiteboardFlow class, not that WhiteboardFlowController class. Otherwise it looks like what you are doing is right. The idea behind this is that the Flow of the new CAS might be related to the Flow of its "parent" CAS (the one that was input to the CAS Multiplier). You are right though that the documentation on this could be better. -Adam
