Omaha #4562 : Update AutoFaxManager to log messages for each fax
Change-Id: I83f9fd4869ef47bc3bbb5b31a520d0df8469bdbd Former-commit-id: ef8d57fae56e7671670095fcac41a440b1820659
This commit is contained in:
parent
f02624313d
commit
24332e2e48
2 changed files with 22 additions and 22 deletions
|
@ -12,7 +12,7 @@
|
||||||
<property name="type" value="timer" />
|
<property name="type" value="timer" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<camelContext id="clustered-text-subscription-camel"
|
<camelContext id="text-subscription-camel"
|
||||||
xmlns="http://camel.apache.org/schema/spring"
|
xmlns="http://camel.apache.org/schema/spring"
|
||||||
errorHandlerRef="errorHandler">
|
errorHandlerRef="errorHandler">
|
||||||
|
|
||||||
|
|
|
@ -71,10 +71,8 @@ public class AutoFaxManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void processEvent(Object event) throws EdexException {
|
public void processEvent(PluginDataObject[] pdos) throws EdexException {
|
||||||
List<String> trigger = new ArrayList<String>();
|
List<String> trigger = new ArrayList<String>();
|
||||||
if (event instanceof PluginDataObject[]) {
|
|
||||||
PluginDataObject[] pdos = (PluginDataObject[]) event;
|
|
||||||
for (PluginDataObject pdo : pdos) {
|
for (PluginDataObject pdo : pdos) {
|
||||||
try {
|
try {
|
||||||
if (pdo instanceof TextRecord) {
|
if (pdo instanceof TextRecord) {
|
||||||
|
@ -82,8 +80,7 @@ public class AutoFaxManager {
|
||||||
String prodID = tr.getProductId();
|
String prodID = tr.getProductId();
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug("Processing trigger: " + prodID
|
logger.debug("Processing trigger: " + prodID
|
||||||
+ ", class = "
|
+ ", class = " + pdo.getClass().getSimpleName());
|
||||||
+ pdo.getClass().getSimpleName());
|
|
||||||
}
|
}
|
||||||
trigger.add(prodID);
|
trigger.add(prodID);
|
||||||
}
|
}
|
||||||
|
@ -92,7 +89,6 @@ public class AutoFaxManager {
|
||||||
+ pdo.toString() + "] skipping...");
|
+ pdo.toString() + "] skipping...");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
sendFaxes(trigger);
|
sendFaxes(trigger);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,10 +109,14 @@ public class AutoFaxManager {
|
||||||
// Shove it out to all the autofax subscribers to this
|
// Shove it out to all the autofax subscribers to this
|
||||||
// PIL.
|
// PIL.
|
||||||
try {
|
try {
|
||||||
FaxSender.sendFax(faxRecord.getCompany(), faxRecord
|
logger.info("Sending fax to '"
|
||||||
.getId().getFaxNumber(), faxRecord
|
+ faxRecord.getCompany()
|
||||||
.getRecipient(), faxText, faxRecord.getId()
|
+ "' for AFOS PIL: " + afosPil);
|
||||||
.getAfosPil());
|
String status = FaxSender.sendFax(faxRecord
|
||||||
|
.getCompany(), faxRecord.getId()
|
||||||
|
.getFaxNumber(), faxRecord.getRecipient(),
|
||||||
|
faxText, faxRecord.getId().getAfosPil());
|
||||||
|
logger.info(status);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.warn("Error sending fax for AFOS PIL: "
|
logger.warn("Error sending fax for AFOS PIL: "
|
||||||
+ afosPil);
|
+ afosPil);
|
||||||
|
|
Loading…
Add table
Reference in a new issue