public abstract class JbiConsequence implements Consequence {
public void invoke(Tuple tuple) throws ConsequenceException {
JbiHelper helper = (JbiHelper) tuple.getWorkingMemory().getApplicationData("jbi");
if (helper == null) {
throw new ConsequenceException("No 'jbi' application data available");
}
try {
invokeJbiOperation(helper, tuple);
}
catch (MessagingException e) {
throw new ConsequenceException(e);
}
}