Преглед изворни кода

Fix bug of missing trailing VoiceCall status updates to portal.

Reason is due to premature terminating postback threads because
the serviceActivityCount is decremented erreously when updating
intermediate job statuses with portal.
Fix is in classifying job status as final or non-final.
As it is, all JobStatus in CommEngine are final; however,
derived classes may have non-final JobStatus.
tags/1.0.26
ymlam пре 2 година
родитељ
комит
fba1269d2d
2 измењених фајлова са 16 додато и 1 уклоњено
  1. +1
    -1
      src/main/java/altk/comm/engine/Broadcast.java
  2. +15
    -0
      src/main/java/altk/comm/engine/Job.java

+ 1
- 1
src/main/java/altk/comm/engine/Broadcast.java Прегледај датотеку

@@ -1266,7 +1266,7 @@ public abstract class Broadcast
report.initBase(job, broadcastId, launchRecordId, activityRecordIdParamName, jobReportRootNodeName);
report.init(job);
postback.queueReport(report.toString());
updateServiceActivityCount(-1);
if (job.statusIsFinal()) updateServiceActivityCount(-1);
}
}


+ 15
- 0
src/main/java/altk/comm/engine/Job.java Прегледај датотеку

@@ -1,5 +1,7 @@
package altk.comm.engine;

import altk.comm.engine.Job.CommJobStatus;

/**
* Derived classes may add more class attributes, e.g. list of phone numbers, call status.
* @author Yuk-Ming
@@ -81,5 +83,18 @@ public class Job
{
return false;
}
/**
* Derived class must augment this method to handle its own JobStatus
*/
protected boolean statusIsFinal() {
if (jobStatus instanceof CommJobStatus)
{
return true;
}
throw new IllegalArgumentException("Job status is not a CommJobStatus");
}



}

Loading…
Откажи
Сачувај