Envio de correos Intermediate Event no envia mail con una combinacion especifica

HOR-1575
Envio de correos Intermediate Event no envia mail con una combinacion especifica

HOR-1575
Envio de correos Intermediate Event no envia mail con una combinacion especifica

HOR-1575
Envio de correos Intermediate Event no envia mail con una combinacion especifica

HOR-1575
Envio de correos Intermediate Event no envia mail con una combinacion especifica
This commit is contained in:
dheeyi william
2016-08-12 16:49:21 -04:00
parent 0fc4abd2fe
commit 14d5f67c5b
9 changed files with 168 additions and 30 deletions

View File

@@ -949,6 +949,12 @@ class wsBase
}
$aSetup = (!empty($arrayConfigAux))? $arrayConfigAux : System::getEmailConfiguration();
if (!isset($aSetup['MESS_ENABLED'])) {
$aSetup['MESS_ENABLED'] = 1;
$aSetup['SMTPSecure'] = $aSetup['SMTPSECURE'];
unset($aSetup['SMTPSECURE']);
}
} else {
/*----------------------------------********---------------------------------*/
$aSetup = System::getEmailConfiguration();

View File

@@ -68,6 +68,12 @@ class workspaceTools
$stop = microtime(true);
CLI::logging("<*> Database Upgrade Process took " . ($stop - $start) . " seconds.\n");
$start = microtime(true);
CLI::logging("> Check Intermediate Email Event...\n");
$this->checkIntermediateEmailEvent();
$stop = microtime(true);
CLI::logging("<*> Database Upgrade Process took " . ($stop - $start) . " seconds.\n");
$start = microtime(true);
CLI::logging("> Verify enterprise old...\n");
$this->verifyFilesOldEnterprise($workSpace);
@@ -145,6 +151,22 @@ class workspaceTools
CLI::logging("<*> Database Upgrade Structure Process took $final seconds.\n");
}
public function checkIntermediateEmailEvent()
{
$oEmailEvent = new \ProcessMaker\BusinessModel\EmailEvent();
$oEmailServer = new \ProcessMaker\BusinessModel\EmailServer();
$oCriteria = $oEmailEvent->getEmailEventCriteriaEmailServer();
$rsCriteria = \EmailServerPeer::doSelectRS($oCriteria);
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
while ($rsCriteria->next()) {
$row = $rsCriteria->getRow();
$newUidData = $oEmailServer->getUidEmailServer($row['EMAIL_EVENT_FROM']);
if (is_array($newUidData)) {
$oEmailEvent->update($row['EMAIL_EVENT_UID'], $newUidData);
}
}
}
/**
* Scan the db.php file for database information and return it as an array
*

View File

@@ -79,6 +79,8 @@ class EmailEventMapBuilder
$tMap->addColumn('PRF_UID', 'PrfUid', 'string', CreoleTypes::VARCHAR, false, 32);
$tMap->addColumn('EMAIL_SERVER_UID', 'EmailServerUid', 'string', CreoleTypes::VARCHAR, false, 32);
} // doBuild()
} // EmailEventMapBuilder

View File

@@ -69,6 +69,12 @@ abstract class BaseEmailEvent extends BaseObject implements Persistent
*/
protected $prf_uid = '';
/**
* The value for the email_server_uid field.
* @var string
*/
protected $email_server_uid = '';
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
@@ -160,6 +166,17 @@ abstract class BaseEmailEvent extends BaseObject implements Persistent
return $this->prf_uid;
}
/**
* Get the [email_server_uid] column value.
*
* @return string
*/
public function getEmailServerUid()
{
return $this->email_server_uid;
}
/**
* Set the value of [email_event_uid] column.
*
@@ -314,6 +331,28 @@ abstract class BaseEmailEvent extends BaseObject implements Persistent
} // setPrfUid()
/**
* Set the value of [email_server_uid] column.
*
* @param string $v new value
* @return void
*/
public function setEmailServerUid($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->email_server_uid !== $v || $v === '') {
$this->email_server_uid = $v;
$this->modifiedColumns[] = EmailEventPeer::EMAIL_SERVER_UID;
}
} // setEmailServerUid()
/**
* Hydrates (populates) the object variables with values from the database resultset.
*
@@ -345,12 +384,14 @@ abstract class BaseEmailEvent extends BaseObject implements Persistent
$this->prf_uid = $rs->getString($startcol + 6);
$this->email_server_uid = $rs->getString($startcol + 7);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 7; // 7 = EmailEventPeer::NUM_COLUMNS - EmailEventPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 8; // 8 = EmailEventPeer::NUM_COLUMNS - EmailEventPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating EmailEvent object", $e);
@@ -575,6 +616,9 @@ abstract class BaseEmailEvent extends BaseObject implements Persistent
case 6:
return $this->getPrfUid();
break;
case 7:
return $this->getEmailServerUid();
break;
default:
return null;
break;
@@ -602,6 +646,7 @@ abstract class BaseEmailEvent extends BaseObject implements Persistent
$keys[4] => $this->getEmailEventTo(),
$keys[5] => $this->getEmailEventSubject(),
$keys[6] => $this->getPrfUid(),
$keys[7] => $this->getEmailServerUid(),
);
return $result;
}
@@ -654,6 +699,9 @@ abstract class BaseEmailEvent extends BaseObject implements Persistent
case 6:
$this->setPrfUid($value);
break;
case 7:
$this->setEmailServerUid($value);
break;
} // switch()
}
@@ -705,6 +753,10 @@ abstract class BaseEmailEvent extends BaseObject implements Persistent
$this->setPrfUid($arr[$keys[6]]);
}
if (array_key_exists($keys[7], $arr)) {
$this->setEmailServerUid($arr[$keys[7]]);
}
}
/**
@@ -744,6 +796,10 @@ abstract class BaseEmailEvent extends BaseObject implements Persistent
$criteria->add(EmailEventPeer::PRF_UID, $this->prf_uid);
}
if ($this->isColumnModified(EmailEventPeer::EMAIL_SERVER_UID)) {
$criteria->add(EmailEventPeer::EMAIL_SERVER_UID, $this->email_server_uid);
}
return $criteria;
}
@@ -810,6 +866,8 @@ abstract class BaseEmailEvent extends BaseObject implements Persistent
$copyObj->setPrfUid($this->prf_uid);
$copyObj->setEmailServerUid($this->email_server_uid);
$copyObj->setNew(true);

View File

@@ -25,7 +25,7 @@ abstract class BaseEmailEventPeer
const CLASS_DEFAULT = 'classes.model.EmailEvent';
/** The total number of columns. */
const NUM_COLUMNS = 7;
const NUM_COLUMNS = 8;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -52,6 +52,9 @@ abstract class BaseEmailEventPeer
/** the column name for the PRF_UID field */
const PRF_UID = 'EMAIL_EVENT.PRF_UID';
/** the column name for the EMAIL_SERVER_UID field */
const EMAIL_SERVER_UID = 'EMAIL_EVENT.EMAIL_SERVER_UID';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
@@ -63,10 +66,10 @@ abstract class BaseEmailEventPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('EmailEventUid', 'PrjUid', 'EvnUid', 'EmailEventFrom', 'EmailEventTo', 'EmailEventSubject', 'PrfUid', ),
BasePeer::TYPE_COLNAME => array (EmailEventPeer::EMAIL_EVENT_UID, EmailEventPeer::PRJ_UID, EmailEventPeer::EVN_UID, EmailEventPeer::EMAIL_EVENT_FROM, EmailEventPeer::EMAIL_EVENT_TO, EmailEventPeer::EMAIL_EVENT_SUBJECT, EmailEventPeer::PRF_UID, ),
BasePeer::TYPE_FIELDNAME => array ('EMAIL_EVENT_UID', 'PRJ_UID', 'EVN_UID', 'EMAIL_EVENT_FROM', 'EMAIL_EVENT_TO', 'EMAIL_EVENT_SUBJECT', 'PRF_UID', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
BasePeer::TYPE_PHPNAME => array ('EmailEventUid', 'PrjUid', 'EvnUid', 'EmailEventFrom', 'EmailEventTo', 'EmailEventSubject', 'PrfUid', 'EmailServerUid', ),
BasePeer::TYPE_COLNAME => array (EmailEventPeer::EMAIL_EVENT_UID, EmailEventPeer::PRJ_UID, EmailEventPeer::EVN_UID, EmailEventPeer::EMAIL_EVENT_FROM, EmailEventPeer::EMAIL_EVENT_TO, EmailEventPeer::EMAIL_EVENT_SUBJECT, EmailEventPeer::PRF_UID, EmailEventPeer::EMAIL_SERVER_UID, ),
BasePeer::TYPE_FIELDNAME => array ('EMAIL_EVENT_UID', 'PRJ_UID', 'EVN_UID', 'EMAIL_EVENT_FROM', 'EMAIL_EVENT_TO', 'EMAIL_EVENT_SUBJECT', 'PRF_UID', 'EMAIL_SERVER_UID', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
);
/**
@@ -76,10 +79,10 @@ abstract class BaseEmailEventPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('EmailEventUid' => 0, 'PrjUid' => 1, 'EvnUid' => 2, 'EmailEventFrom' => 3, 'EmailEventTo' => 4, 'EmailEventSubject' => 5, 'PrfUid' => 6, ),
BasePeer::TYPE_COLNAME => array (EmailEventPeer::EMAIL_EVENT_UID => 0, EmailEventPeer::PRJ_UID => 1, EmailEventPeer::EVN_UID => 2, EmailEventPeer::EMAIL_EVENT_FROM => 3, EmailEventPeer::EMAIL_EVENT_TO => 4, EmailEventPeer::EMAIL_EVENT_SUBJECT => 5, EmailEventPeer::PRF_UID => 6, ),
BasePeer::TYPE_FIELDNAME => array ('EMAIL_EVENT_UID' => 0, 'PRJ_UID' => 1, 'EVN_UID' => 2, 'EMAIL_EVENT_FROM' => 3, 'EMAIL_EVENT_TO' => 4, 'EMAIL_EVENT_SUBJECT' => 5, 'PRF_UID' => 6, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
BasePeer::TYPE_PHPNAME => array ('EmailEventUid' => 0, 'PrjUid' => 1, 'EvnUid' => 2, 'EmailEventFrom' => 3, 'EmailEventTo' => 4, 'EmailEventSubject' => 5, 'PrfUid' => 6, 'EmailServerUid' => 7, ),
BasePeer::TYPE_COLNAME => array (EmailEventPeer::EMAIL_EVENT_UID => 0, EmailEventPeer::PRJ_UID => 1, EmailEventPeer::EVN_UID => 2, EmailEventPeer::EMAIL_EVENT_FROM => 3, EmailEventPeer::EMAIL_EVENT_TO => 4, EmailEventPeer::EMAIL_EVENT_SUBJECT => 5, EmailEventPeer::PRF_UID => 6, EmailEventPeer::EMAIL_SERVER_UID => 7, ),
BasePeer::TYPE_FIELDNAME => array ('EMAIL_EVENT_UID' => 0, 'PRJ_UID' => 1, 'EVN_UID' => 2, 'EMAIL_EVENT_FROM' => 3, 'EMAIL_EVENT_TO' => 4, 'EMAIL_EVENT_SUBJECT' => 5, 'PRF_UID' => 6, 'EMAIL_SERVER_UID' => 7, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
);
/**
@@ -194,6 +197,8 @@ abstract class BaseEmailEventPeer
$criteria->addSelectColumn(EmailEventPeer::PRF_UID);
$criteria->addSelectColumn(EmailEventPeer::EMAIL_SERVER_UID);
}
const COUNT = 'COUNT(EMAIL_EVENT.EMAIL_EVENT_UID)';