Updates before update on BpmnWorkflow Adapter
This commit is contained in:
@@ -116,13 +116,6 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
|
||||
public function updateActivity($actUid, $data)
|
||||
{
|
||||
unset($data["BOU_ELEMENT_ID"]);
|
||||
|
||||
if (! self::isModified("activity", $actUid, $data)) {
|
||||
self::log("Update Activity: $actUid (No Changes)");
|
||||
return false;
|
||||
}
|
||||
|
||||
parent::updateActivity($actUid, $data);
|
||||
|
||||
$taskData = array();
|
||||
@@ -235,14 +228,6 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
|
||||
public function updateEvent($evnUid, $data)
|
||||
{
|
||||
$data["EVN_CANCEL_ACTIVITY"] = $data["EVN_CANCEL_ACTIVITY"] ? 1 : 0;
|
||||
$data["EVN_WAIT_FOR_COMPLETION"] = $data["EVN_WAIT_FOR_COMPLETION"] ? 1 : 0;
|
||||
|
||||
if (! self::isModified("event", $evnUid, $data)) {
|
||||
self::log("Update Event: $evnUid (No Changes)");
|
||||
return false;
|
||||
}
|
||||
|
||||
parent::updateEvent($evnUid, $data);
|
||||
}
|
||||
|
||||
|
||||
@@ -386,8 +386,13 @@ class Bpmn extends Handler
|
||||
|
||||
public function updateEvent($evnUid, $data)
|
||||
{
|
||||
$data["EVN_CANCEL_ACTIVITY"] = $data["EVN_CANCEL_ACTIVITY"] ? 1 : 0;
|
||||
$data["EVN_WAIT_FOR_COMPLETION"] = $data["EVN_WAIT_FOR_COMPLETION"] ? 1 : 0;
|
||||
if (array_key_exists("EVN_CANCEL_ACTIVITY", $data)) {
|
||||
$data["EVN_CANCEL_ACTIVITY"] = $data["EVN_CANCEL_ACTIVITY"] ? 1 : 0;
|
||||
}
|
||||
|
||||
if (array_key_exists("EVN_WAIT_FOR_COMPLETION", $data)) {
|
||||
$data["EVN_WAIT_FOR_COMPLETION"] = $data["EVN_WAIT_FOR_COMPLETION"] ? 1 : 0;
|
||||
}
|
||||
|
||||
try {
|
||||
self::log("Update Event: $evnUid", "With data: ", $data);
|
||||
|
||||
@@ -90,6 +90,16 @@ abstract class Handler
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function isEquals($array, $arrayCompare)
|
||||
{
|
||||
ksort($array);
|
||||
ksort($arrayCompare);
|
||||
self::log($array, $arrayCompare);
|
||||
//$ret = array_diff_assoc($array, $arrayCompare);
|
||||
|
||||
return (self::getChecksum($array) === self::getChecksum($arrayCompare));
|
||||
}
|
||||
|
||||
/**
|
||||
* Log in ProcessMaker Standard Output if debug mode is enabled.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user