@Override public String toString() { return "Dataflow " + getLocalName() + "[" + getIdentifier() + "]"; }
public void fire(String owningProcess, InvocationContext context) { String newOwningProcess = owningProcess + ":" + getLocalName(); if (tokenReceived(newOwningProcess, context)) { // This is not good - should ideally handle it as it means the // workflow has been fired when in a state where this wasn't // sensible, i.e. already having been fired on this process // identifier. For now we'll ignore it (ho hum, release deadline // etc!) } // The code below now happens in the tokenReceived method, we need to // fire any processors which don't have dependencies when a new token // arrives and we weren't doing that anywhere. /** * for (Processor p : getEntities(Processor.class)) { if * (p.getInputPorts().isEmpty()) { p.fire(newOwningProcess, context); } } */ }
public void fire(String owningProcess, InvocationContext context) { String newOwningProcess = owningProcess + ":" + getLocalName(); if (tokenReceived(newOwningProcess, context)) { // This is not good - should ideally handle it as it means the // workflow has been fired when in a state where this wasn't // sensible, i.e. already having been fired on this process // identifier. For now we'll ignore it (ho hum, release deadline // etc!) } // The code below now happens in the tokenReceived method, we need to // fire any processors which don't have dependencies when a new token // arrives and we weren't doing that anywhere. /** * for (Processor p : getEntities(Processor.class)) { if * (p.getInputPorts().isEmpty()) { p.fire(newOwningProcess, context); } } */ }
public void fire(String owningProcess, InvocationContext context) { String newOwningProcess = owningProcess + ":" + getLocalName(); if (tokenReceived(newOwningProcess, context)) { // This is not good - should ideally handle it as it means the // workflow has been fired when in a state where this wasn't // sensible, i.e. already having been fired on this process // identifier. For now we'll ignore it (ho hum, release deadline // etc!) } // The code below now happens in the tokenReceived method, we need to // fire any processors which don't have dependencies when a new token // arrives and we weren't doing that anywhere. /** * for (Processor p : getEntities(Processor.class)) { if * (p.getInputPorts().isEmpty()) { p.fire(newOwningProcess, context); } } */ }
@Ignore("Integration test") @Test public void translateAndValidateTest() throws Exception { DataflowImpl dataflow = (DataflowImpl) translateScuflFile("ModifiedBiomartAndEMBOSSAnalysis.xml"); assertEquals("the name should have been transferred during the translation","BiomartAndEMBOSSAnalysis",dataflow.getLocalName()); DataflowValidationReport report = dataflow.checkValidity(); for (TokenProcessingEntity unsatisfiedProcessor : report.getUnsatisfiedEntities()) { System.out.println(unsatisfiedProcessor.getLocalName()); } assertTrue(report.getUnsatisfiedEntities().size() == 0); for (TokenProcessingEntity failedProcessor : report.getFailedEntities()) { System.out.println(failedProcessor.getLocalName()); } assertTrue(report.getFailedEntities().size() == 0); for (DataflowOutputPort unresolvedOutput : report .getUnresolvedOutputs()) { System.out.println(unresolvedOutput.getName()); } assertTrue(report.getUnresolvedOutputs().size() == 0); }
@Ignore("Integration test") @Test public void translateAndValidateTest() throws Exception { DataflowImpl dataflow = (DataflowImpl) translateScuflFile("ModifiedBiomartAndEMBOSSAnalysis.xml"); assertEquals("the name should have been transferred during the translation","BiomartAndEMBOSSAnalysis",dataflow.getLocalName()); DataflowValidationReport report = dataflow.checkValidity(); for (TokenProcessingEntity unsatisfiedProcessor : report.getUnsatisfiedEntities()) { System.out.println(unsatisfiedProcessor.getLocalName()); } assertTrue(report.getUnsatisfiedEntities().size() == 0); for (TokenProcessingEntity failedProcessor : report.getFailedEntities()) { System.out.println(failedProcessor.getLocalName()); } assertTrue(report.getFailedEntities().size() == 0); for (DataflowOutputPort unresolvedOutput : report .getUnresolvedOutputs()) { System.out.println(unresolvedOutput.getName()); } assertTrue(report.getUnresolvedOutputs().size() == 0); }