Adding validation before update a gateway, it only is updated if its data has been changed
This commit is contained in:
@@ -327,8 +327,6 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
break;
|
||||
case 'bpmnEvent':
|
||||
$evnUid = $flow['FLO_ELEMENT_DEST'];
|
||||
self::log('=======++++++++=========>', $evnUid, "EVN_UID", $events);
|
||||
|
||||
$events = self::findInArray($evnUid, "EVN_UID", $events);
|
||||
|
||||
|
||||
|
||||
@@ -64,6 +64,9 @@ class Bpmn extends Handler
|
||||
"PRJ_UID", "PRO_UID", "BOU_ELEMENT", "BOU_ELEMENT_TYPE", "BOU_REL_POSITION",
|
||||
"BOU_SIZE_IDENTICAL", "DIA_UID", "BOU_UID", "ELEMENT_UID", "EVN_ATTACHED_TO", "EVN_CONDITION"
|
||||
),
|
||||
"gateway" => array("BOU_ELEMENT", "BOU_ELEMENT_TYPE", "BOU_REL_POSITION", "BOU_SIZE_IDENTICAL", "BOU_UID",
|
||||
"DIA_UID", "ELEMENT_UID", "PRJ_UID", "PRO_UID"
|
||||
),
|
||||
"flow" => array("PRJ_UID", "DIA_UID", "FLO_ELEMENT_DEST_PORT", "FLO_ELEMENT_ORIGIN_PORT")
|
||||
);
|
||||
|
||||
@@ -468,6 +471,7 @@ class Bpmn extends Handler
|
||||
|
||||
if ($retType != "object" && ! empty($gateway)) {
|
||||
$gateway = $gateway->toArray();
|
||||
$gateway = self::filterArrayKeys($gateway, self::$excludeFields["gateway"]);
|
||||
}
|
||||
|
||||
return $gateway;
|
||||
@@ -479,7 +483,13 @@ class Bpmn extends Handler
|
||||
extract($start);
|
||||
}
|
||||
|
||||
return Gateway::getAll($this->getUid(), $start, $limit, $filter, $changeCaseTo);
|
||||
//return Gateway::getAll($this->getUid(), $start, $limit, $filter, $changeCaseTo);
|
||||
$filter = $changeCaseTo != CASE_UPPER ? array_map("strtolower", self::$excludeFields["gateway"]) : self::$excludeFields["gateway"];
|
||||
|
||||
return self::filterCollectionArrayKeys(
|
||||
Gateway::getAll($this->getUid(), $start, $limit, $filter, $changeCaseTo),
|
||||
$filter
|
||||
);
|
||||
}
|
||||
|
||||
public function removeGateway($gatUid)
|
||||
|
||||
@@ -92,11 +92,8 @@ abstract class Handler
|
||||
|
||||
public static function isEquals($array, $arrayCompare)
|
||||
{
|
||||
ksort($array);
|
||||
ksort($arrayCompare);
|
||||
//self::log("ONE: ", $array, "TWO: ", $arrayCompare);
|
||||
//$ret = array_diff_assoc("ONE: ", $array, "TWO: ", $arrayCompare);
|
||||
|
||||
return (self::getChecksum($array) === self::getChecksum($arrayCompare));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user