diff --git a/workflow/engine/classes/model/BpmnActivity.php b/workflow/engine/classes/model/BpmnActivity.php index 841c8586b..c33319b3b 100644 --- a/workflow/engine/classes/model/BpmnActivity.php +++ b/workflow/engine/classes/model/BpmnActivity.php @@ -39,16 +39,14 @@ class BpmnActivity extends BaseBpmnActivity $process = BpmnProcessPeer::retrieveByPK($this->getProUid()); if (is_object($process)) { - $this->bound->setDiaUid($process->getDiaUid()); - - if ($this->bound->getBouElement() == null && $this->bound->getBouElement() == '' && $this->bound->getBouElement() == $process->getDiaUid()) { - $this->bound->setBouContainer('bpmnDiagram'); - $this->bound->setBouElement($process->getDiaUid()); - } else { + if (isset($this->getLnsUid)) { $this->bound->setBouContainer('bpmnLane'); - $this->bound->setBouElement($this->bound->getBouElement()); + $this->bound->setBouElement($this->getLnsUid()); + } else { + $this->bound->setBouContainer('bpmnDiagram'); } + $this->bound->setBouElement($process->getDiaUid()); } } diff --git a/workflow/engine/classes/model/BpmnArtifact.php b/workflow/engine/classes/model/BpmnArtifact.php index ccefa79ec..4b72b42a2 100644 --- a/workflow/engine/classes/model/BpmnArtifact.php +++ b/workflow/engine/classes/model/BpmnArtifact.php @@ -39,16 +39,14 @@ class BpmnArtifact extends BaseBpmnArtifact $process = BpmnProcessPeer::retrieveByPK($this->getProUid()); if (is_object($process)) { - $this->bound->setDiaUid($process->getDiaUid()); - - if ($this->bound->getBouElement() == null && $this->bound->getBouElement() == '' && $this->bound->getBouElement() == $process->getDiaUid()) { - $this->bound->setBouContainer('bpmnDiagram'); - $this->bound->setBouElement($process->getDiaUid()); - } else { + if (isset($this->getLnsUid)) { $this->bound->setBouContainer('bpmnLane'); - $this->bound->setBouElement($this->bound->getBouElement()); + $this->bound->setBouElement($this->getLnsUid()); + } else { + $this->bound->setBouContainer('bpmnDiagram'); } + $this->bound->setBouElement($process->getDiaUid()); } } diff --git a/workflow/engine/classes/model/BpmnData.php b/workflow/engine/classes/model/BpmnData.php index b8385d626..cdb43fa84 100644 --- a/workflow/engine/classes/model/BpmnData.php +++ b/workflow/engine/classes/model/BpmnData.php @@ -39,16 +39,14 @@ class BpmnData extends BaseBpmnData $process = BpmnProcessPeer::retrieveByPK($this->getProUid()); if (is_object($process)) { - $this->bound->setDiaUid($process->getDiaUid()); - - if ($this->bound->getBouElement() == null && $this->bound->getBouElement() == '' && $this->bound->getBouElement() == $process->getDiaUid()) { - $this->bound->setBouContainer('bpmnDiagram'); - $this->bound->setBouElement($process->getDiaUid()); - } else { + if (isset($this->getLnsUid)) { $this->bound->setBouContainer('bpmnLane'); - $this->bound->setBouElement($this->bound->getBouElement()); + $this->bound->setBouElement($this->getLnsUid()); + } else { + $this->bound->setBouContainer('bpmnDiagram'); } + $this->bound->setBouElement($process->getDiaUid()); } } diff --git a/workflow/engine/classes/model/BpmnEvent.php b/workflow/engine/classes/model/BpmnEvent.php index d799dd0ea..080b7e5f3 100644 --- a/workflow/engine/classes/model/BpmnEvent.php +++ b/workflow/engine/classes/model/BpmnEvent.php @@ -39,16 +39,14 @@ class BpmnEvent extends BaseBpmnEvent $process = BpmnProcessPeer::retrieveByPK($this->getProUid()); if (is_object($process)) { - $this->bound->setDiaUid($process->getDiaUid()); - - if ($this->bound->getBouElement() == null && $this->bound->getBouElement() == '' && $this->bound->getBouElement() == $process->getDiaUid()) { - $this->bound->setBouContainer('bpmnDiagram'); - $this->bound->setBouElement($process->getDiaUid()); - } else { + if (isset($this->getLnsUid)) { $this->bound->setBouContainer('bpmnLane'); - $this->bound->setBouElement($this->bound->getBouElement()); + $this->bound->setBouElement($this->getLnsUid()); + } else { + $this->bound->setBouContainer('bpmnDiagram'); } + $this->bound->setBouElement($process->getDiaUid()); } } diff --git a/workflow/engine/classes/model/BpmnGateway.php b/workflow/engine/classes/model/BpmnGateway.php index 6d9a43107..a9a21e18e 100644 --- a/workflow/engine/classes/model/BpmnGateway.php +++ b/workflow/engine/classes/model/BpmnGateway.php @@ -39,16 +39,14 @@ class BpmnGateway extends BaseBpmnGateway $process = BpmnProcessPeer::retrieveByPK($this->getProUid()); if (is_object($process)) { - $this->bound->setDiaUid($process->getDiaUid()); - - if ($this->bound->getBouElement() == null && $this->bound->getBouElement() == '' && $this->bound->getBouElement() == $process->getDiaUid()) { - $this->bound->setBouContainer('bpmnDiagram'); - $this->bound->setBouElement($process->getDiaUid()); - } else { + if (isset($this->getLnsUid)) { $this->bound->setBouContainer('bpmnLane'); - $this->bound->setBouElement($this->bound->getBouElement()); + $this->bound->setBouElement($this->getLnsUid()); + } else { + $this->bound->setBouContainer('bpmnDiagram'); } + $this->bound->setBouElement($process->getDiaUid()); } } diff --git a/workflow/engine/classes/model/BpmnLane.php b/workflow/engine/classes/model/BpmnLane.php index d80dcd539..11efc59f3 100644 --- a/workflow/engine/classes/model/BpmnLane.php +++ b/workflow/engine/classes/model/BpmnLane.php @@ -39,6 +39,7 @@ class BpmnLane extends BaseBpmnLane { $project = BpmnProjectPeer::retrieveByPK($this->getPrjUid()); if (is_object($project)) { + $criteria = new Criteria('workflow'); $criteria->addSelectColumn(BpmnProcessPeer::DIA_UID); $criteria->add(BpmnProcessPeer::PRJ_UID, $this->getPrjUid(), \Criteria::EQUAL); @@ -47,8 +48,8 @@ class BpmnLane extends BaseBpmnLane { $rsCriteria->next(); $row = $rsCriteria->getRow(); $this->bound->setDiaUid($row["DIA_UID"]); - $this->bound->setBouContainer('bpmnDiagram'); - $this->bound->setBouElement($row["DIA_UID"]); + $this->bound->setBouContainer('bpmnLane'); + $this->bound->setBouElement($this->getLnsUid()); } } diff --git a/workflow/engine/classes/model/BpmnLaneset.php b/workflow/engine/classes/model/BpmnLaneset.php index 46d332ac9..3a7674cce 100644 --- a/workflow/engine/classes/model/BpmnLaneset.php +++ b/workflow/engine/classes/model/BpmnLaneset.php @@ -40,14 +40,8 @@ class BpmnLaneset extends BaseBpmnLaneset { if (is_object($process)) { $this->bound->setDiaUid($process->getDiaUid()); - - if ($this->bound->getBouElement() == null && $this->bound->getBouElement() == '' && $this->bound->getBouElement() == $process->getDiaUid()) { - $this->bound->setBouContainer('bpmnDiagram'); - $this->bound->setBouElement($process->getDiaUid()); - } else { - $this->bound->setBouContainer('bpmnLane'); - $this->bound->setBouElement($this->bound->getBouElement()); - } + $this->bound->setBouContainer('bpmnDiagram'); + $this->bound->setBouElement($process->getDiaUid()); } } diff --git a/workflow/engine/classes/model/BpmnParticipant.php b/workflow/engine/classes/model/BpmnParticipant.php index 33659ec60..856f106f0 100644 --- a/workflow/engine/classes/model/BpmnParticipant.php +++ b/workflow/engine/classes/model/BpmnParticipant.php @@ -39,16 +39,14 @@ class BpmnParticipant extends BaseBpmnParticipant $process = BpmnProcessPeer::retrieveByPK($this->getProUid()); if (is_object($process)) { - $this->bound->setDiaUid($process->getDiaUid()); - - if ($this->bound->getBouElement() == null && $this->bound->getBouElement() == '' && $this->bound->getBouElement() == $process->getDiaUid()) { - $this->bound->setBouContainer('bpmnDiagram'); - $this->bound->setBouElement($process->getDiaUid()); - } else { + if (isset($this->getLnsUid)) { $this->bound->setBouContainer('bpmnLane'); - $this->bound->setBouElement($this->bound->getBouElement()); + $this->bound->setBouElement($this->getLnsUid()); + } else { + $this->bound->setBouContainer('bpmnDiagram'); } + $this->bound->setBouElement($process->getDiaUid()); } }