<commit_before><?php
/**
 * @package plugins.businessProcessNotification
 * @subpackage model
 */
class BusinessProcessStartNotificationTemplate extends BusinessProcessNotificationTemplate
{
	private $disableParameters = false;
	
	public function __construct()
	{
		$this->setType(BusinessProcessNotificationPlugin::getBusinessProcessNotificationTemplateTypeCoreValue(BusinessProcessNotificationTemplateType::BPM_START));
		parent::__construct();
	}
	
	/* (non-PHPdoc)
	 * @see EventNotificationTemplate::getContentParameters()
	 */
	public function getContentParameters()
	{
		return $this->disableParameters ? array() : parent::getContentParameters();
	}
	
	/* (non-PHPdoc)
	 * @see EventNotificationTemplate::getUserParameters()
	 */
	public function getUserParameters()
	{
		return $this->disableParameters ? array() : parent::getUserParameters();
	}
	
	/* (non-PHPdoc)
	 * @see BatchEventNotificationTemplate::dispatch()
	 */
	public function abort($scope)
	{
		$abortCaseJobType = BusinessProcessNotificationPlugin::getBusinessProcessNotificationTemplateTypeCoreValue(BusinessProcessNotificationTemplateType::BPM_ABORT);
		$this->disableParameters = true;
		try 
		{
			$ret = $this->dispatchPerCase($scope, $abortCaseJobType);	
		}
		catch (Exception $e)
		{
			$this->disableParameters = false;
			throw $e;
		}
		$this->disableParameters = false;
		return $ret;
	}<commit_msg>Aborting is already on the main object<commit_after><?php
/**
 * @package plugins.businessProcessNotification
 * @subpackage model
 */
class BusinessProcessStartNotificationTemplate extends BusinessProcessNotificationTemplate
{
	private $aborting = false;
	
	public function __construct()
	{
		$this->setType(BusinessProcessNotificationPlugin::getBusinessProcessNotificationTemplateTypeCoreValue(BusinessProcessNotificationTemplateType::BPM_START));
		parent::__construct();
	}
	
	/* (non-PHPdoc)
	 * @see EventNotificationTemplate::getContentParameters()
	 */
	public function getContentParameters()
	{
		return $this->aborting ? array() : parent::getContentParameters();
	}
	
	/* (non-PHPdoc)
	 * @see EventNotificationTemplate::getUserParameters()
	 */
	public function getUserParameters()
	{
		return $this->aborting ? array() : parent::getUserParameters();
	}
	
	/* (non-PHPdoc)
	 * @see BusinessProcessNotificationTemplate::getMainObject()
	 */
	protected function getMainObject(BaseObject $object)
	{
		return $this->aborting ? $object : parent::getMainObject($object);
	}
	
	/* (non-PHPdoc)
	 * @see BatchEventNotificationTemplate::dispatch()
	 */
	public function abort($scope)
	{
		$abortCaseJobType = BusinessProcessNotificationPlugin::getBusinessProcessNotificationTemplateTypeCoreValue(BusinessProcessNotificationTemplateType::BPM_ABORT);
		$this->aborting = true;
		try 
		{
			$ret = $this->dispatchPerCase($scope, $abortCaseJobType);	
		}
		catch (Exception $e)
		{
			$this->aborting = false;
			throw $e;
		}
		$this->aborting = false;
		return $ret;
	}
{'fraction_non_alphanumeric': 0.11975642760487144, 'fraction_numerical': 0.0, 'mean_word_length': 5.892773892773893, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6725530', 'n_tokens_mistral': 899, 'n_tokens_neox': 817, 'n_words': 141}