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
| @@ -1266,7 +1266,7 @@ public abstract class Broadcast | |||||
| report.initBase(job, broadcastId, launchRecordId, activityRecordIdParamName, jobReportRootNodeName); | report.initBase(job, broadcastId, launchRecordId, activityRecordIdParamName, jobReportRootNodeName); | ||||
| report.init(job); | report.init(job); | ||||
| postback.queueReport(report.toString()); | postback.queueReport(report.toString()); | ||||
| updateServiceActivityCount(-1); | |||||
| if (job.statusIsFinal()) updateServiceActivityCount(-1); | |||||
| } | } | ||||
| } | } | ||||
| @@ -1,5 +1,7 @@ | |||||
| package altk.comm.engine; | 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. | * Derived classes may add more class attributes, e.g. list of phone numbers, call status. | ||||
| * @author Yuk-Ming | * @author Yuk-Ming | ||||
| @@ -81,5 +83,18 @@ public class Job | |||||
| { | { | ||||
| return false; | 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"); | |||||
| } | |||||
| } | } | ||||