private function onBusinessProcessStart(BatchJob $dbBatchJob, kBusinessProcessNotificationDispatchJobData $data)
 {
     $object = $data->getObject();
     $template = EventNotificationTemplatePeer::retrieveByPK($data->getTemplateId());
     if ($template instanceof BusinessProcessNotificationTemplate) {
         $caseId = $data->getCaseId();
         $template->addCaseId($object, $caseId);
     }
     return true;
 }
 public function getJobData(kScope $scope = null)
 {
     $jobData = new kBusinessProcessNotificationDispatchJobData();
     $jobData->setTemplateId($this->getId());
     $jobData->setServerId($this->getServerId());
     $contentParametersValues = array();
     $contentParameters = $this->getContentParameters();
     foreach ($contentParameters as $contentParameter) {
         /* @var $contentParameter kEventNotificationParameter */
         $value = $contentParameter->getValue();
         if ($scope && $value instanceof kStringField) {
             $value->setScope($scope);
         }
         $contentParametersValues[$contentParameter->getKey()] = $value->getValue();
     }
     $userParameters = $this->getUserParameters();
     foreach ($userParameters as $userParameter) {
         /* @var $userParameter kEventNotificationParameter */
         $value = $userParameter->getValue();
         if ($scope && $value instanceof kStringField) {
             $value->setScope($scope);
         }
         $contentParametersValues[$userParameter->getKey()] = $value->getValue();
     }
     $jobData->setContentParameters($contentParametersValues);
     if ($scope instanceof kEventScope) {
         $object = $scope->getObject();
         $jobData->setObject($object);
     }
     return $jobData;
 }