BUG-14598. NEW FEATURE SelfService One Execution.
A dropdown was added in the SelfService configuration, this dropdown let you set if the trigger seted in the self service is gonna be executed ONE time or every time that cron is executed. Some validations where added in the cron_single.php file to save the data in the new table 'APP_TIMEOUT_ACTION_EXECUTED' when the Execution is set in ONCE. If the app_UID is find in this table the trigger will not be executed, if is not find the trigger will be executed.
This commit is contained in:
@@ -303,6 +303,12 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $tas_selfservice_trigger_uid = '';
|
||||
|
||||
/**
|
||||
* The value for the tas_selfservice_execution field.
|
||||
* @var string
|
||||
*/
|
||||
protected $tas_selfservice_execution = 'EVERY_TIME';
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
* by another object which falls in this transaction.
|
||||
@@ -823,6 +829,17 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
return $this->tas_selfservice_trigger_uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [tas_selfservice_execution] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTasSelfserviceExecution()
|
||||
{
|
||||
|
||||
return $this->tas_selfservice_execution;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [pro_uid] column.
|
||||
*
|
||||
@@ -1823,6 +1840,28 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
|
||||
} // setTasSelfserviceTriggerUid()
|
||||
|
||||
/**
|
||||
* Set the value of [tas_selfservice_execution] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setTasSelfserviceExecution($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
// we will cast the input to a string (if it is not).
|
||||
if ($v !== null && !is_string($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->tas_selfservice_execution !== $v || $v === 'EVERY_TIME') {
|
||||
$this->tas_selfservice_execution = $v;
|
||||
$this->modifiedColumns[] = TaskPeer::TAS_SELFSERVICE_EXECUTION;
|
||||
}
|
||||
|
||||
} // setTasSelfserviceExecution()
|
||||
|
||||
/**
|
||||
* Hydrates (populates) the object variables with values from the database resultset.
|
||||
*
|
||||
@@ -1932,12 +1971,14 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
|
||||
$this->tas_selfservice_trigger_uid = $rs->getString($startcol + 45);
|
||||
|
||||
$this->tas_selfservice_execution = $rs->getString($startcol + 46);
|
||||
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
||||
// FIXME - using NUM_COLUMNS may be clearer.
|
||||
return $startcol + 46; // 46 = TaskPeer::NUM_COLUMNS - TaskPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 47; // 47 = TaskPeer::NUM_COLUMNS - TaskPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating Task object", $e);
|
||||
@@ -2279,6 +2320,9 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
case 45:
|
||||
return $this->getTasSelfserviceTriggerUid();
|
||||
break;
|
||||
case 46:
|
||||
return $this->getTasSelfserviceExecution();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
@@ -2345,6 +2389,7 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
$keys[43] => $this->getTasSelfserviceTime(),
|
||||
$keys[44] => $this->getTasSelfserviceTimeUnit(),
|
||||
$keys[45] => $this->getTasSelfserviceTriggerUid(),
|
||||
$keys[46] => $this->getTasSelfserviceExecution(),
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
@@ -2514,6 +2559,9 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
case 45:
|
||||
$this->setTasSelfserviceTriggerUid($value);
|
||||
break;
|
||||
case 46:
|
||||
$this->setTasSelfserviceExecution($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
@@ -2721,6 +2769,10 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
$this->setTasSelfserviceTriggerUid($arr[$keys[45]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[46], $arr)) {
|
||||
$this->setTasSelfserviceExecution($arr[$keys[46]]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2916,6 +2968,10 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
$criteria->add(TaskPeer::TAS_SELFSERVICE_TRIGGER_UID, $this->tas_selfservice_trigger_uid);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(TaskPeer::TAS_SELFSERVICE_EXECUTION)) {
|
||||
$criteria->add(TaskPeer::TAS_SELFSERVICE_EXECUTION, $this->tas_selfservice_execution);
|
||||
}
|
||||
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
@@ -3060,6 +3116,8 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setTasSelfserviceTriggerUid($this->tas_selfservice_trigger_uid);
|
||||
|
||||
$copyObj->setTasSelfserviceExecution($this->tas_selfservice_execution);
|
||||
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user