public boolean validate()
{
boolean ret = true;
BatchJob batchJob;
Batch batch;
select firstOnly batchJob
join batch
where batch.BatchJobId == batchJob.RecId
&& batch.ClassNumber == className2Id(classStr(Sysopertaioncontrollertest))
&& (batchJob.Status == BatchStatus::Waiting ||
batchJob.Status == BatchStatus::Executing);
if (batchJob)
{
error("This batch job is already running. Please wait for it to finish.");
ret = false;
}
return ret;
}
No comments:
Post a Comment