Merged in victorsl/processmaker/HOR-1456-31-B (pull request #4658)
HOR-1456
This commit is contained in:
@@ -4126,7 +4126,11 @@ class Processes
|
||||
foreach ($arrayData as $value) {
|
||||
$record = $value;
|
||||
|
||||
$result = $scriptTask->create($processUid, $record);
|
||||
try {
|
||||
$result = $scriptTask->create($processUid, $record);
|
||||
} catch (Exception $e) {
|
||||
Bootstrap::registerMonolog('DataError', 400, $e->getMessage(), $record, SYS_SYS, 'processImporter.log');
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
@@ -6114,4 +6118,3 @@ class ObjectCellection
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ abstract class BaseProcess extends BaseObject implements Persistent
|
||||
* The value for the pro_action_done field.
|
||||
* @var string
|
||||
*/
|
||||
protected $pro_action_done = '';
|
||||
protected $pro_action_done;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
@@ -1599,7 +1599,7 @@ abstract class BaseProcess extends BaseObject implements Persistent
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->pro_action_done !== $v || $v === '') {
|
||||
if ($this->pro_action_done !== $v) {
|
||||
$this->pro_action_done = $v;
|
||||
$this->modifiedColumns[] = ProcessPeer::PRO_ACTION_DONE;
|
||||
}
|
||||
|
||||
@@ -913,7 +913,7 @@
|
||||
<column name="PRO_COST" type="DECIMAL" size="7,2" required="false" default="0"/>
|
||||
<column name="PRO_UNIT_COST" type="VARCHAR" size="50" required="false" default=""/>
|
||||
<column name="PRO_ITEE" type="INTEGER" required="true" default="0"/>
|
||||
<column name="PRO_ACTION_DONE" type="LONGVARCHAR" default="" />
|
||||
<column name="PRO_ACTION_DONE" type="LONGVARCHAR" />
|
||||
<validator column="PRO_TIMEUNIT">
|
||||
<rule name="validValues" value="WEEKS|MONTHS|DAYS|HOURS|MINUTES" message="Please select a valid Time Unit."/>
|
||||
</validator>
|
||||
|
||||
@@ -460,7 +460,7 @@ CREATE TABLE `PROCESS`
|
||||
`PRO_COST` DECIMAL(7,2) default 0,
|
||||
`PRO_UNIT_COST` VARCHAR(50) default '',
|
||||
`PRO_ITEE` INTEGER default 0 NOT NULL,
|
||||
`PRO_ACTION_DONE` MEDIUMTEXT default '',
|
||||
`PRO_ACTION_DONE` MEDIUMTEXT,
|
||||
PRIMARY KEY (`PRO_UID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Store process Information';
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
@@ -201,6 +201,26 @@ class ScriptTask
|
||||
if ($obj->getActTaskType() != "SCRIPTTASK") {
|
||||
throw new \Exception(\G::LoadTranslation("ID_SCRIPT_TASK_TYPE_ACTIVITY_NOT_IS_SCRIPTTASK", array($this->arrayFieldNameForException["actUid"], $arrayData["ACT_UID"])));
|
||||
}
|
||||
|
||||
//Activity - Already registered
|
||||
$criteria = new \Criteria('workflow');
|
||||
$criteria->addSelectColumn(\ScriptTaskPeer::SCRTAS_UID);
|
||||
|
||||
if ($scriptTaskUid != '') {
|
||||
$criteria->add(\ScriptTaskPeer::SCRTAS_UID, $scriptTaskUid, \Criteria::NOT_EQUAL);
|
||||
}
|
||||
|
||||
$criteria->add(\ScriptTaskPeer::PRJ_UID, $projectUid, \Criteria::EQUAL);
|
||||
$criteria->add(\ScriptTaskPeer::ACT_UID, $arrayFinalData['ACT_UID'], \Criteria::EQUAL);
|
||||
|
||||
$rsCriteria = \ScriptTaskPeer::doSelectRS($criteria);
|
||||
|
||||
if ($rsCriteria->next()) {
|
||||
throw new \Exception(\G::LoadTranslation(
|
||||
'ID_SCRIPT_TASK_ACTIVITY_ALREADY_REGISTERED',
|
||||
[$this->arrayFieldNameForException['actUid'], $arrayFinalData['ACT_UID']]
|
||||
));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user