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); } } */ }
/** * Receive an input event, relay it through the internal output port to all * connected entities */ public void receiveEvent(WorkflowDataToken t) { WorkflowDataToken transformedToken = t.pushOwningProcess(dataflow.getLocalName()); // I'd rather avoid casting to the implementation but in this // case we're in the same package - the only reason to do this // is to allow dummy implementations of parts of this // infrastructure during testing, in 'real' use this should // always be a dataflowimpl if (dataflow instanceof DataflowImpl) { ((DataflowImpl) dataflow).tokenReceived(transformedToken .getOwningProcess(), t.getContext()); } for (Datalink dl : internalOutput.getOutgoingLinks()) { dl.getSink().receiveEvent(transformedToken); } }
/** * Receive an input event, relay it through the internal output port to all * connected entities */ public void receiveEvent(WorkflowDataToken t) { WorkflowDataToken transformedToken = t.pushOwningProcess(dataflow.getLocalName()); // I'd rather avoid casting to the implementation but in this // case we're in the same package - the only reason to do this // is to allow dummy implementations of parts of this // infrastructure during testing, in 'real' use this should // always be a dataflowimpl if (dataflow instanceof DataflowImpl) { ((DataflowImpl) dataflow).tokenReceived(transformedToken .getOwningProcess(), t.getContext()); } for (Datalink dl : internalOutput.getOutgoingLinks()) { dl.getSink().receiveEvent(transformedToken); } }
/** * Receive an input event, relay it through the internal output port to all * connected entities */ public void receiveEvent(WorkflowDataToken t) { WorkflowDataToken transformedToken = t.pushOwningProcess(dataflow.getLocalName()); // I'd rather avoid casting to the implementation but in this // case we're in the same package - the only reason to do this // is to allow dummy implementations of parts of this // infrastructure during testing, in 'real' use this should // always be a dataflowimpl if (dataflow instanceof DataflowImpl) { ((DataflowImpl) dataflow).tokenReceived(transformedToken .getOwningProcess(), t.getContext()); } for (Datalink dl : internalOutput.getOutgoingLinks()) { dl.getSink().receiveEvent(transformedToken); } }